2 Replies Latest reply on Feb 19, 2012 8:53 PM by Joseph Fouts

    AS 7.1.0.Final Clustering Example

    Joseph Fouts Novice

      I would like to take the remote ejb sample for AS 7.1 to the next step and try and get it to work the same way I had sample clusterinng environment working in JBoss 5.1

       

      Using the JBoss 7 remote ejb sample I am able to get a simple java client program to lookup and call a method from a SLSB successfully.

       

       

      1.  I want this same test to work in a standalone cluster.

       

                                 Client

               

                machine#1          machine#2      

         

           a.  Copy jboss folder to machine #2

           b.  Modify each machine's standalone-ha.xml to reflect it's IP address.

           c.  Modify the java client's jboss-ejb-client.properties to include both machines as resouces.

           d.  Start server on each machine using the standalone-ha.xml.

           e.  Execute client.

       

           Is there anything more that I need to setup or consider to get clustering to work for this test?

          

          If the client is running on machine #1 can I expect the calls to be accomplished in a round robin fashion?  machine#1...machine#2...machine#1...

       

       

      And now the real challenge.....

       

      2.  I want to add one more SLSB tier in the middle.  This will be machine#3.

       

                                 Client

               

                               machine#3

       

                machine#1          machine#2     

       

      The SLSB on machine#3 will get requests from the client. 

      machine#3 will then load balance the client requests to machine#1 and machine#2 in a round robin fashion.

       

       

      Can I get this example to work with JBoss 7.1.0.Final?

          

       

      Any and all help is greatly appreciated.

       

      Thanks.

        • 1. Re: AS 7.1.0.Final Clustering Example
          Riccardo Pasquini Novice

          Hi, try to give a look at https://community.jboss.org/message/641785#641785

           

          the four issues highlighted by Rado seem to be closed so the round robin behaviour should be up and running

           

          bye

          • 2. Re: AS 7.1.0.Final Clustering Example
            Joseph Fouts Novice

            Hi Ricaardo,  Thanks for the info.

             

            I can't even get round robin to work with the EJB invocations from a remote client using JNDI example.

             

              Here is the link to the thread that I started.  https://community.jboss.org/message/717679#717679

              Could this be a bug or I am expecting something that should not be occurring?

             

             

            What I really want is an example of how I would access a clustered SLSB from another SLSB from within the container using jboss 7. 

            It took me a while to finally figure out how to get it to work with 5.1.  Now that I want to upgrade to 7.1 I am back in the

            same boat in trying to figure out how to get it to work.

             

            In Jboss 5.1 here is who I got the initial context:

             

               Properties p = new Properties();  

                     p.put(Context.INITIAL_CONTEXT_FACTORY,  

                             "org.jnp.interfaces.NamingContextFactory");

                     p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");

                    

                     String partitionName = System.getProperty("jboss.partition.name", "clusterPartition2");

                     p.put("jnp.partitionName", partitionName);         

                          

                     try

                     {

                        ctx = new InitialContext(p);

                     }

                     catch (Exception e)

                     {

                        processSW = false;

                        System.out.println("Return from bean process method with exception" + qName);

                        LIDP_Logger.error(this);

                        e.printStackTrace();

                     }

             

             

            clientPartition2 was setup as the cluster that I had setup with 4 servers from our network and everything worked fine. 

            With the above code I was able to get the calls to the envocation to my SLSB to

            occur with the round robin load balance.  Meaning a call to server 1... server 2... server 3 .... server 4 ...

             

            Can someone just tell me how I would accomplish the same using Jboss 7?

            Rado pointed out an outstanding bug with SFSB but I'm not sure if this is also a problem with SLSB's.

            If this is indeed an outstanding issue can someone please let me know. 

            And in the case of an outstanding issue what is the general time frame in getting it resolved or supported?

             

            Thanks.