1 Reply Latest reply on Oct 22, 2007 7:02 AM by liu jw

    How to configure two ManagedFactorys in ra.xml of one resour

    liu jw Newbie

      Hello:
      I write two ManageFactorys in one resoure adapter to finish diffirent function. Although I know how to configure these ManagedFactorys separately as follows:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE connector PUBLIC '-//Sun Microsystems, Inc.//DTD Connector 1.0//EN' 'http://java.sun.com/dtd/connector_1_0.dtd'>
      
      <connector>
       <display-name>FileRA</display-name>
       <vendor-name>HELLKING</vendor-name>
       <spec-version>1.0</spec-version>
       <eis-type>NO TRANS</eis-type>
       <version>1.2</version>
       <resourceadapter>
       <managedconnectionfactory-class>com.jca.FileManagedConnectionFactory</managedconnectionfactory-class>
       <connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>
       <connectionfactory-impl-class>com.jca.FileConnectionFactoryImpl</connectionfactory-impl-class>
       <connection-interface>com.jca.FileConnection</connection-interface>
       <connection-impl-class>com.jca.FileConnectionImpl</connection-impl-class>
       <transaction-support>NoTransaction</transaction-support>
       <config-property>
       <config-property-name>Server</config-property-name>
       <config-property-type>java.lang.String</config-property-type>
       <config-property-value>localhost</config-property-value>
       </config-property>
       <config-property>
       <config-property-name>Port</config-property-name>
       <config-property-type>java.lang.Integer</config-property-type>
       <config-property-value>2008</config-property-value>
       </config-property>
       <authentication-mechanism>
       <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
       <credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
       </authentication-mechanism>
       <reauthentication-support>false</reauthentication-support>
       </resourceadapter>
      </connector>


      <?xml version='1.0' encoding='UTF-8'?>
      <connector
       xmlns="http://java.sun.com/xml/ns/j2ee"
       version="1.5"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
       >
       <display-name>OutboundLoanRa</display-name>
       <vendor-name>Vendor Name</vendor-name>
       <eis-type>EIS Type</eis-type>
       <resourceadapter-version>1.5</resourceadapter-version>
       <license>
       <license-required>false</license-required>
       </license>
       <resourceadapter>
       <outbound-resourceadapter>
       <connection-definition>
       <managedconnectionfactory-class>examples.integration.out_loan_ra.ManagedConnectionFactoryImpl</managedconnectionfactory-class>
       <connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>
       <connectionfactory-impl-class>examples.integration.out_loan_ra.ConnectionFactoryImpl</connectionfactory-impl-class>
       <connection-interface>javax.resource.cci.Connection</connection-interface>
       <connection-impl-class>examples.integration.out_loan_ra.ConnectionImpl</connection-impl-class>
       </connection-definition>
       <transaction-support>LocalTransaction</transaction-support>
       <reauthentication-support>false</reauthentication-support>
       </outbound-resourceadapter>
       </resourceadapter>
      </connector>


      How can I put them in one ra.xml?

        • 1. Re: How to configure two ManagedFactorys in ra.xml of one re
          liu jw Newbie

          Hello:
          I now answer this question by myself. If someone who meets the same problem, I hope it can help you.

          <?xml version="1.0" encoding="UTF-8"?>
          <connector xmlns="http://java.sun.com/xml/ns/j2ee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           version="1.5"
           >
          <!-- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"-->
           <display-name>FileRA</display-name>
           <vendor-name>Vendor Name</vendor-name>
           <eis-type>EIS Type</eis-type>
           <resourceadapter-version>1.5</resourceadapter-version>
          
           <resourceadapter>
           <resourceadapter-class/>
           <outbound-resourceadapter>
           <connection-definition>
           <managedconnectionfactory-class>com.jca.FileManagedConnectionFactory</managedconnectionfactory-class>
           <connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>
           <connectionfactory-impl-class>com.jca.FileConnectionFactoryImpl</connectionfactory-impl-class>
           <connection-interface>com.jca.FileConnection</connection-interface>
           <connection-impl-class>com.jca.FileConnectionImpl</connection-impl-class>
           <config-property>
           <config-property-name>Server</config-property-name>
           <config-property-type>java.lang.String</config-property-type>
           <config-property-value>localhost</config-property-value>
           </config-property>
           <config-property>
           <config-property-name>Port</config-property-name>
           <config-property-type>java.lang.Integer</config-property-type>
           <config-property-value>2008</config-property-value>
           </config-property>
           <authentication-mechanism>
           <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
           <credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
           </authentication-mechanism>
           </connection-definition>
          
           <connection-definition>
           <managedconnectionfactory-class>com.raredllra.ManagedConnectionFactoryImpl</managedconnectionfactory-class>
           <connectionfactory-interface>com.ratedllra.ConnectionFactory</connectionfactory-interface>
           <connectionfactory-impl-class>com.ratedllra.ConnectionFactoryImpl</connectionfactory-impl-class>
           <connection-interface>javax.resource.cci.Connection</connection-interface>
           <connection-impl-class>com.ratedllra.ConnectionImpl</connection-impl-class>
           </connection-definition>
          
           <transaction-support>LocalTransaction</transaction-support>
           <reauthentication-support>false</reauthentication-support>
           </outbound-resourceadapter>
           </resourceadapter>
          
          </connector>