Can someone point me to the spec where it states where in JNDI the JMX RMI
adapter should be bound to.

Currently we are binding to "jmx:<hostname>:rmi" which is fine when you are
working with the localhost, but will start to cause problems once used in a
multi-host environment.

For example, consider a situation where a machine has more than one resolvable
name (via DNS CNAMES or similar).  Lets say that the localhost name is set to
"myhost.mydomain.com", and there us a CNAME "www.mydomain.com".  The JMX RMI
adapter will be bound to "jmx:myhost.mydomain.com:rmi".

Now consider the deployer.<sh|bat> scripts run from a seperate machine.  There
is a --server option, which is the <hostname> bit from "jmx:<hostname>:rmi". 
This is currently only used to lookup the RMIAdapter from JNDI but not used to
setup the Context.URL.  This means that a client could not:

./deployer.sh --server www.mydomain.com --deploy someurl

Assuming that deployer.sh did make up a Context.URL from --server (which it does
not) this would not work due to a lookup failure, as there will be no
"jmx:www.mydomain.com:rmi" bound.

So for a client on a remote host to correctly make use of the deployer.sh or any
other simialr tool using the jmx adapter it will have to have knowledge of the
servers local hostname (as returned by
java.net.InetAddress.getLocalHost().getHostName()) and specify that value for
--server, then specify -Djava.naming.provider.url=jnp://www.mydomain.com.

The point is that we can not reliably use any resolvable address.

So, I don't know what the spec says.  If the spec wants us to use the hostname
fine, but lets also bind the local adapter to a common name, like
"jmx:localhost:rmi" or perhaps "jmx::rmi" or whatever I don't really care, as
long as the name is not specific to the local host configuration.

If we do this then we can use any resolvable address to connect to JNDI then
lookup the local JMX RMI adapter.  Then something like this will work:

./deployer.sh --server www.mydomain.com --deploy someurl

Does anyone know if the spec details this?  If so can you point me at it?  Even
if the spec says nothing I think we should implement this to simplify our tools,
so given that any ideas on the best way to add this to the deployable?  Could be
an NamingAlias or something similar?

--jason

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to