wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes How can I call EJB3 beans from another comuter? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How can I call EJB3 beans from another comuter?" Watch "How can I call EJB3 beans from another comuter?" New topic
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: 9912
    
158

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]
 
wood burning stoves
 
subject: How can I call EJB3 beans from another comuter?
 
Similar Threads
Problem in getting the datasource for mysql
Injection exception, session bean not bound
Problem with entity bean
please help in setting db connection in jboss
JBoss 4.2.2 Server Starting Issue