In Sterling B2B Integrator
5,2.2 or higher, you can configure FTP Server adapter user exits.
About this task
Perform the following tasks to configure user exit points for the FTP Server adapter. The
interfaces are provided through separate files present in the
install_dir/install/userexit/jars
(install_dir\install\userexit\jars
for Windows) directory.
For more information on specific java method implementation details, see the Javadocs provided in
the <install>/userexit/docs directory.
Procedure
-
Write the code to implement the interface for the specific point.
-
Add the custom code classes to a .jar file.
-
Add the path of the .jar file to the dynamicclasspath.cfg
file in the
install_dir/install/properties
(install_dir\install\properties
for Windows) directory.
-
Restart Sterling B2B Integrator.
-
Open the
install_dir/properties/userexit
(install_dir\properties\userexit
for Windows) directory and locate FtpServerUserExits.xml
file.
-
Edit FtpServerUserExits.xml file and add an entry for each
implementation as shown. The user exits are run in the same order as they
appear.
<bean id="com.sterlingcommerce.woodstock.userexit.services.ftpserver.interfaces.IFtpServerUserExit_OnCwdCommandBeforeExecute" class="com.sterlingcommerce.woodstock.userexit.srvices.ftpserver.FtpServerUserExit">
<property name="implementations">
<list>
<value>implementation1</value>
<value>implementation2</value>
</list>
</property>
<property name="generalParameters">
<props>
<prop key="return.on.exception">false</prop>
<prop key="pool.size">5</prop>
<prop key="maximum.queue.length">5</prop>
<prop key="wait.time">10</prop>
<prop key="execution.threshold.time">600000</prop>
</props>
</property>
</bean>
-
Remove all values to deactivate the user exit points.
-
Restart the FTP Server adapter instance to apply the changes.
Note: Restart only the adapter instance if you modify implementation class list and other
properties.