3 Replies Latest reply on May 31, 2006 4:48 AM by Wolf-Dieter Fink

    Cluster configuration/troubleshooting

    Hiran Chaudhuri Newbie

      Hi there.

      I'm trying to get jboss running my application clustered. The application uses stateless session beans. Following the documentation I created jboss.xml with the session beans' clustered flag set to true. However a failing node takes all clients connected to this node down - there seems to be no failover. On startup both JBoss nodes display messages they are running in a cluster and they found each other.

      How can I verify
      - which client is connected to what server?
      - which EJBs will be clustered?
      - the jboss.xml contains correct entries (I'm quite sure about EJB-Names, but what about JNDI-Names? Do I need them both?)
      - the nodes will actually communicate the EJBs within the cluster

      Thank you for ideas.

        • 1. Re: Cluster configuration/troubleshooting
          Hiran Chaudhuri Newbie

          Hmmm. Seems like everyone gets a cluster up and running just like that. Does noone ever ask questions? Are there no tools to give information?

          • 2. Re: Cluster configuration/troubleshooting
            Russ Weingartz Newbie

            Hiran,

            were you ever able to resolve this? i am having a similar situation. although my product doesn't use beans, i get the same resuilt as you when stopping a node.

            thanks,
            Russ

            • 3. Re: Cluster configuration/troubleshooting
              Wolf-Dieter Fink Master

              How do you set the InitialContext ?

              Hashtable<String,String> environment=new Hashtable<String,String>();
              environment.put(InitialContext.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
              environment.put(InitialContext.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
              // Autodiscovery via mcast
              environment.put("jnp.discoveryGroup","230.0.0.4"); // depends on your JBoss configuration
              environment.put("jnp.discoveryPort","1102");
              // direct known systems
              //environment.put(InitialContext.PROVIDER_URL,"jboss1:1100,jboss2:1100");
              javax.naming.InitialContext initialContext = new javax.naming.InitialContext(environment);
              

              Looks like this? It works for me!


              - which client is connected to what server?
              - which EJBs will be clustered?
              set flag clustered true in the deploy descriptor
              think about the jboss configuration name "Standard Stateless SessionBean" or "Clustered Stateless SessionBean"

              - the jboss.xml contains correct entries (I'm quite sure about EJB-Names, but what about JNDI-Names? Do I need them both?)

              What means both? (Remote and Local is your decision)