public class CassandraDriverManagedConnection extends Object implements javax.resource.spi.ManagedConnection
| Constructor and Description |
|---|
CassandraDriverManagedConnection(CassandraDriverManagedConnectionFactory mcf)
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
Adds a connection event listener to the ManagedConnection instance.
|
void |
associateConnection(Object connection)
Used by the container to change the association of an
application-level connection handle with a ManagedConneciton instance.
|
void |
cleanup()
Application server calls this method to force any cleanup on the ManagedConnection instance.
|
void |
destroy()
Destroys the physical connection to the underlying resource manager.
|
Object |
getConnection(Subject subject,
javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
Creates a new connection handle for the underlying physical connection
represented by the ManagedConnection instance.
|
javax.resource.spi.LocalTransaction |
getLocalTransaction()
Returns an
javax.resource.spi.LocalTransaction instance. |
PrintWriter |
getLogWriter()
Gets the log writer for this ManagedConnection instance.
|
javax.resource.spi.ManagedConnectionMetaData |
getMetaData()
Gets the metadata information for this connection's underlying EIS resource manager instance.
|
com.datastax.driver.core.Session |
getSession() |
XAResource |
getXAResource()
Returns an
javax.transaction.xa.XAresource instance. |
void |
removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
Removes an already registered connection event listener from the ManagedConnection instance.
|
void |
setLogWriter(PrintWriter out)
Sets the log writer for this ManagedConnection instance.
|
public CassandraDriverManagedConnection(CassandraDriverManagedConnectionFactory mcf)
mcf - mcfpublic Object getConnection(Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequestInfo) throws javax.resource.ResourceException
getConnection in interface javax.resource.spi.ManagedConnectionsubject - Security context as JAAS subjectcxRequestInfo - ConnectionRequestInfo instancejavax.resource.ResourceException - generic exception if operation failspublic void associateConnection(Object connection) throws javax.resource.ResourceException
associateConnection in interface javax.resource.spi.ManagedConnectionconnection - Application-level connection handlejavax.resource.ResourceException - generic exception if operation failspublic void cleanup()
throws javax.resource.ResourceException
cleanup in interface javax.resource.spi.ManagedConnectionjavax.resource.ResourceException - generic exception if operation failspublic void destroy()
throws javax.resource.ResourceException
destroy in interface javax.resource.spi.ManagedConnectionjavax.resource.ResourceException - generic exception if operation failspublic void addConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
addConnectionEventListener in interface javax.resource.spi.ManagedConnectionlistener - A new ConnectionEventListener to be registeredpublic void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
removeConnectionEventListener in interface javax.resource.spi.ManagedConnectionlistener - already registered connection event listener to be removedpublic PrintWriter getLogWriter() throws javax.resource.ResourceException
getLogWriter in interface javax.resource.spi.ManagedConnectionjavax.resource.ResourceException - generic exception if operation failspublic void setLogWriter(PrintWriter out) throws javax.resource.ResourceException
setLogWriter in interface javax.resource.spi.ManagedConnectionout - Character Output stream to be associatedjavax.resource.ResourceException - generic exception if operation failspublic javax.resource.spi.LocalTransaction getLocalTransaction()
throws javax.resource.ResourceException
javax.resource.spi.LocalTransaction instance.getLocalTransaction in interface javax.resource.spi.ManagedConnectionjavax.resource.ResourceException - generic exception if operation failspublic XAResource getXAResource() throws javax.resource.ResourceException
javax.transaction.xa.XAresource instance.getXAResource in interface javax.resource.spi.ManagedConnectionjavax.resource.ResourceException - generic exception if operation failspublic javax.resource.spi.ManagedConnectionMetaData getMetaData()
throws javax.resource.ResourceException
getMetaData in interface javax.resource.spi.ManagedConnectionjavax.resource.ResourceException - generic exception if operation failspublic com.datastax.driver.core.Session getSession()
Copyright © 2015. All rights reserved.