4 Oracle WebLogic Server Deployment and Integration

This chapter describes Oracle WebLogic Server (OracleWLS) deployment and integration with Oracle Application Adapter for SAP R/3.

This chapter discusses the following topics:

Adapter Integration with Oracle WebLogic Server

Oracle Application Adapter for SAP R/3 is deployed within an OracleWLS container during installation. All client applications run within the OracleWLS environment. In J2CA deployment, the Common Client Interface (CCI) integrates an OracleWLS client application with a resource adapter.

Deployment of Adapter

Figure 4-1 shows deployment of the J2CA Connector to the Oracle Application Server. In a run-time service scenario, an Enterprise Java Bean, servlet, or Java program client makes CCI calls to J2CA resource adapters. The adapters process the calls as requests and send them to the EIS. The EIS response is then sent back to the client.

Figure 4-1 Oracle Application Server J2CA Architecture

JCA architecture
Description of "Figure 4-1 Oracle Application Server J2CA Architecture"

Updating Adapter Configuration

During the J2CA deployment of Oracle Application Adapter for SAP R/3, OracleWLS generates a deployment descriptor called ra.xml, located in:

C:\oracle\Middleware\Oracle_SOA1\soa\thirdparty\ApplicationAdapters\iwafjca.rar\META-INF

The OracleWLS deployment descriptor is located in the directory specified above.

Note:

Multiple managed connection factories are supported only for outbound processing (services).

Creating a Managed Connector Factory Object

The ra.xml descriptor provides OracleWLS-specific deployment information for resource adapters. For example, the jca_sample configuration in Application Explorer is represented in the ra.xml file 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>IWAFJCA10</display-name>  <vendor-name>IWAY Software</vendor-name>  <spec-version>1.0</spec-version>  <eis-type>IWAF</eis-type>  <version>1.0</version>  <license>    <license-required>false</license-required>  </license>  <resourceadapter>    <managedconnectionfactory-class>com.ibi.afjca.spi.IWAFManagedConnectionFactory</managedconnectionfactory-class>    <connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>    <connectionfactory-impl-class>com.ibi.afjca.cci.IWAFConnectionFactory</connectionfactory-impl-class>    <connection-interface>javax.resource.cci.Connection</connection-interface>    <connection-impl-class>com.ibi.afjca.cci.IWAFConnection</connection-impl-class>    <transaction-support>NoTransaction</transaction-support>    <config-property>      <config-property-name>AdapterName</config-property-name>      <config-property-type>java.lang.String</config-property-type>      <config-property-value></config-property-value>    </config-property>    <config-property>      <config-property-name>Config</config-property-name>      <config-property-type>java.lang.String</config-property-type>      <config-property-value></config-property-value>    </config-property>    <config-property>      <config-property-name>IWayHome</config-property-name>      <config-property-type>java.lang.String</config-property-type>      <config-property-value>C:\oracle\Middleware\Oracle_SOA1\soa\thirdparty\ApplicationAdapters</config-property-value>    </config-property>    <config-property>      <config-property-name>IWayConfig</config-property-name>      <config-property-type>java.lang.String</config-property-type>      <config-property-value>jca_sample</config-property-value>    </config-property>    <config-property>      <config-property-name>IWayRepoDriver</config-property-name>      <config-property-type>java.lang.String</config-property-type>      <config-property-value></config-property-value>    </config-property>    <config-property>      <config-property-name>IWayRepoURL</config-property-name>      <config-property-type>java.lang.String</config-property-type>      <config-property-value></config-property-value>    </config-property>    <config-property>      <config-property-name>IWayRepoUser</config-property-name>      <config-property-type>java.lang.String</config-property-type>      <config-property-value></config-property-value>    </config-property>    <config-property>      <config-property-name>IWayRepoPassword</config-property-name>      <config-property-type>java.lang.String</config-property-type>      <config-property-value></config-property-value>    </config-property>    <config-property>      <config-property-name>LogLevel</config-property-name>      <config-property-type>java.lang.String</config-property-type>      <config-property-value>DEBUG</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>true</reauthentication-support>  </resourceadapter></connector>

The parameters defined in the ra.xml file are described in the following table:

Parameter Name Description
IWayHome The base installation directory for the OracleWLS packaged application adapter.
IWayConfig The adapter configuration name as defined in Application Explorer. For example, Oracle Application Adapter for SAP R/3 has a preconfigured jca_sample configuration in Application Explorer.
IWayRepoURL The URL to use when opening a connection to the database. This is necessary only when using an Oracle database as the repository.
IWayRepoUser User name to use when connecting to the database. This is necessary only when using an Oracle database as the repository.
IWayRepoPassword Password. If provided, it overwrites configuration. This is necessary only when using an Oracle database as the repository.
loglevel It overwrites the level set by the ManagedConnectorFactory property.

