Solved

Simple Client to Test EJB's on Weblogic

Posted on 2007-03-29
1
1,132 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:
Mayank S 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
triangle challenge 4 149
count11 challenge 6 70
eclipse formatting 6 87
jar file executable 12 51
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Configure Web Service (server application) I. Configure security for Web Services methods First, we need to protect Session bean which implements the service: 1. Open EJB deployment descriptor (ejb-jar.xml) in the EJB project that contains you…
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.

776 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