3 Replies Latest reply on Apr 8, 2009 7:35 AM by Jeff Mesnil

    Simplifying the JBM beans deployment

    Tim Fox Master

      I came across an issue when writing an automatic failover example using JMS.

      Currently when we start a backup node, it doesn't actually activate until its live node has contacted it and told it to activate, this is because the live node needs to send it it's node id since live and backup must have the same node id.

      However with the way beans are currently created in the jbm-standalone-beans.xml file. The deployers are created and injected and everything is started, but this means the deployers start deploying stuff on the backup node before the live node has activated it, so it fails.

      I'm considering simplifying our beans file and removing most of the beans, so we really just have MessagingServerBean and a JMSServerBean. All the deployers, configuration etc can just be internal objects of this beans and do not have to be exposed in the beans file.

      We can then control the dependent beans lifecycles directly from inside MessagingServerBean/JMSServerBean.

      Comments please?

        • 1. Re: Simplifying the JBM beans deployment
          Jeff Mesnil Master

          there are 4 beans which may still need to be injectable from the configuration file:

          - JBMSecurityManager
          - MBeanServer
          - JNDIServer
          - Naming

          We have our own implementations when running in standalone but these beans will have to change their implementation when we run JBM in JBoss AS 5 (i'm not sure that'll be the case for the 2 jndi pojos but they also define properties in the configuration file)

          All the others are implementation specific and do not really need to be exposed from the conf.

          • 2. Re: Simplifying the JBM beans deployment
            Tim Fox Master

            JNDIServer is completely independent so shouldn't need to be injected anywhere.

            What's Naming? Can't see it in jbm-standalone-beans.xml

            JBMSecurityManager, yes, this can remain injectable

            MBeanServer yes also.

            • 3. Re: Simplifying the JBM beans deployment
              Jeff Mesnil Master

               

              "timfox" wrote:
              JNDIServer is completely independent so shouldn't need to be injected anywhere.
              What's Naming? Can't see it in jbm-standalone-beans.xml


              Naming is the 1st bean defined in jbm-standalone-beans.xml
              As you said, both jndi beans are already independent.

              So it leaves only 2 beans to be injectable:
              - JBMSecurityManager
              - MBeanServer