Creating Multiple Managed Connector Factory Objects

To establish multiple managed connector factory objects, you must edit the weblogic-ra.xml file and add more <connection-instance> nodes. This file is located in:

C:\oracle\Middleware\Oracle_SOA1\soa\thirdparty\ApplicationAdapters\iwafjca.rar\META-INF

For example, the first jca_configuration in Application Explorer is represented in the weblogic-ra.xml file as follows:

<?xml version="1.0"?> <weblogic-connector xmlns="http://www.bea.com/ns/weblogic/90">    <enable-access-outside-app>true</enable-access-outside-app>    <enable-global-access-to-classes>true</enable-global-access-to-classes>    <outbound-resource-adapter>        <default-connection-properties>        <pool-params>                <initial-capacity>0</initial-capacity>        </pool-params>        <transaction-support>LocalTransaction</transaction-support>        </default-connection-properties>        <connection-definition-group>            <connection-factory-interface>javax.resource.cci.ConnectionFactory</connection-factory-interface>            <connection-instance>                <jndi-name>eis/OracleJCAAdapter/DefaultConnection</jndi-name>            </connection-instance>        </connection-definition-group>    </outbound-resource-adapter></weblogic-connector>

To create multiple managed connector factory objects, you must add new <connection-instance> nodes in the file. For example:

<?xml version="1.0"?> <weblogic-connector xmlns="http://www.bea.com/ns/weblogic/90">    <enable-access-outside-app>true</enable-access-outside-app>    <enable-global-access-to-classes>true</enable-global-access-to-classes>        <outbound-resource-adapter>        <default-connection-properties>        <pool-params>            <initial-capacity>0</initial-capacity>        </pool-params>        <transaction-support>LocalTransaction</transaction-support>        </default-connection-properties>        <connection-definition-group>            <connection-factory-interface>javax.resource.cci.ConnectionFactory</connection-factory-interface>            <connection-instance>                <jndi-name>eis/OracleJCAAdapter/DefaultConnection</jndi-name>            </connection-instance>            <connection-instance>                    <jndi-name>eis/OracleJCAAdapter/DefaultConnection1</jndi-name>                    <connection-properties>                      <properties>                 <property>                   <name>IWayHome</name>                     <value>C:\oracle\Middleware\Oracle_SOA1\soa\thirdparty\ApplicationAdapters</value>                       </property>                  <property>                   <name>IWayConfig</name>                   <value>jca_sample2</value>                 </property>                  <property>                       <name>IWayRepoURL</name>                          <value></value>                       </property>                  <property>                         <name>IWayRepoUser</name>                         <value></value>                     </property>                  <property>                         <name>IWayRepoPassword</name>                             <value></value>                     </property>                  <property>                         <name>LogLevel</name>                             <value>Debug</value>                        </property>                  </properties>                        </connection-properties>                  </connection-instance>            </connection-definition-group>    </outbound-resource-adapter></weblogic-connector>

If you do not specify a <property> element in the <connection-instance> section, the value is taken from the ra.xml file. You can specify the default properties in the ra.xml file and then override them as required in the weblogic-ra.xml file. In addition, note that the J2CA configuration (for example, jca_sample2) must be created in Application Explorer.

Note:

When you modify the ra.xml and weblogic-ra.xml files, the application server must be restarted. If the application server is running, stop the application server and then restart it.

In addition, the iwafjca.rar file must be redeployed in the Oracle WebLogic Administration Console to activate these changes.

Modifying WSDL Files for Additional Connection Factory Values

Application Explorer generates the J2CA properties file using the default connection factory name eis/OracleJCAAdapter/DefaultConnection. If you created additional connection factories, the WSDLs generated for the additional configuration and connection factory should be changed to reflect the location field of the jca:address section in the J2CA properties file. The default J2CA properties file for the Oracle Application Adapter for SAP R/3 with a configuration of isdsrv2_conn2 is shown in the following example.

Notice that the J2CA properties file has the following default connection factory: eis/OracleJCAAdapter/DefaultConnection

<jca:address location="eis/OracleJCAAdapter/DefaultConnection"        ConnectionSpec="com.ibi.afjca.cci.IWAFConnectionSpec"        cs.AdapterName="MySAP" cs.Config="isdsrv2_conn2" UIConnectionName="Connection1"/>

The connection factory value must be changed to the following: eis/OracleJCAAdapter/DefaultConnection1

For example:

<jca:address location="eis/OracleJCAAdapter/DefaultConnection1"                        ConnectionSpec="com.ibi.afjca.cci.IWAFConnectionSpec"                        cs.AdapterName="MySAP" cs.Config="isdsrv2_conn2" UIConnectionName="Connection1"/>

Note that only the value for the location field in the jca:address section should be modified. Do not modify any other field or section.