Start of Content Area

Function documentation Stand-Alone Deployment as RAR  Locate the document in its SAP Library structure

Use

The procedure for deploying your adapter as a resource adapter archive (RAR) must follow the rules described in the JCA specification.

Link to external website

The references refer to chapter 10 and particularly chapter 10.2 of the document J2EE Connector Architecture Specification, Final Version 1.0.

You can download this document at java.sun.com/j2ee/connector.

Features

An RAR typically contains the following:

META-INF\connector-j2ee-engine.xml

META-INF\log-configuration.xml

META-INF\Manifest.mf

META-INF\ra.xml

your_ra.jar

 

·        The connector-j2ee.engine.xml deployment descriptor (DD) is required to create references to other J2EE units, for example the Adapter Framework messaging service or the Adapter Framework CCI library.

Note

For a complete description, see the Java Reference Manual under Deployment Descriptors.

The content looks like this:

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE connector-j2ee-engine SYSTEM 'connector-j2ee-engine.dtd'>

 <connector-j2ee-engine>

  <loader-references>

    <loader-name>library:com.sap.aii.af.lib</loader-name>

    <loader-name>library:com.sap.aii.messaging.runtime</loader-name>

    <loader-name>library:com.sap.guid</loader-name>

    <loader-name>library:sapxmltoolkit</loader-name>

    <loader-name>library:com.sap.technology.basetech</loader-name>

    <loader-name>service:com.com.sap.aii.adapter.xi.svc</loader-name>

    <loader-name>service:com.sap.aii.af.cpa.svc</loader-name>

    <loader-name>service:com.sap.aii.af.svc</loader-name>

    <loader-name>interface:appcontext</loader-name>

  </loader-references>

 </connector-j2ee-engine>

·        You must add the log-configuration.xml if the optional Adapter Framework trace API is to be supported. See also: Tracing, Logging, and Monitoring

This makes the adapter trace objects known to the SAP J2EE server and contains default values for the logging settings.

The content looks like this:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE log-configuration SYSTEM "log-configuration.dtd">

<log-configuration>

     <log-formatters>

   <!-- This formatter produces human readable messages. -->

   <log-formatter name="trc" pattern="%26d %150l [%t] %10s: %m"

                       type="TraceFormatter"/>

    </log-formatters>

    <log-destinations>

    <!-- Destination for Trace Information of this ra com.sap.aii.af.sample.adapter.ra -->

         <log-destination count="5" effective-severity="DEBUG" limit="2000000" name="sample_ra.trc"

pattern="./log/applications/com.sap.aii.af.sample.adapter.ra/default.trc" type="FileLog">

         <formatter-ref name="trc"/>

   </log-destination>

    </log-destinations>

    <log-controllers>

        <!-- Trace Location com.sap.aii.af.sample.adapter.ra -->

      <log-controller name="com.sap.aii.af.sample.adapter.ra" effective-severity="DEBUG">

       <associated-destinations>

               <destination-ref association-type="LOG" name="sample_ra.trc"/>

</associated-destinations>

   </log-controller>

<!-- Logging Category: none, use the default XILog -->

    </log-controllers>

</log-configuration>

Note

You must replace the entries in bold in the above example with the specifications for your own adapter.

The name of the log controller must be identical to the package name.

·        The MANIFEST.MF file can be empty, but it must exist. It does not contain any information that is necessary for the deployment process. The RA.XML file follows the rules of the JCA specification. It could look like this:

<?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>sample_ra</display-name>

    <vendor-name>sap.com</vendor-name>

    <spec-version>1.0</spec-version>

    <eis-type>XI AF Sample Resource Adapter</eis-type>

    <version>1.4</version>

   

    <resourceadapter>

      <managedconnectionfactory-class>

        com.sap.aii.af.sample.adapter.ra.SPIManagedConnectionFactory

      </managedconnectionfactory-class>

      <connectionfactory-interface>

        javax.resource.cci.ConnectionFactory

      </connectionfactory-interface>

      <connectionfactory-impl-class>

        com.sap.aii.af.sample.adapter.ra.CCIConnectionFactory

      </connectionfactory-impl-class>

      <connection-interface>

        javax.resource.cci.Connection

      </connection-interface>

      <connection-impl-class>

        com.sap.aii.af.sample.adapter.ra.CCIConnection

      </connection-impl-class>

      <transaction-support>NoTransaction</transaction-support>

     

      <config-property>

        <config-property-name>addressMode</config-property-name>

        <config-property-type>java.lang.String</config-property-type>

        <config-property-value>CPA</config-property-value>

      </config-property>

      <config-property>

           <config-property-name>adapterType</config-property-name>

        <config-property-type>java.lang.String</config-property-type>

        <config-property-value>JCA</config-property-value>

      </config-property>

      <config-property>

        <config-property-name>adapterNamespace</config-property-name>

        <config-property-type>java.lang.String</config-property-type>

        <config-property-value>http://sap.com/xi/XI/sample</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>

 

The example shows a shortened resource adapter XML file for the Adapter Framework example resource adapter.

Note

You must replace the entries in bold in the above example with the specifications for your own adapter.

 

The adapter specifies NoTransactionbecause the adapter implements the transaction control itself. See: Asynchronous Messages

If the resource adapter is deployed in the stand-alone variant, your own Adapter Framework modules are not deployed. The default modules are used instead. Therefore, you must set the connectionfactory and connection interfaces to the CCI standard interfaces.

 

 

 

 

 

 

End of Content Area