2 Replies Latest reply: Aug 10, 2011 4:37 AM by jaikiran pai Branched to a new discussion. RSS

MDB support now available in AS7 upstream - Please test your apps

jaikiran pai Master

Those of you who have been waiting for MDB support in AS7, here's some good news. Earlier this week, we have added MDB support in AS7 upstream. We would like the community members to give the latest AS7 nightly builds a try http://community.jboss.org/thread/167590 and report any issues so that they can be fixed before 7.0.1.

 

We've already identified one issue with classloading and ObjectMessage (thanks to Prasad!) http://community.jboss.org/thread/170141?tstart=0 and are working on a fix.

 

Please test your MDBs against the latest AS7 builds and let us know how it goes. 

  • 1. Re: MDB support now available in AS7 upstream - Please test your apps
    Matthew Cheng Newbie

    I did the test with my MDB and a JMS client, it does work now. But the queue and connectionFactory name have to be changed before the success test. The previous queue and connectionFactory name is the same as the configuration files, like:

     

    queue/MO_MSGQ_BUSI

    RemoteConnectionFactory

    But now the prefix "java:jboss/jms/" must be added before them, so they should be:

     

    java:jboss/jms/queue/MO_MSGQ_BUSI

    java:jboss/jms/RemoteConnectionFactory

     

    So the MDB annotion should be changed like:

    @MessageDriven(activationConfig = {
      @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
      @ActivationConfigProperty(propertyName = "destination", propertyValue = "java:jboss/jms/queue/MO_MSGQ_BUSI"),
      @ActivationConfigProperty(propertyName = "DLQMaxResent", propertyValue = "0") })

     

     

    It seems that the JNDI name of the EJB and JMS service have been changed in AS7, which add the effort to migrate a exist project from AS5/6 to AS7. In my personal view, I do no think it is a god decision.

     

  • 2. Re: MDB support now available in AS7 upstream - Please test your apps
    jaikiran pai Master

    Matthew Cheng wrote:

     

    I did the test with my MDB and a JMS client, it does work now. But the queue and connectionFactory name have to be changed before the success test. The previous queue and connectionFactory name is the same as the configuration files, like:

     

    queue/MO_MSGQ_BUSI

    RemoteConnectionFactory

    But now the prefix "java:jboss/jms/" must be added before them, so they should be:

     

    java:jboss/jms/queue/MO_MSGQ_BUSI

    java:jboss/jms/RemoteConnectionFactory

     

    So the MDB annotion should be changed like:

    @MessageDriven(activationConfig = {
      @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
      @ActivationConfigProperty(propertyName = "destination", propertyValue = "java:jboss/jms/queue/MO_MSGQ_BUSI"),
      @ActivationConfigProperty(propertyName = "DLQMaxResent", propertyValue = "0") })

     

    You can still use any JNDI name under the java:/ namespace for the queue/topics and JMS objects. But if you don't specify the namespace, then it will be defaulted to java:jboss/jms/ for JMS objects.  So you can use java:/queue/MO_MSGQ_BUSI for your queue

     

    As for why this changed, see this discussion http://lists.jboss.org/pipermail/jboss-as7-dev/2011-July/002890.html