Hi all,
I have the following situation :
Machine 'A' with JBoss where i deployed an Web application with some JSP and Servlets ( a tipical Struts application ).
Machine 'B' with JBoss ( the same network ) where i deployed an EJB module with some Session Beans ( stateless/stateful ) and some Entity Beans.
The Struts application is client of the EJB's on Machine 'B', and it uses a ServiceLocator, where i get an InitialContext using the constructor version that receives no parameters.
InitialContext ctx = new InitialContext();
Thus, the JBoss constructs the InitialContext using the parameters into the file %JBOSS_HOME%/server/default/conf/jndi.properties , so far so good.
The problem is that, if i edit this file to point to the machine 'B' where my EJBs are deployed, and later restart the server on machine 'A' to the changes take efect, the JBoss just can't start, throwing a lot of "Object already bound exceptions".
Thats my jndi.properties file :
---------------------------------------------------------------------
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming

rg.jnp.interfaces
# Do NOT uncomment this line as it causes in VM calls to go over
# RMI!
java.naming.provider.url=jnp://machinebhost:1099
---------------------------------------------------------------------
What is my mistakes ? How to active this on JBoss, one machine with JBoss serving as an Web Server and other machine with JBoss too, serving as an EJB Container.
Thanks for any help.
Claudio Gualberto
SCJP 1.4