5 Replies Latest reply on Jul 14, 2005 3:32 AM by pytaghoras

    Clustering Jboss and deploying SLSB's

    chirock

      I wasn't sure if I should post this here or to the EJB forum, but oh well here goes...

      I've got an SLSB deployed to a 2-node partition. I'm using the RoundRobin load balance policy. The problem I'm having is that the cluster does not follow the round robin policy as desired. One node responds all the time. If I bring that node down, then a different node responds. So essentially I have fail-over, and not load balancing. The code that calls this clustered SLSB resides on an app server that is not on the same subnet as the cluster partition. I've been told that this is my problem so my question is why? - and is there a way I can get this to work without having to put everything on the same subnet?

      Thanks

        • 1. Re: Clustering Jboss and deploying SLSB's
          marlig

          Make sure you don't create the remote interface before each call. Instead create it once, and use it for all subsequent calls.

          Cheers
          Martin

          • 2. Re: Clustering Jboss and deploying SLSB's
            chirock

            That worked! Thanks for the quick reply...

            • 3. Re: Clustering Jboss and deploying SLSB's
              chirock

              things work, but now I have another question. In order to avoid re-creating the remote, I made it a static member of my calling class. But could doing so pose a threading bottleneck when we see an increase in load? Is there a preferred way of doing this than what I have done?

              • 4. Re: Clustering Jboss and deploying SLSB's
                marlig

                I can't tell you about a preferred way, but I don't see why it could become a bottleneck.

                Regards

                • 5. Re: Clustering Jboss and deploying SLSB's
                  pytaghoras

                  I have the some question: how do i have to make sure that i am using Round robin with my clustered SLSB's? Sometimes i see that one jboss server is busy with handeling the requests while the other jboss server is doing nothing. What do i wrong?

                  Here is my ejb-jar:

                  <?xml version="1.0"?>
                  <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
                  "http://java.sun.com/dtd/ejb-jar_2_0.dtd">


                  <!-- moet gewijzigd worden -->
                  <ejb-jar>
                  <enterprise-beans>

                  <display-name>test.ServicesGenerator</display-name>
                  <ejb-name>test_ServicesGenerator</ejb-name>
                  < home >com.test.service.generator.GeneratorHome</ home >
                  < remote >com.test.service.generator.GeneratorRemote< /remote >
                  <ejb-class>com.test.service.generator.GeneratorEJB</ejb-class>
                  <session-type>Stateless</session-type>
                  <transaction-type>Container</transaction-type>
                  <security-identity>

                  <use-caller-identity></use-caller-identity>
                  </security-identity>

                  </enterprise-beans>
                  </ejb-jar>




                  my jboss.xml:

                  <?xml version="1.0"?>

                  <enterprise-beans>

                  <ejb-name>test_ServicesGenerator</ejb-name>
                  <jndi-name>test/ServicesGenerator</jndi-name>
                  <configuration-name>Clustered Stateless SessionBean</configuration-name>
                  True

                  </enterprise-beans>


                  Regards!