This content has been marked as final.
Show 6 replies
-
1. Re: How to Call one EJB from another remotely?
artd May 23, 2007 7:31 AM (in response to gopal1.v)Check the jndi path for your remote interface through the jmx console..
This works for me:Properties properties = new Properties(); properties.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory"); properties.put("java.naming.factory.url.pkgs","=org.jboss.naming:org.jnp.interfaces"); properties.put("java.naming.provider.url","remotehostname:1099"); Context context = new InitialContext(properties); SomeRemoteInterface oRemote= (SomeRemoteInterface)context.lookup("/myejbs/remote/SomeRemoteBean");
-
2. Re: How to Call one EJB from another remotely?
gopal1.v May 23, 2007 7:39 AM (in response to gopal1.v)Hi
Thanks for your reply.
I am using Sun AS...
But i tried similar suggestion...
But Still It couldn't lookup another EJB. -
3. Re: How to Call one EJB from another remotely?
jc7442 May 23, 2007 9:17 AM (in response to gopal1.v)another solution:
@Resource
SessionContext context;
...
context.lookup("..."); -
4. Re: How to Call one EJB from another remotely?
ebross May 23, 2007 10:17 AM (in response to gopal1.v)Assuming
public class StatelessA{} and
public class StatelessB{}
To use StatelessB in StatelessA, try:public class StatelessA{ @EJB StatelessB statelessB; ... }
-
5. Re: How to Call one EJB from another remotely?
gopal1.v May 24, 2007 12:49 AM (in response to gopal1.v)Hi thanks for replies from both of you....
Hi jc can you pls elaborate your solution....
Hi ebross in this way how can i give the ip address of the sys to be lookedup..?
Is it in ejb-jar.xml ? But I am using EJB3.0 any way without using any xml files..? -
6. Re: How to Call one EJB from another remotely?
gopal1.v May 24, 2007 7:24 AM (in response to gopal1.v)Hi
ebross
I tried your suggestion But the Deployment itself is failing stating it couldn't found any EJB's....