IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > FTP > Plan for adapter implementation
Prerequisites and Best Practices for using WebSphere Adapter for FTP
Recommended configuration settings
Configure timeout and connection pool settingsThe adapter works best if the FTP server timeout settings and the WebSphere Application Server connection pool settings are tuned to suit the business needs.
Following are some example scenarios that explain the recommended configuration settings.
- During inbound processing, if the value of the pollPeriod property of the FTP adapter is two minutes, then ensure that the FTP server connection timeout is greater than two minutes.
- If the adapter is invoked often (once every few minutes) for outbound processing, it is recommended that you maintain a minimum number of connections in the connection pool.
- If the adapter is invoked once in a few weeks, it is recommended that you maintain zero as the minimum number of connections in the pool to avoid stale connections.
For more information about the timeout and connection pool settings, see http://pic.dhe.ibm.com/infocenter/wasinfo/v8r0/topic/com.ibm.websphere.nd.doc/info/ae/ae/udat_conpoolset.html.
Configure connection retry propertiesThe connectionRetryLimit, connectionRetryInterval, retryLimit, retryInterval are the additional properties that can be used to work around the known environment issues.
For example, if there is any known communication problem with the FTP server during an inbound processing:
- set the value of the retryLimit property to zero (0) so that the adapter infinitely tries and connects to the FTP server.
- set the value of the retryInterval property according to connection timeout configured in the FTP server.
UNIX style output format from FTP server
The adapter is designed to work with the FTP servers whose file listing output matches with the standard UNIX style output format. If the FTP server file listing does not match the UNIX style output format, you can change the FTP server settings. If the server settings cannot be changed, it is recommended that you configure the adapter with custom parsers to parse the FTP server file listing.
While configuring the adapter, you can use the Custom parser class name property in the external service wizard to specify custom parser class name. Click Browse under Additional configuration to select the custom parser class name from the list available. For more information about custom parsers, see Adapter customization with Custom Parser Class.
Setting the right access permissions for the adapter
The adapter requires the right access permissions to connect and process the files at remote or local directories. If the access permissions are not set correctly, the adapter fails to connect to the target directories. For more information about checking the access permissions, see How to check for access permissions in an output, remote event, or remote archive directory?
Setting the data connection mode
The data connection mode used by the FTP server during the file transfer is either active or passive.
- When the adapter is behind a firewall, set the data connection mode as passive. The adapter initiates the data connection to the FTP server.
- When the FTP server is behind a firewall, set the data connection mode as active. The FTP server initiates the data connection to the adapter.
- When both the adapter and the FTP server are behind a firewall, set the data connection mode based on the firewall settings in your environment.
Also, ensure that the firewall(s) is not blocking the ports that the adapter or FTP server is trying to use for the data connection.
- The active or passive data connection mode is applicable only for the FTP protocol and not for the SFTP protocols.
- The data connection mode can be set using the FTP server connection mode property in the external service wizard.
Processing large volume of data
While processing large volume of data through the adapter, to improve the adapter performance, it is recommended that you periodically move or backup the files in the local and remote archive directory.
Use file masks
When multiple adapters are polling the same remote event directory on the FTP Server, to ensure that no two adapters are polling or accessing the same files, it is recommended that you specify different file masks for the adapters.
Sharing local event directory
When you use multiple adapters, it is recommended that the adapter uses a unique local event directory and do not share a local event directory between the adapters. However, in a clustered environment with a HA Active-Active configuration, the same local event directory must be shared between the clustered application. See Adapter not applying the file mask during recovery.
File-based operations
WebSphere Adapter for FTP is a file-based adapter and cannot be used for folder-based operations. To perform any operation on folders, it is recommended that you use the ExecuteFtpScript outbound operation.
Connecting to FTP server
In an outbound processing, WebSphere Adapter for FTP connects only to a single FTP server. To connect to different FTP servers, it is recommended that you use multiple adapter instances.