Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-707

Use of <depends> on 2.1 MDB to control enabling/disabling consumption leads to NPE

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.3.0.GA, 4.2.0.GA_CP02
    • None
    • None
    • Workaround Exists
    • Hide

      Use of a BarrierController gets around the problem since it simply calls start/stop as appropriate and does not destroy the MDB MBean (and thus does not set the container reference to null).

      In addition, the problem does not exist for EJB3. The direct dependency seems to work correctly in the EJB3 case.

      Show
      Use of a BarrierController gets around the problem since it simply calls start/stop as appropriate and does not destroy the MDB MBean (and thus does not set the container reference to null). In addition, the problem does not exist for EJB3. The direct dependency seems to work correctly in the EJB3 case.

    Description

      The desired goal is to enable/disable MDB deployments by the deployment of another MBean on which the MDB's depend. So, for example, in the MDB's jboss.xml we have:

      <?xml version="1.0"?>
      <jboss>
      <enterprise-beans>
      <message-driven>
      <ejb-name>AnMDB</ejb-name>

      <depends>myDomain:service=SomeMBean</depends>

      ...
      </jboss>

      When you undeploy "SomeMBean" the dependent MDB's stop consuming, as expected. When you redeploy "SomeMBean" they get a NullPointerException while trying to access the internal "container" reference:

      14:11:08,052 WARN [ServiceController] Problem starting service jboss.j2ee:service=EJB,plugin=invoker,binding=jms-message-inflow-driven-bean,jndiName=local/LogBeanA@1882759
      java.lang.NullPointerException
      at org.jboss.ejb.plugins.inflow.JBossMessageEndpointFactory.startService(JBossMessageEndpointFactory.java:212)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      ...

      Note that you can stop/start the MBean without issue. The problem seems to be that when undeploying, the MBean destroy() sets the container reference to null. But, it is evidently not set unless the MDB is actually redeployed.

      Attachments

        Issue Links

          Activity

            People

              rhn-support-miclark Mike Clark
              rhn-support-miclark Mike Clark
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: