Hi!

Todd Huss wrote:
> We plan to have multiple jBoss containers on different machines and
> ofcourse EJB's on machine A should lookup any other EJB transparently
> whether or not they are on the same machine. What's the correct way to do
> this?
> 
> My guess would be, to have all the jBoss servers use one JNDI server and
> that way, all EJB's that are deployed can lookup any other EJB through the
> same JNDI server without knowing which server the EJB is actually
> deployed on. Is this correct?

That's one way to do it. 

> If so how do I configure this? On machines A and B I tried setting the
> provider in jndi.properties to machine C but then at startup I get:
> 
> [JMX RMI Adaptor] javax.naming.NameAlreadyBoundException

Yeah, since this service (and many others) bind themselves into JNDI you
will have conflicts if you run one JNDI with several servers.

A better way to do it is to let each server have its own JNDI, and use
ejb-references in your beans to locate them. Then use jboss.xml to map
an ejb-reference to a complete JNDI name, e.g. let
"java:comp/env/ejb/MyEjb" map to "jnp://somehost/myapp/MyEjb". This way
you will have to configure the deployment descriptors for each bean, but
the bean source can use the hardcoded "java:" names.

regards,
  Rickard

-- 
Rickard Öberg

Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to