user manual
304 BES Developer’s Guide
Developing the Resource Adapter
■
ManagedConnection.setLogWriter()
■
ManagedConnection.getLogWriter()
The resource adapter must also provide a default implementation of the
javax.resource.spi.ConnectionManager interface for cases in which the Resource
Adapter is used in a non-managed two-tier application scenario. A default
implementation of ConnectionManager enables the Resource Adapter to provide
services specific to itself. These services can include connection pooling, error
logging and tracing, and security management. The default ConnectionManager
delegates to the ManagedConnectionFactory the creation of physical connections
to the underlying EIS.
In an application-server-managed environment, the Resource Adapter should
not use the default ConnectionManager implementation class. Managed
environments do not allow resource adapters to support their own connection
pooling. In this case, the application server is responsible for connection
pooling. A Resource Adapter can, however, have multiple ConnectionManager
instances per physical connection transparent to the application server and its
components.
Transaction Management
Resource Adapters are easily classified based on the level of transaction
support they provide. These levels are:
■
NoTransaction: the Resource Adapter supports neither local not JTA
transactions, and implements no transaction interfaces.
■
LocalTransaction: the Resource Adapter supports resource manager
local transactions by implementing the LocalTransaction interface. The local
transaction management contract is specified in Section 6.7 of the
Connectors 1.0 specification from Sun Microsystems.
■
XATransaction: the Resource Adapter supports both resource manager
local and JTA/XA transactions by implementing the LocalTransaction and
XAResource interfaces, respectively. The XA Resource-based contract is
specified in Section 6.6 of the Connectors 1.0 specification from Sun
Microsystems.
The transaction support levels above reflect the major steps of transaction
support that a Resource Adapter must implement to allow server-managed
transaction coordination. Depending on its transaction capabilities and the
requirements of its underlying EIS, a Resource Adapter can choose to support
any one of the above levels.
Security Management
The security management contract requirements for a Resource Adapter are
as follows:










