-
1. Re: Make a call to an EJB3 this on a machine with weblogic through JNDI
jaikiran Sep 2, 2010 8:40 AM (in response to suter)If I understand right, you are tyring to lookup an EJB which is deployed in JBoss, from Weblogic. If so, then you have to pass the INITIAL_CONTEXT_FACTORY (org.jnp.interfaces.NamingContextFactory) and PROVIDER_URL (jnp://IP:1099 where IP is the IP/hostname of JBoss server and 1099 should be replaced by the JBoss Naming port) corresponding to the JBoss AS server. Also you will have to place the appropriate JBoss specific client jar files (available in JBOSS_HOME/client folder) under Weblogic classpath.
-
2. Re: Make a call to an EJB3 this on a machine with weblogic through JNDI
suter Sep 2, 2010 8:53 AM (in response to jaikiran)Sorry, I have not explained well. I will try to do better.
1. I have two machines (one machine with jboss and another machine with weblogic).
2. the applications are launched in jboss.
3. In weblogic going to have the EJB3 session.
4. Jboss applications must call the sessions through jndi remote.I hope I have been more precise with my English.
Thank you.
-
3. Re: Make a call to an EJB3 this on a machine with weblogic through JNDI
suter Sep 3, 2010 4:42 AM (in response to suter)The solution is the next:
Properties properties = new Properties();
properties.put( javax.naming.Context.PROVIDER_URL, "T3://IP:PORT/" );
properties.put( javax.naming.Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
context = new InitialContext( properties );
Object initialReference = context.lookup(key_jndi);
objValue = (Object)javax.rmi.PortableRemoteObject.narrow(initialReference, Object.class );
return objValue;Thanks for all.