4 Replies Latest reply on Jun 13, 2012 4:54 PM by Bashir Wichka

    Clustering in StandAlone Mode

    Bashir Wichka Newbie

      I have setup two servers in the standalone mode on two different servers and started both of them using stanalone-ha.xml. I can't see them forming cluster. Because client doesnt fall to second server when the one it was connected to is brought down. I would assume that when the primiary server to which client is connected is brought down the client should connect to the second server in the cluster. I am not even sure if the two servers recognize that they are in cluster. Spend lot of time in trying it out, would appreciate any response or some piece of documentation which would help in this.


      Client is connecting to Server using JNDI using clustered STATELESS session beans.




        • 1. Re: Clustering in StandAlone Mode
          jaikiran pai Master

          Which AS7 version? What does the client code look like? What does the bean code look like?

          • 2. Re: Clustering in StandAlone Mode
            Bashir Wichka Newbie

            I am using AS 7.1.0  and the client code looks up the Stateless Session Clustered bean, using notation


            final Hashtable jndiProperties = new Hashtable();
            jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
            final Context context = new InitialContext(jndiProperties);


            context .lookup("ejb:/jboss-as-ejb-remote-app//PingBean!com.anc.as.server.ejb.remote.stateless.RemotePingBean");


            and used jboss-ejb-client.properties where hostname A ( only) is mentioned.


            I am not sure how do I choose to create cluster 1 having A and B nodes  and cluster 2 with C and D nodes. And also failover doesn't work. If A fails clients doesnt fall to another node (e.g B) in the cluster.




            • 3. Re: Clustering in StandAlone Mode
              jaikiran pai Master

              Please try the latest nightly build https://community.jboss.org/thread/167590. It should be fixed there. We had a couple of issues which were fixed post 7.1.0.Final and 7.1.1.Final:




              • 4. Re: Clustering in StandAlone Mode
                Bashir Wichka Newbie

                Hi JaiKiran,


                The latest Jboss fixed the issue of clustering but my bindingings are not working any more.  I am getting error :

                16:25:17,403 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 42) JBAS014613: Operation ("add") failed - address: ([
                    ("subsystem" => "naming"),
                    ("binding" => "queue_mbQueue")
                ]) - failure description: "JBAS011864: Invaliding binding name queue_mbQueue, name must start with one of [java:global, java:jboss, java:/]"

                when my naming subsystem looks like this :


                <subsystem xmlns="urn:jboss:domain:naming:1.2">
                                <simple name="queue_mbQueue" value="real_queue"/>



                This was working perfectly fine with jboss AS 7.1.0 final but 7.2..Alpha it is working any more.


                Can you comment on this please?