Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-8530

Message Driven Bean (EJB3.x) wizard generates incorrect annotattions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 4.0.1.Final
    • 3.2.0.Final
    • ejb3
    • None
    • Hide

      1. Create EJB3 Project
      2. Run 'EJB/Message Driven Bean (EJB3.x) wizard
      3. Fill, package name, class name, check JMS, select 'Queue' and enter 'queue' to be destination name
      4. Finish
      Current result:

      @MessageDriven(
      		activationConfig = { @ActivationConfigProperty(
      				propertyName = "destinationType", propertyValue = "javax.jms.Queue"
      		) }, 
      		mappedName = "queue")
      public class MyMdb implements MessageListener {
      

      Field 'queue' is generated as 'mappedName' which is not correct. Mapped name should not be generated. (It is the name of the bean to be referenced/injected and by default it is derived by class name). And destination name should be generated by another 'ActivationConfigProperty' annotation.

      Expected result is:

      @MessageDriven(
      		activationConfig = { @ActivationConfigProperty(
      				propertyName = "destinationType", propertyValue = "javax.jms.Queue"
      		),@ActivationConfigProperty(
      				propertyName = "destination", propertyValue = "queue"
      		)  })
      public class MyMdb implements MessageListener {
      
      Show
      1. Create EJB3 Project 2. Run 'EJB/Message Driven Bean (EJB3.x) wizard 3. Fill, package name, class name, check JMS, select 'Queue' and enter 'queue' to be destination name 4. Finish Current result: @MessageDriven( activationConfig = { @ActivationConfigProperty( propertyName = "destinationType" , propertyValue = "javax.jms.Queue" ) }, mappedName = "queue" ) public class MyMdb implements MessageListener { Field 'queue' is generated as 'mappedName' which is not correct. Mapped name should not be generated. (It is the name of the bean to be referenced/injected and by default it is derived by class name). And destination name should be generated by another 'ActivationConfigProperty' annotation. Expected result is: @MessageDriven( activationConfig = { @ActivationConfigProperty( propertyName = "destinationType" , propertyValue = "javax.jms.Queue" ),@ActivationConfigProperty( propertyName = "destination" , propertyValue = "queue" ) }) public class MyMdb implements MessageListener {
    • Hide

      Remove mappedName = "queueName" and add in
      @ActivationConfigProperty(propertyName = "destination", propertyValue = "queueName") instead.

      Show
      Remove mappedName = "queueName" and add in @ActivationConfigProperty(propertyName = "destination", propertyValue = "queueName") instead.
    • Not Required

    Attachments

      Issue Links

        Activity

          People

            rob.stryker Rob Stryker (Inactive)
            lzoubek Libor Zoubek (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: