8 Replies Latest reply on Aug 18, 2009 10:42 AM by brian.stansberry

    HA-JNDI and SFSB Bean

    mohitanchlia

      http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Clustering_Guide/beta422/html/clustering-jndi-how.html

      Above link talks about Cluster Wide JNDI tree. My question is how can I see this tree. It also says that objects are rarely bound to in cluster-wide JNDI tree. How can I verify if an Object is bound in cluster wide JNDI tree.

      Another, question I have is what happens when a statefull session bean session fails over to other node. How does it work? How does the context and session binds to new node?

        • 1. Re: HA-JNDI and SFSB Bean
          mohitanchlia

          Could somebody throw some light on how EJB sessions failover for sticky sessions? As I understand Jboss cache replicates SFSB but I am not sure how it fails over the EJB session connected to machine B that just crashed.

          • 2. Re: HA-JNDI and SFSB Bean
            brian.stansberry

            To see what is in HA-JNDI, use the JMX console's jboss:service=JNDIView bean, and invoke the list operation. What's bound in the Cluster Wide JNDI tree is shown under the HA-JNDI Namespace section at the bottom -- usually nothing there. JBoss AS itself doesn't bind anything there.

            • 3. Re: HA-JNDI and SFSB Bean
              mohitanchlia

               

              "mohitanchlia" wrote:
              Could somebody throw some light on how EJB sessions failover for sticky sessions? As I understand Jboss cache replicates SFSB but I am not sure how it fails over the EJB session connected to machine B that just crashed.


              I am still not able to understand the above. Sorry for keep asking.

              • 4. Re: HA-JNDI and SFSB Bean
                brian.stansberry

                EJB failover works because when you lookup your EJB in JNDI, you are actually downloading a proxy that contains within it the current cluster topology for the EJB (i.e. what nodes the EJB is deployed on) along with load balancing and failover logic.

                If you try to use that proxy to invoke on a crashed node, the proxy detects the failure and retries the call on one of the other nodes where the bean is deployed.

                When the call reaches that other node, the EJB container retrieves the bean' state from the distributed cache (JBoss Cache).

                • 5. Re: HA-JNDI and SFSB Bean
                  mohitanchlia

                  Thanks. So when a bean is annotated with @Clustered does it get bound to clusterwide HA-JNDI or is that different only in terms of how client interceptor proxy works.

                  • 6. Re: HA-JNDI and SFSB Bean
                    brian.stansberry

                    JBoss AS does not bind anything in the cluster wide tree. @Clustered doesn't change that.

                    • 7. Re: HA-JNDI and SFSB Bean

                      This is all true for EJb clients running outside the server VM. what happens for EJB clients within a server node VM? Are those calls load balanced across multiple nodes within a cluster?

                      • 8. Re: HA-JNDI and SFSB Bean
                        brian.stansberry

                        If JBoss detects that the target EJB is running in the same VM, it will routes calls to the in-VM bean rather than sending them remotely. Effect is such calls aren't load balanced across the cluster.