2 Replies Latest reply on Nov 6, 2006 3:33 PM by jasonc411

    EJB3 MDB with JBoss Messaging

    jaink

      Hi,

      I have some EJB3 MDBs which were working fine with JBoss 4.0.4.GA, JBoss Messaging1.0.1.CR5 and EJB3 RC8. The only issue was that I could not start/stop the MDBs using JMX. Reading through the forums it looked like this was fixed in RC9 build of EJB3.

      I installed the EJB3 RC9 using the ant script and followed the migration (RC8 - RC9) notes. On restarting initially got the error saying the jms-ra.rar was already registered. To fix that, copied the deploy/jms/jms-ra.rar to deploy/jms-ra.rar replacing the existing jms-ra.rar and deleted the jms directory.

      That got rid of that problem but I keep getting the following:


      MIPServer.jar,name=TestMDB,service=EJB3
      java.lang.NullPointerException
      at org.jboss.ejb3.mdb.MDB.getMessagingType(MDB.java:85)
      at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.resolveMessageL
      istener(JBossMessageEndpointFactory.java:241)
      at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.start(JBossMess
      ageEndpointFactory.java:184)
      at org.jboss.ejb3.mdb.MessagingContainer.startProxies(MessagingContainer
      .java:185)
      at org.jboss.ejb3.mdb.MessagingContainer.start(MessagingContainer.java:1
      51)
      at org.jboss.ejb3.mdb.MDB.start(MDB.java:126)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

      I am sure I am missing some step here but cannot find what exactly it is. MDB looks like the following

      @MessageDriven(activationConfig =
      {
      @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Topic"),
      @ActivationConfigProperty(propertyName="destination", propertyValue="topic/topicname"),
      @ActivationConfigProperty(propertyName="durability",propertyValue="Durable"),
      @ActivationConfigProperty(propertyName="clientId",propertyValue="ClientID"),
      @ActivationConfigProperty(propertyName="noLocal",propertyValue="true"),
      @ActivationConfigProperty(propertyName="subscriptionName",propertyValue="SubName")
      })


      Thanks for the help.

        • 1. Re: EJB3 MDB with JBoss Messaging
          jasonc411

          What does the first line of your exception say. Is it error for ActivationSpec class org.jboss....

          and is there a nested throwable IntrospectionException?

          • 2. Re: EJB3 MDB with JBoss Messaging
            jasonc411

            anyhow, sorry for the incomplete post. If that is the case, change your annotation from

            propertyName=durability

            to

            propertyName=subscriptionDurability

            I know this differes from the documentation, maybe something that should be submitted as a documentation bug.