6 Replies Latest reply on Mar 8, 2005 8:25 PM by Jon Hinckley

    @Clustered in non-clustered setup

    Jens Elkner Apprentice

      Hi,

      I've read, that it is possible to make a bean cluster-aware by simple using the @Clustered annotation. Nice feature, so far.
      But when a user runs a non-clustered setup, the bean is useless because of an HAPartition Exception.
      So to have an application, which could be deployed to a none-clustered as well as a clustered setup, one has to maintain two codebases, which simply differ in one line (i.e. @Clustered).

      This is IMHO not very smart. Isn't it possible, to ignore the @Clustered annotation automatically in none-clustered setups, so that one can use the same package in clustered as well as none-clustered environments ?

        • 1. Re: @Clustered in non-clustered setup
          Bill Burke Master

          What is the HAException? I run our testsuite that has @Clustered beans on a single node.

          • 2. Re: @Clustered in non-clustered setup
            Jens Elkner Apprentice

            19:50:36,812 INFO [ProxyDeployer] no declared remote bindings
            19:50:36,812 INFO [ProxyDeployer] there is remote interfaces
            19:50:36,812 INFO [ProxyDeployer] default remote binding has jndiName of org.jboss.tutorial.clustering.common.Session
            19:50:36,813 ERROR [StatelessManager] Starting failed jboss.j2ee:service=EJB3,name=org.jboss.tutorial.clustering.bean.SessionBean
            javax.naming.NameNotFoundException: HAPartition not bound
            at org.jnp.server.NamingServer.getBinding(NamingServer.java:491)
            at org.jnp.server.NamingServer.getBinding(NamingServer.java:499)
            at org.jnp.server.NamingServer.getObject(NamingServer.java:505)
            at org.jnp.server.NamingServer.lookup(NamingServer.java:249)
            at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:544)
            at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:520)
            at javax.naming.InitialContext.lookup(InitialContext.java:351)
            at org.jboss.ejb3.stateless.StatelessClusterProxyFactory.start(StatelessClusterProxyFactory.java:72)
            at org.jboss.ejb3.ProxyDeployer.start(ProxyDeployer.java:89)
            ....
            19:50:36,827 INFO [ProxyDeployer] no declared remote bindings
            19:50:36,827 INFO [ProxyDeployer] there is remote interfaces
            19:50:36,827 INFO [ProxyDeployer] default remote binding has jndiName of org.jboss.tutorial.clustering.common.StatefulRemote
            19:50:36,828 ERROR [StatefulManager] Starting failed jboss.j2ee:service=EJB3,name=org.jboss.tutorial.clustering.bean.StatefulBean
            javax.naming.NameNotFoundException: HAPartition not bound
            at org.jnp.server.NamingServer.getBinding(NamingServer.java:491)
            at org.jnp.server.NamingServer.getBinding(NamingServer.java:499)
            at org.jnp.server.NamingServer.getObject(NamingServer.java:505)
            at org.jnp.server.NamingServer.lookup(NamingServer.java:249)
            at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:544)
            at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:520)
            ...
            19:50:37,623 INFO [EJB3Deployer] Deployed: file:/opt/jboss40/server/default/deploy/tutorial.ejb3
            19:50:37,625 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
            MBeans waiting for other MBeans:
            ObjectName: jboss.j2ee:service=EJB3,name=org.jboss.tutorial.clustering.bean.SessionBean
            state: FAILED
            I Depend On:
            Depends On Me: javax.naming.NameNotFoundException: HAPartition not bound
            ObjectName: jboss.j2ee:service=EJB3,name=org.jboss.tutorial.clustering.bean.StatefulBean
            state: FAILED
            I Depend On:
            Depends On Me: javax.naming.NameNotFoundException: HAPartition not bound

            MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM:
            ObjectName: jboss.j2ee:service=EJB3,name=org.jboss.tutorial.clustering.bean.SessionBean
            state: FAILED
            I Depend On:
            Depends On Me: javax.naming.NameNotFoundException: HAPartition not bound
            ObjectName: jboss.j2ee:service=EJB3,name=org.jboss.tutorial.clustering.bean.StatefulBean
            state: FAILED
            I Depend On:
            Depends On Me: javax.naming.NameNotFoundException: HAPartition not bound

            • 3. Re: @Clustered in non-clustered setup
              Bill Burke Master



              run -c all

              "all" has no overhead other than a slower boot time.

              • 4. Re: @Clustered in non-clustered setup
                Jens Elkner Apprentice

                Hmm, can't imagine, that this is the case. IMHO (as a rule of thumb) the more services are started, the more memory and resources like open files aka sockets will be used. E.g.
                IIOP and message queues.

                Further the ping pong messages are annoying and telling me, that there is something going on, which consumes cpu cycles and "bandwidth":

                23:38:26,809 WARN [UDP] discarded message from different group (Tomcat-Cluster). Sender was wh58-307:33082
                23:38:28,458 WARN [UDP] discarded message from different group (EJB3-entity-cache). Sender was wh58-307:33079
                23:38:39,291 WARN [UDP] discarded message from different group (Tomcat-Cluster). Sender was wh58-307:33082
                23:38:46,796 WARN [UDP] discarded message from different group (EJB3-entity-cache). Sender was wh58-307:33079
                23:38:55,093 WARN [UDP] discarded message from different group (Tomcat-Cluster). Sender was wh58-307:33082
                23:39:07,811 WARN [UDP] discarded message from different group (EJB3-entity-cache). Sender was wh58-307:33079
                23:39:13,806 WARN [UDP] discarded message from different group (Tomcat-Cluster). Sender was wh58-307:33082
                23:39:21,736 WARN [UDP] discarded message from different group (EJB3-entity-cache). Sender was wh58-307:33079
                23:39:26,293 WARN [UDP] discarded message from different group (Tomcat-Cluster). Sender was wh58-307:33082
                23:39:38,342 WARN [UDP] discarded message from different group (EJB3-entity-cache). Sender was wh58-307:33079
                ...

                • 5. Re: @Clustered in non-clustered setup
                  Bill Burke Master

                  you get get rid of those messages by removing the ejb3 entity cache XML file or by changing the port/ip MC addr.

                  • 6. Re: @Clustered in non-clustered setup
                    Jon Hinckley Newbie

                    Bill,

                    What Port/ip MC addr would one need to set those to?

                    I'm running a single homed suse 9.1 box.

                    Thanks