| Author |
How can I call EJB3 beans from another comuter?
|
Armen Arzumanyan
Greenhorn
Joined: Jun 18, 2008
Posts: 13
|
|
I have JSF/EJB3 application what work in my localhost, but when I want call ejb3 beans from another comuter I got errors .... javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectException: no such object in table] 13:12:55,921 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:780) 13:12:55,921 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627) 13:12:55,921 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialContext.java:351)
|
 |
Vesa Tanhua-Tyrkk�
Greenhorn
Joined: Jan 16, 2008
Posts: 25
|
|
Hey, How have you configured your initial context? JNDI lookup also depends on which application server you are using.
|
 |
Armen Arzumanyan
Greenhorn
Joined: Jun 18, 2008
Posts: 13
|
|
Here is my lookup under JBoss..... Hashtable environment = new Hashtable(); environment.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); environment.put(Context.URL_PKG_PREFIXES, "org.jboss.naming rg.jnp.interfaces"); environment.put(Context.PROVIDER_URL, "jnp://some_IP:1099"); InitialContext context = new InitialContext(environment); BeanRemote bean = (BeanRemote) context.lookup("ejb/MyBean/remote");
|
 |
Vesa Tanhua-Tyrkk�
Greenhorn
Joined: Jan 16, 2008
Posts: 25
|
|
|
Have you checked with jmx-console that there is such object in jndi table?
|
 |
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8145
|
|
environment.put(Context.PROVIDER_URL, "jnp://some_IP:1099");
Which version of JBoss? And how do you start JBoss? For versions starting JBoss-4.2.x, you will have to use -b option while starting JBoss, for the server to be accessible remotely. See this for more details.
|
[My Blog] [JavaRanch Journal]
|
 |
 |
|
|
subject: How can I call EJB3 beans from another comuter?
|
|
|