Solved

Simple Client to Test EJB's on Weblogic

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

How our DevOps Teams Maximize Uptime

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

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
print map entry 34 79
Eclipse with gitlab 1 251
jsp error 6 70
Does it make sense to split a controller into two file 6 18
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 second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
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.

737 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