Solved

Simple Client to Test EJB's on Weblogic

Posted on 2007-03-29
1
1,159 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

Question has a verified solution.

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

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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.

688 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