<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
trying to understand JBoss ra.xml required-config-property for inbound
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/jleinawe">jleinawe</a> in <i>IronJacamar</i> - <a href="https://community.jboss.org/message/725194#725194">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>My resource-adapter has 3 required-config-property elements</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>from ra.xml:</p><table><tbody><tr><td style=";">  </td><td style=";"><inbound-resourceadapter></td></tr><tr><td style=";">    </td><td style=";"><messageadapter></td></tr><tr><td style=";">       </td><td style=";"><messagelistener></td></tr><tr><td style=";">          </td><td style=";"><messagelistener-type></td></tr><tr><td style=";">             </td><td style=";">javax.jms.MessageListener</td></tr><tr><td style=";">          </td><td style=";"></messagelistener-type></td></tr><tr><td style=";">          </td><td style=";"><activationspec></td></tr><tr><td style=";">             </td><td style=";"><activationspec-class></td></tr><tr><td style=";">                </td><td style=";">weblogic.jms.ra.ActivationSpecImpl</td></tr><tr><td style=";">             </td><td style=";"></activationspec-class></td></tr><tr><td style=";">             </td><td style=";"><required-config-property></td></tr><tr><td style=";">                </td><td style=";"><config-property-name><strong>ConnectionFactory</strong></config-property-name></td></tr><tr><td style=";">             </td><td style=";"></required-config-property></td></tr><tr><td style=";">             </td><td style=";"><required-config-property></td></tr><tr><td style=";">                </td><td style=";"><config-property-name><strong>Destination</strong></config-property-name></td></tr><tr><td style=";">             </td><td style=";"></required-config-property></td></tr><tr><td style=";">             </td><td style=";"><required-config-property></td></tr><tr><td style=";">                </td><td style=";"><config-property-name><strong>DestinationType</strong></config-property-name></td></tr><tr><td style=";">             </td><td style=";"></required-config-property></td></tr></tbody></table><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>My ra implemetation supports optional config-properties, such as MessageSelector that I specify in the MDB source</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>@MessageDriven(</p><p>    name="MyMdb",</p><p>    activationConfig = {</p><p>       @ActivationConfigProperty(propertyName = "<strong>ConnectionFactory</strong>",</p><p>                                 propertyValue = "java:jboss/wljmsra/cf"),</p><p>       @ActivationConfigProperty(propertyName = "<strong>DestinationType</strong>",</p><p>                                 propertyValue = "javax.jms.Queue"),</p><p>       @ActivationConfigProperty(propertyName = "<strong>Destination</strong>",</p><p>                                 propertyValue = "java:jboss/wljmsra/queue2"),</p><p>       @ActivationConfigProperty(propertyName = "<strong>MessageSelector</strong>",</p><p>                                 propertyValue = "Recipient = 'MDB'"),</p><p>        })</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>When I deploy, I get this warning and my MDB's MessageSelector is ignored.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>WARN  [org.jboss.ejb3] (MSC service thread 1-1) JBAS014105: ActivationConfigProperty MessageSelector will be ignored since it is not allowed by resource adapter: wljmsra</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>The only way I can work around this is to add MessageSelector to my ra.xml as a required-config-property.   </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>while the app-server is not required to enforce "required-config-property", the app-server and deployment tools are allowed to do so.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>JCA Section 12.4.2.2: "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."</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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".</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/725194#725194">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in IronJacamar at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2098">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>