Adapter Development Kit 6.5 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | The Adapter Definition | Deploying the Adapter | Creating Adapter Startup and Shutdown Services
 
Creating Adapter Startup and Shutdown Services
 
Example Adapter Startup and Shutdown Services
*To create adapter startup and shutdown services
1. Create a class in the same directory in which you created your WmAdapter implementation class.
In the example shown in Adapter Definition Implementation Classes, this class is MyAdapterAdmin.
2. Create an adapter startup service as an IS Java service.
The startup service must retrieve an instance of your WmAdapter implementation class and pass it to AdapterAdmin.registerAdapter.
To implement a service as an IS Java service, use Designer. Alternatively, you may implement a service as a Java class in your adapter, and use the jcode utility provided by Integration Server to convert it to an IS Java service. For information about IS Java services and the jcode utility, see the webMethods Service Development Help for your release. For an example startup service that uses jcode, see Example Adapter Startup and Shutdown Services.
3. Create an adapter shutdown service as an IS Java service, in the same way you created your startup service.
The shutdown service must:
a. Retrieve an instance of your WmAdapter implementation class and pass it to AdapterAdmin.unregisterAdapter.
b. Call any cleanup operations needed by your adapter. In most cases this is accomplished by calling MyAdapter.cleanup before the call to AdapterAdmin.unregisterAdapter. For more information about this cleanup method, see Initializing and Cleaning Up.
For an example shutdown service that uses jcode, see Example Adapter Startup and Shutdown Services.
4. Compile the adapter, as described in Compiling the Adapter.
5. Register the adapter startup and shutdown services with Designer, as described in Registering the Adapter Startup and Shutdown Services in Software AG Designer.