Solved

Simple Client to Test EJB's on Weblogic

Posted on 2007-03-29
1
1,104 Views
Last Modified: 2013-12-10
I am trying to write a simple cmd line client which accesses a weblogic EJB. ( The actual call to weblogic is not working from websphere so we want to test if it works from a cmd line)

Can you please give me a simple code that does this..more specifically I want to make sure that I do not miss any step.Can you please help me on this.
0
Comment
Question by:micro_learner
1 Comment
 
LVL 30

Accepted Solution

by:
mayankeagle earned 500 total points
ID: 18818654
Start with:

Hashtable env = new Hashtable () ;
env.put ( Context.INITIAL_CONTEXT_FACTORY, "class name of initial context factory" ) ; // I think you can leave this if you want to use default
env.put ( Context.PROVIDER_URL, "the provider URL to connect to the EJB container" ) ; // I think you can leave this if you want to use default
Context ctx = new InitialContext ( env ) ;
// now you can do the ctx.lookup ( "JNDI NAME" ) .... and other stuff which you are doing

BTW can you post the code you are using from Websphere which was not working? Might be better to fix it directly.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
struts spring hibernate example 12 84
bunnyEars challenge 6 62
Books that can get me started on JAVA 2 53
strCount chalenge 3 50
This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now