public class SampleManagedConnection
extends java.lang.Object
implements javax.resource.spi.ManagedConnection
This class represents a physical connection managed by an application server.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
Copyright statement.
|
Constructor and Description |
---|
SampleManagedConnection()
SampleManagedConnection default constructor
|
Modifier and Type | Method and Description |
---|---|
void | addConnectionEventListener(javax.resource.spi.ConnectionEventListener evtListener)
This method adds a connection event listener to the existing event listener list.
|
void | associateConnection(java.lang.Object connection)
This method associates this managed connection to SampleConnection.
|
void | cleanup()
This method cleans up the connections.
|
void | destroy()
This method destroys the connection.
|
java.lang.Object | getConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri)
This method gets the connection.
|
javax.resource.spi.LocalTransaction | getLocalTransaction()
This method gets the local transaction.
|
java.io.PrintWriter | getLogWriter()
This method gets the log writer.
|
javax.resource.spi.ManagedConnectionMetaData | getMetaData()
This method gets the managed connection metadata.
|
javax.transaction.xa.XAResource | getXAResource()
This method gets the XA resource.
|
void | removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
This method removes a ConnectionEventListener from the existing event listener list.
|
void | sendEvent(int eventType, java.lang.Exception ex)
This method sends an event.
|
void | sendEvent(int eventType, java.lang.Exception ex, java.lang.Object connectionHandle)
This method sends an event to the event listener.
|
void | setConnection(SampleConnection con)
This method sets the connection.
|
void | setLogWriter(java.io.PrintWriter pw)
This method sets the log writer.
|
public static final java.lang.String COPYRIGHT
public SampleManagedConnection() throws javax.resource.ResourceException
public void addConnectionEventListener(javax.resource.spi.ConnectionEventListener evtListener)
public void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
public javax.resource.spi.ManagedConnectionMetaData getMetaData() throws javax.resource.ResourceException
public void destroy() throws javax.resource.ResourceException
public void associateConnection(java.lang.Object connection) throws javax.resource.ResourceException
public java.lang.Object getConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri) throws javax.resource.ResourceException
public void setConnection(SampleConnection con)
public javax.transaction.xa.XAResource getXAResource() throws javax.resource.ResourceException
public void cleanup() throws javax.resource.ResourceException
public javax.resource.spi.LocalTransaction getLocalTransaction() throws javax.resource.ResourceException
public void sendEvent(int eventType, java.lang.Exception ex)
public void sendEvent(int eventType, java.lang.Exception ex, java.lang.Object connectionHandle)
public void setLogWriter(java.io.PrintWriter pw) throws javax.resource.ResourceException
public java.io.PrintWriter getLogWriter() throws javax.resource.ResourceException