2 Replies Latest reply on Mar 5, 2012 1:08 PM by gwwallace

    Clustered EJB - JNDI lookup

    gwwallace

      The new Clustered EJB doc (https://docs.jboss.org/author/display/AS71/Clustered+EJBs)  says that you have to tell your client the host/port of a server to connect to in a cluster in order for it to receive info about the cluster.

      What happens when that server instance is down ? Previously you could do a ha JNDI lookup and avoid having to name a server. How do you do the same with 7.1 ?

        • 1. Re: Clustered EJB - JNDI lookup
          rhusar

          Actually the behaviour is the same. Just specify all the servers in the client properties file. If will try to connect to a live one if the other specified are dead/down.

           

          For instance I have in jboss-ejb-client.properties:

          remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false

           

          remote.connections=perf18,perf19,perf20,perf21

           

          remote.connection.perf18.host=perf18

          remote.connection.perf18.port=4447

          remote.connection.perf18.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false

          remote.connection.perf18.channel.options.org.jboss.remoting3.RemotingOptions.MAX_OUTBOUND_MESSAGES=100000

           

          remote.connection.perf19.host=perf19

          remote.connection.perf19.port=4447

          remote.connection.perf19.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false

          remote.connection.perf19.channel.options.org.jboss.remoting3.RemotingOptions.MAX_OUTBOUND_MESSAGES=100000

           

          remote.connection.perf20.host=perf20

          remote.connection.perf20.port=4447

          remote.connection.perf20.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false

          remote.connection.perf20.channel.options.org.jboss.remoting3.RemotingOptions.MAX_OUTBOUND_MESSAGES=100000

           

          remote.connection.perf21.host=perf21

          remote.connection.perf21.port=4447

          remote.connection.perf21.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false

          remote.connection.perf21.channel.options.org.jboss.remoting3.RemotingOptions.MAX_OUTBOUND_MESSAGES=100000

          and 2 of shich hosts are not even deployed yet. After you connect to one you will get a current cluster view.


          Rado

          • 2. Re: Clustered EJB - JNDI lookup
            gwwallace

            So there's no way to do it without knowing the names and ports of the servers ?