1 Reply Latest reply on Aug 30, 2013 12:14 PM by Anil Allewar

    Recovery plugin not getting invoked with JBoss EAP6.1.0Alpha

    Anil Allewar Newbie

      Hi,

       

      I have a custom resource adapter and have writter a recover-plugin class for it. This used to work fine with JBoss AS 7.1.1 final and the recover plugin class was getting called. However with JBoss EAP6.1.0Alpha, the custom RecoveryPlugin extension is not being called and EAP reverts to the default RecoveryPlugin which causes the connection to be closed every time. I checked up the "jboss-as-resource-adapters_1_1.xsd" file and it has the same structure as the 1.0 xsd. Can anyone tell me if something has to be done differently for JBoss EAP6.1.0?

       

      Here is the recovery tag definition under the connection-definition.

       

      {code:xml}

      <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">

                  <resource-adapters>

                      <resource-adapter>

                          <archive>

                              *connect.rar

                          </archive>

                          <transaction-support>XATransaction</transaction-support>

                          <connection-definitions>

                               <connection-definition class-name="*.*ManagedConnectionFactory" jndi-name="java:/OW5000/OW_TEIID_UTM14_USOF" enabled="true" use-java-context="true" pool-name="OW_TEIID_UTM14_USOF">

                                  <config-property name="project">

                                      **

                                  </config-property>

                                  <config-property name="sid">

                                      **

                                  </config-property>

                                  <security>

                                      <security-domain>**</security-domain>

                                  </security>

                                  <xa-pool>

                                      <min-pool-size>5</min-pool-size>

                                      <max-pool-size>10</max-pool-size>

                                  </xa-pool>

                                  <recovery no-recovery="false">

                                      <recover-plugin class-name="*.*RecoveryPlugin"/>

                                  </recovery>

                              </connection-definition>

                     </connection-definitions>

              </resource-adapter>

           </resource-adapters>

      </subsystem>

      {code}

        • 1. Re: Recovery plugin not getting invoked with JBoss EAP6.1.0Alpha
          Anil Allewar Newbie

          The issue seems to be with recover tag not using the parent security domain and explicitly needing "recover-credential" element under the "recovery" element. The "jboss-as-resource-adapters_1_1.xsd" file has the following information about the recover-credentials tag

           

          <xs:element name="recover-credential" type="credentialType" minOccurs="0" maxOccurs="1">
                  <xs:annotation>
                    <xs:documentation>
                      <![CDATA[[
                        Specifies the security options used when creating a connection during recovery.
                        Note: if this credential are not specified the security credential are used for recover too
                       ]]>
                    </xs:documentation>
                  </xs:annotation>
                </xs:element>
          

           

          This implies that if the recover credentials are not specified then security credentials should be used for recover and I don't need to specify it. This seems to be broken in JBoss EAP 6.1.0 (I am using Alpha but 6.1.0final also has the same issue); and was working in AS 7.1.1 final.

           

          Currently I am able to have the recover plugin getting called correctly by adding the recover-credential element under recover element.

           

          <recovery no-recovery="false">
                       <recover-credential>                                                                                                 
                                   <security-domain>****SecurityDomain</security-domain>
                       </recover-credential> 
                      <recover-plugin class-name="***.*RecoveryPlugin"/>
          </recovery>