0 Replies Latest reply on Jun 13, 2012 3:21 PM by jjfraney

    JBoss AS 6.0.0-Final: Bean's hajndi lookup fails to resolve HA Singleton in other jboss instance

    jjfraney

      It looks like a bean in one instance of a cluster cannot resolve references to an HA Singleton deployed in another instance.

       

      My bean TimerDelegateBean does a lookup for an HASingleton bean.  When the HASingleton bean is colocated to the delegate, success.  Otherwise, failure.

       

      I expect the delegate in all instances of the cluster would be able to resolve the lookup to an HASingleton regardless of where the HASingleton is active.

       

      Any dispute?  What should I do to correct?

       

      Thanks,

       

       

       

       

      I'm attempting this: https://community.jboss.org/wiki/DeployingEJB3TimersInCluster

       

      See: https://github.com/jjfraney/timer-sample for a full, buildable project.  Use eclipse, or your ide, to build and issue timer commands.

       

       

      Here is overview of this project.

       

      1) Two EJBs that activate timers and are meant to be HASingleton beans: ClusteredTimer, NonClusteredTimer (I wanted to explore the need for Clustered, so one of these is Clustered, the other not); both seem to behave the same so, what follows applies equally to either.

      2) The delegate facade EJB which is NOT an HASingleton.  It will delegate a request to one of the beans above.

      3) A client that can send a message to any of the above beans.  All the beans share the same interface.

       

      The beans are deployed in a two instance cluster.  Rightly, the two timer HASingleton beans are not active in one instance, and fully active in the other.  The delegate facade is active in both.

       

      When the client sends messages to the timer wrappers, the expected behavior is demonstrated.  The client side proxy rightly sends the request to the 'active' bean.

       

      When the client sends messages to the delegate, unexpected behavior occurs.  The client side proxy can send the request to either instance of the cluster based on distributin algorithm.  If it happens to send the request to the instance where the timer beans are NOT deployed, the delegate cannot resolve the jndi lookup and the request fails.