[jboss-user] [EJB/JBoss] - Problems calling methods in session beans on second JBoss in
dr-dive
do-not-reply at jboss.com
Wed Apr 25 10:09:54 EDT 2007
Hi,
I have installed two JBoss instances on the same computer, and they both run fine. Now I tried to access a session bean on JBoss 2 from a session bean deployed in JBoss 1. For this purpose I use the following code:
| Properties jndiProps = new Properties();
| jndiProps.put(Context.PROVIDER_URL, "jnp://xxx.xxx.xxx.xxx:11099");
| jndiProps.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
| jndiProps.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
| Context ejbContext = new InitialContext(jndiProps);
| RemoteBeanHome remoteBeanHome = (RemoteBeanHome)ejbContext.lookup(jndiNameOfRemoteBean);
|
The result is that the bean I tried to call in JBoss 2 is called within JBoss 1 (The bean is deployed on both JBoss instances).
Any ideas why this is happening?
By the way, I 'm using JBoss 3.2.7 and the files ejb-jar.xml and jboss.xml are the same on both servers. Is that the problem?
Thanks in advance,
Thorsten.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040610#4040610
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040610
More information about the jboss-user
mailing list