Show TOC Start of Content Area

Object documentation The Resource Adapter JavaBean  Locate the document in its SAP Library structure

Use

According to the JCA 1.5 specification, a resource adapter must implement the javax.resource.spi.ResourceAdapter interface. Another requirement is that the implementation is a JavaBean.

In addition to defining the software component as a resource adapter, the implementation of the ResourceAdapter interface also enables the adapter lifecycle management.

Structure

Implemented Interfaces

The resource adapter JavaBean must implement the following interface:

      javax.resource.spi.ResourceAdapter

This interface represents a resource adapter instance. Using its methods, the application server can manage the lifecycle of the adapter JavaBean.

To start the resource adapter, the SAP AS Java invokes its start() method passing a bootstrap context as a parameter. The resource adapter then initializes the resources it is going to use. In this method the resource adapter should obtain an instance of the WorkManager that enables it to create work instances and send them for execution to the server. This is also done in the start method of the resource adapter:

When the application server calls the stop() method of the resource adapter JavaBean, it should release all work instances that have been scheduled for execution.

The ResourceAdapter interface also enables endpoint activation and deactivation.

Properties

Each JavaBean defines its behavior using a set of specific properties. In the resource adapter JavaBean you can define any property that is related to the work of the adapter. You can use the following Java data types for the resource adapter JavaBean properties: java.lang.Boolean, java.lang.String, java.lang.Integer, java.lang.Double, java.lang.Byte, java.lang.Short, java.lang.Long, java.lang.Float, java.lang.Character. The property values are then set and retrieved using getter and setter methods.

End of Content Area