Win a copy of Terraform in Action this week in the Cloud forum!

Abdelrahman Musa

Greenhorn
+ Follow
since Feb 09, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
3
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Abdelrahman Musa


the technique that used in the following forum describe the Lookup EJBs on remote server from Java client resolved the problem,
but I feel its not sense when the client is other application server
http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14109046

but , when I want to connect to EJB on remote sever(WAS) from client deployed on Weblogic, should I use the same technique ?

Thanks
Jayr,

I tried all possibilities but useless, please provide me sample code about this issue

Thanks a lot
Jayr,

To declare JNDI global names through the annotation attribute lookup. I think we have to distinguish between Local and Remote EJBs; in Local EJB you can use annotation attribute lookup with EBJ's name,
but in case Remote you have to define ejb-ref in web.xml , is it right ???



and ejb-ref in vendor-web.xml file



please could you provide me sample of code to lookup EJBs between two different Application servers, either using EJB3.1 spec. or using InitialContext.

I appreciate your help

Thanks
Mr. Jayr

I have two application instances deployed on different application server on my local machine, I tried to testing the EJBs instances that deployed on WAS server by deploying an web application on the same server its worked fine without any problem, but when I lookup these EJBs from other application server(Weblogic, or glassfish) Unfortunately no response.

is it my snap of code true ?
Regarding to INITIAL_CONTEXT_FACTORY should I use the callee application server factory or calling application server (WAS or weblogic Factory)?
Should I use the IIOP in this syntax?
I used global EJB JNDI name is it right ? or i have to use vendor specific JNDI name for Websphere ?


Thanks a lot
Hi All,

How can I lookup remote EJB 3.1 deployed on Websphere Application server(V8.0) from client Application deployed on Weblogic server (10.3)?

I tried the following scripts
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
props.put(javax.naming.Context.PROVIDER_URL, "corbaname::192.168.75.104:2809");

InitialContext cxt = new InitialContext(props);

Object obj = cxt.lookup("java:global/AcasyaPrmClientEAR/PrmBusiness/dep");

DepartmentRemote departmentBoundary = (DepartmentRemote)obj;


And other code
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
props.put(javax.naming.Context.PROVIDER_URL, "iiop://localhost:2809");

InitialContext cxt = new InitialContext(props);

Object obj = cxt.lookup("java:global/AcasyaPrmClientEAR/PrmBusiness/dep");

DepartmentRemote departmentBoundary = (DepartmentRemote)obj;


and I tried all patterns of JNDI, but Unfortunately not work, I got a lot of exceptions especially NamingException & org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0

its Important, I want help from you

Thanks