3 Replies Latest reply on Feb 25, 2005 2:03 PM by Dustin Barlow

    MDB JMX name changes btwn 3.2.4 and 3.2.7?

    Dustin Barlow Newbie

      In upgrading from 3.2.4 to 3.2.7 and have discovered that the JMX service names for MDBs have changed.

      In 3.2.4 it was:

      jboss.j2ee:binding=workflow-invoker-heavy-weight-mdb,jndiName=local/InvokerHWMDB,plugin=invoker,service=EJB


      In 3.2.7 it is:

      jboss.j2ee:binding=workflow-invoker-heavy-weight-mdb,jndiName=local/InvokerHWMDB@11947822,plugin=invoker,service=EJB


      The issue I have is that I have a custom JMX administrative component that is used to manage the MaxPoolSize MDB settings at run-time and thus my JMX component requires that the MDB(s) are deployed first prior to my JMX component starting.

      In 3.2.4, I solved the dependency via XDoclet by simply adding the following to my custom MBean class.

      * @jboss.depends object-name="jboss.j2ee:binding=workflow-invoker-heavy-weight-mdb,jndiName=local/InvokerHWMDB,plugin=invoker,service=EJB"
      


      It appears that in 3.2.7, the server is appending a random number to the jndiName section of the MDB JMX name. This prevents me from being able to reference that service as a dependency since the appended number changes on each restart of the application. Why was this number added and can it be turned off so that the name is static?

      If this cannot be turned off, what is the new sanctioned way to make JMX service calls to the deployed MDBs?

      Thanks

        • 1. Re: MDB JMX name changes btwn 3.2.4 and 3.2.7?
          Scott Stark Master

          This issue in the release notes describes the change:
          [JBAS-275] - 2 identical named mdbs cannot deploy
          http://jira.jboss.com/jira/browse/JBAS-275?page=comments

          If you need a fixed local jndi name you would have to use a local-jndi-name in the jboss.xml descriptor. The JSR-77 name should be updated to breakup the fixed vs random part into seperate

          jboss.j2ee:binding=workflow-invoker-heavy-weight-mdb,jndiName=local/InvokerHWMDB,id=11947822,plugin=invoker,service=EJB

          So that a pattern like this could be used:
          jboss.j2ee:binding=workflow-invoker-heavy-weight-mdb,jndiName=local/InvokerHWMDB,plugin=invoker,service=EJB,*

          • 2. Re: MDB JMX name changes btwn 3.2.4 and 3.2.7?
            Dustin Barlow Newbie

            Thanks for the info. However, non of my MDB share the same names.

            Here the are in 3.2.4:

            binding=workflow-invoker-heavy-weight-mdb,jndiName=local/InvokerHWMDB,plugin=invoker,service=EJB
            binding=workflow-invoker-light-weight-mdb,jndiName=local/InvokerLWMDB,plugin=invoker,service=EJB
            binding=workflow-invoker-normal-weight-mdb,jndiName=local/InvokerMDB,plugin=invoker,service=EJB
            binding=workflow-message-driven-bean-max1,jndiName=local/ReturnerMDB,plugin=invoker,service=EJB
            binding=workflow-message-driven-bean-max1-dlq,jndiName=local/WorkflowDLQMDB,plugin=invoker,service=EJB
            binding=workflow-submit-spec-mdb,jndiName=local/SubmitSpecMDB,plugin=invoker,service=EJB


            and here they are again in 3.2.7:

            binding=workflow-invoker-heavy-weight-mdb,jndiName=local/InvokerHWMDB@11947822,plugin=invoker,service=EJB
            binding=workflow-invoker-light-weight-mdb,jndiName=local/InvokerLWMDB@4290768,plugin=invoker,service=EJB
            binding=workflow-invoker-normal-weight-mdb,jndiName=local/InvokerMDB@22973093,plugin=invoker,service=EJB
            binding=workflow-message-driven-bean-max1,jndiName=local/ReturnerMDB@15434767,plugin=invoker,service=EJB
            binding=workflow-message-driven-bean-max1-dlq,jndiName=local/WorkflowDLQMDB@14627758,plugin=invoker,service=EJB
            binding=workflow-submit-spec-mdb,jndiName=local/SubmitSpecMDB@32525990,plugin=invoker,service=EJB




            • 3. Re: MDB JMX name changes btwn 3.2.4 and 3.2.7?
              Dustin Barlow Newbie

              Sorry for the confusion on my part. I was distracted by the jira link you posted that was referring to two MDBs in different jars with the same name.

              Adding <local-jndi-name> to the jboss.xml as you described, got rid of the random number on the JMX service name.

               <message-driven>
               <ejb-name>InvokerMDB</ejb-name>
               <destination-jndi-name>queue/invoke</destination-jndi-name>
               <configuration-name>Workflow Invoker Normal Weight MDB</configuration-name>
               <local-jndi-name>local/InvokerMDB</local-jndi-name>
               </message-driven>
              



              Unfortunately, XDoclet doesn't support (or at least I haven't figured out how yet) to add the local-jndi-name to the jboss.xml for an MDB. The local-jndi-name token is available as an attribute of the @ejb.bean XDoclet tag. However, that only applies to SSB, SB and Entities, not MDBs.

              Thanks for the help.