Solved

Simple Client to Test EJB's on Weblogic

Posted on 2007-03-29
1
1,115 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
factory design pattern vs abstract factoy design pattern 2 100
java JDK Download 7 78
sites similar to codingbat to improve coding hanson skills 3 41
maven project error 5 48
Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
There are numerous questions about how to setup an IBM HTTP Server to be administered from WebSphere Application Server administrative console. I do hope this article will wrap things up and become a reference for this task. You need three things…
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.

895 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

11 Experts available now in Live!

Get 1:1 Help Now