Uploaded image for project: 'IronJacamar'
  1. IronJacamar
  2. JBJCA-1332

not possible to set all-upper-case ActivationConfigProperty

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • WildFly/IronJacamar 1.3.4.Final
    • Core
    • None
    • Workaround Exists
    • Hide

      use @ActivationConfigProperty(propertyName = "hA", propertyValue = "false")

      Show
      use @ActivationConfigProperty(propertyName = " hA ", propertyValue = "false")

    Description

      MDB
          @MessageDriven(name = "LocalResendingMdbFromQueueToQueue",
                  activationConfig = {
                          @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
                          @ActivationConfigProperty(propertyName = "destination", propertyValue = "jms/queue/InQueue"),
                          @ActivationConfigProperty(propertyName = "HA", propertyValue = "false")
                  })
          @TransactionManagement(value = TransactionManagementType.CONTAINER)
          @TransactionAttribute(value = TransactionAttributeType.REQUIRED)
          public class LocalResendingMdbFromQueueToQueue implements MessageListener {
      

      HA property is ignored because IJ can't find setter

      14:39:18,434 WARN  [org.jboss.as.ejb3] (MSC service thread 1-7) WFLYEJB0006: ActivationConfigProperty HA will be ignored since it is not allowed by resource adapter: activemq-ra
      

      ActivationSpec class is https://github.com/apache/activemq-artemis/blob/master/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java

      Setter for property HA is in parent class https://github.com/apache/activemq-artemis/blob/master/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ConnectionFactoryProperties.java#L154

      It happens because SimpleResourceAdapterRepository.java#L501 converts the first character after "set" to lower case. But that is not sufficient.

      According to JCA 1.7 specification ActivationSpec is JavaBean (spec. section 5.3.3) and JavaBean specification (spec. section 8.8) says

      Thus when we extract a property or event name from the middle of an existing Java name, we normally convert the first character to lower case. However to support the occasional use of all upper-case names, we check if the first two characters of the name are both upper case and if so leave it alone.

      So for example,
      "FooBah" becomes "fooBah"
      "Z" becomes "z"
      "URL" becomes "URL"

      We provide a method Introspector.decapitalize which implements this conversion rule.

      Maybe IJ could leverage Introspector class

      Attachments

        Activity

          People

            Unassigned Unassigned
            msimka@redhat.com Martin Simka
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: