<!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;">&#160;</p><p>from ra.xml:</p><table><tbody><tr><td style=";">&#160; </td><td style=";">&lt;inbound-resourceadapter&gt;</td></tr><tr><td style=";">&#160;&#160;&#160; </td><td style=";">&lt;messageadapter&gt;</td></tr><tr><td style=";">&#160;&#160;&#160;&#160;&#160;&#160; </td><td style=";">&lt;messagelistener&gt;</td></tr><tr><td style=";">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </td><td style=";">&lt;messagelistener-type&gt;</td></tr><tr><td style=";">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </td><td style=";">javax.jms.MessageListener</td></tr><tr><td style=";">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </td><td style=";">&lt;/messagelistener-type&gt;</td></tr><tr><td style=";">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </td><td style=";">&lt;activationspec&gt;</td></tr><tr><td style=";">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </td><td style=";">&lt;activationspec-class&gt;</td></tr><tr><td style=";">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </td><td style=";">weblogic.jms.ra.ActivationSpecImpl</td></tr><tr><td style=";">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </td><td style=";">&lt;/activationspec-class&gt;</td></tr><tr><td style=";">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </td><td style=";">&lt;required-config-property&gt;</td></tr><tr><td style=";">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </td><td style=";">&lt;config-property-name&gt;<strong>ConnectionFactory</strong>&lt;/config-property-name&gt;</td></tr><tr><td style=";">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </td><td style=";">&lt;/required-config-property&gt;</td></tr><tr><td style=";">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </td><td style=";">&lt;required-config-property&gt;</td></tr><tr><td style=";">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </td><td style=";">&lt;config-property-name&gt;<strong>Destination</strong>&lt;/config-property-name&gt;</td></tr><tr><td style=";">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </td><td style=";">&lt;/required-config-property&gt;</td></tr><tr><td style=";">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </td><td style=";">&lt;required-config-property&gt;</td></tr><tr><td style=";">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </td><td style=";">&lt;config-property-name&gt;<strong>DestinationType</strong>&lt;/config-property-name&gt;</td></tr><tr><td style=";">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </td><td style=";">&lt;/required-config-property&gt;</td></tr></tbody></table><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</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;">&#160;</p><p>@MessageDriven(</p><p>&#160;&#160;&#160; name="MyMdb",</p><p>&#160;&#160;&#160; activationConfig = {</p><p>&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName = "<strong>ConnectionFactory</strong>",</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; propertyValue = "java:jboss/wljmsra/cf"),</p><p>&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName = "<strong>DestinationType</strong>",</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; propertyValue = "javax.jms.Queue"),</p><p>&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName = "<strong>Destination</strong>",</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; propertyValue = "java:jboss/wljmsra/queue2"),</p><p>&#160;&#160;&#160;&#160;&#160;&#160; @ActivationConfigProperty(propertyName = "<strong>MessageSelector</strong>",</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; propertyValue = "Recipient = 'MDB'"),</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; })</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</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;">&#160;</p><p>WARN&#160; [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;">&#160;</p><p>The only way I can work around this is to add MessageSelector to my ra.xml as a required-config-property.&#160;&#160; </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I can also add other required-config-property elements and not assign values to them in my MDB's @ActivationConfigProperty.&#160; 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;">&#160;</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;">&#160;</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;">&#160;</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.&#160; 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>