4 Replies Latest reply on Apr 25, 2006 1:08 PM by brian.stansberry

    HA-JNDI and twiddle

      JBAS-3138 reports that when HA-JNDI is used with twiddle to return attributes for an mbean deployed on one server in a cluster, the operation frequently fails. For example, the following works sporadically.

      twiddle --server=jnp://localhost:1100 get "mybean:service=myservice" MyAttribute

      I've confirmed the report on JBossAS 4 and 5. Upon investigation, I'm not sure that this is a bug as it seems like twiddle can't use HA-JNDI in this manner.

      Because twiddle is running remotely and MBeans can't be directly looked up via JNDI, twiddle (or some other software in the stack) does a JNDI lookup on jmx/invoker/RMIAdaptor. It then uses this object to access the desired mbean.

      When the user performs this operation using a HA-JNDI server, the operation is routed to one of the HA-JNDI servers based upon the load balancing policy in use. This might not be the server the user specified in the url and it might not be the server where the mbean was deployed.

      If the lookup returns the adapter from the server where the mbean was deployed, it successfully accesses the mbean and returns the expected result. If the lookup returns the adapter from a different HA-JNDI server, the adapter can't locate the mbean so the operation fails.

      This doesn't seem to be an HA-JNDI issue and may not be a bug at all, depending on how twiddle is supposed to work with HA-JNDI servers.

      Thoughts?