Extending the Domain for SOA Components 5-21
5.21 Enabling High Availability for Oracle File and FTP Adapters
The Oracle File and FTP Adapters enable a BPEL process or an Oracle Mediator to read and write files on local file systems and on remote file systems through FTP File
Transfer Protocol. These adapters support high availability for an active-active topology with Oracle BPEL Process Manager and Oracle Mediator service engines for
both inbound and outbound operations. To make Oracle File and FTP Adapters highly available for outbound operations, use the database mutex locking operation as
described in High Availability in Outbound Operations in Oracle Fusion Middleware Users Guide for Technology Adapters. The database mutex locking operation enables
these adapters to ensure that multiple references do not overwrite one another if they write to the same directory.
5.21.1 Using the Database Mutex Locking Operation
Use the following procedure to make an outbound Oracle File or FTP Adapter service highly available using database table as a coordinator:
1. Create Database Tables
You are not required to perform this step since the database schemas are pre-created as a part of soainfra.
2. Modify Deployment Descriptor for Oracle File Adapter
Modify Oracle File Adapter deployment descriptor for the connection-instance corresponding to eisHAFileAdapter from the Oracle WebLogic Server
console:
a.
Log into your Oracle WebLogic Server console. To access the console navigate to http:servername:portnumberconsole.
b. Click Deployments in the left pane for Domain Structure.
c. Click FileAdapter under Summary of Deployments on the right pane.
d. Click the Configuration tab.
e. Click the Outbound Connection Pools tab, and expand
javax.resource.cci.ConnectionFactory
to see the configured connection factories.
f. Click eisHAFileAdapter. The Outbound Connection Properties for the
connection factory corresponding to high availability is displayed.
Note: The operation described above is necessary only if your
application requires these adapters.
Note: The File Adapter picks up a file from the inbound directory,
processes it, and then outputs a file to the output directory. Because the File Adapter is non-transactional, files can be processed twice. As
a result, it is possible to get duplicate files when there is failover in the RAC backend or in the SOA managed servers.
Note: You must increase global transaction timeouts if you use
database as a coordinator.
5-22 Oracle Fusion Middleware Enterprise Deployment Guide for Oracle WebCenter
g.
The connection factory properties appear as shown in Figure 5–4
.
Figure 5–4 Oracle WebLogic Server Console - Settings for
javax.resource.cci.Connectionfactory Page
Click on Lock and Edit. After this, the property value column becomes editable you can click on any of the rows under Property Value and modify
its value.
The new parameters in connection factory for Oracle File and FTP Adapters are as follows:
controlDir: Set it to the directory structure where you want the control files to be stored. You must set it to a shared location if multiple WebLogic Server
instances run in a cluster. Structure the directory for shared storage as follows:
ORACLE_BASEadmindomain_namecluster_namefadapter inboundDataSource: Set the value to jdbcSOADataSource. This is the
data source, where the schemas corresponding to high availability are pre-created. The pre-created schemas can be found under ORACLE_HOME
rcuintegrationsoainfrasqladaptercreateschema_adapter_ oracle.sql. If you want to create the schemas elsewhere, use this script. You
must set the inboundDataSource property accordingly if you choose a different schema.
outboundDataSource: Set the value to jdbcSOADataSource. This is the data source where the schemas corresponding to high availability are
pre-created. The pre-created schemas can be found under ORACLE_HOME rcuintegrationsoainfrasqladaptercreateschema_adapter_
oracle.sql. If you want to create the schemas elsewhere, use this script. You must set the outboundDataSource property if you choose to do so.
outboundDataSourceLocal: Set the value to jdbcSOALocalTxDataSource. This is the datasource where the schemas
corresponding to high availability are pre-created.
outboundLockTypeForWrite: Set the value to oracle if you are using Oracle Database. By default the Oracle File and FTP Adapters use an
Extending the Domain for SOA Components 5-23
in-memory mutex to lock outbound write operations. You must choose from the following values for synchronizing write operations:
memory: The Oracle File and FTP Adapters use an in-memory mutex to synchronize access to the file system.
oracle: The adapter uses Oracle Database sequence. db: The adapter uses a pre-created database table FILEADAPTER_MUTEX as
the locking mechanism. You must use this option only if you are using a schema other than the Oracle Database schema.
user-defined: The adapter uses a user-defined mutex. To configure the user-defined mutex, you must implement the mutex interface:
oracle.tip.adapter.file.Mutex and then configure a new binding-property with the name oracle.tip.adapter.file.mutex
and value as the fully qualified class name for the mutex for the outbound reference.
h. Click Save after you update the properties. The Save Deployment Plan page