1 Reply Latest reply on Mar 21, 2012 8:06 AM by Jesper Pedersen

    trying to understand JBoss ra.xml required-config-property for inbound

    jleinawe Newbie

      My resource-adapter has 3 required-config-property elements


      from ra.xml:




      My ra implemetation supports optional config-properties, such as MessageSelector that I specify in the MDB source




          activationConfig = {

             @ActivationConfigProperty(propertyName = "ConnectionFactory",

                                       propertyValue = "java:jboss/wljmsra/cf"),

             @ActivationConfigProperty(propertyName = "DestinationType",

                                       propertyValue = "javax.jms.Queue"),

             @ActivationConfigProperty(propertyName = "Destination",

                                       propertyValue = "java:jboss/wljmsra/queue2"),

             @ActivationConfigProperty(propertyName = "MessageSelector",

                                       propertyValue = "Recipient = 'MDB'"),




      When I deploy, I get this warning and my MDB's MessageSelector is ignored.


      WARN  [org.jboss.ejb3] (MSC service thread 1-1) JBAS014105: ActivationConfigProperty MessageSelector will be ignored since it is not allowed by resource adapter: wljmsra


      The only way I can work around this is to add MessageSelector to my ra.xml as a required-config-property.  


      I can also add other required-config-property elements and not assign values to them in my MDB's @ActivationConfigProperty.  This seems to defeat the purpose of having to identify "required"-config-property elements for inbound in ra.xml.


      while the app-server is not required to enforce "required-config-property", the app-server and deployment tools are allowed to do so.


      JCA Section "The resource adapter may also provide in its deployment descriptor, using the required-config-property element, an optional list of configuration property names required for each activation specification. This information may be used during deployment to ensure that the required configuration properties are specified."


      So while adding all of the RA's optional activation spec properties as "required-config-property"s in ra.xml might be a work-around for vanilla JBoss, it would make the RA non-JCA-compliant and may cause failures on other app-servers or when using various deployment tools.  Even on JBoss it may cause problems if the user is using a deployment tool that enforces "required-config-property".