|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.core.storage.sql.ra.ManagedConnectionImpl
public class ManagedConnectionImpl
The managed connection represents an actual physical connection to the
underlying storage. It is created by the ManagedConnectionFactory
,
and then encapsulated into a Connection
which is then returned to the
application (via the ConnectionFactory
).
If sharing is allowed, several different Connection
s may be
associated to a given ManagedConnection
, although not at the same
time.
Constructor Summary | |
---|---|
ManagedConnectionImpl(ManagedConnectionFactoryImpl managedConnectionFactory,
ConnectionRequestInfoImpl connectionRequestInfo)
Creates a new physical connection to the underlying storage. |
Method Summary | |
---|---|
void |
addConnectionEventListener(ConnectionEventListener listener)
Called by the application server to add a listener who should be notified of all relevant events on this connection. |
void |
associateConnection(Object object)
Called by the application server to change the association of an application-level Connection handle with a
ManagedConnection instance. |
void |
cleanup()
Cleans up the physical connection, so that it may be reused. |
void |
destroy()
Destroys the physical connection. |
Connection |
getConnection(Subject subject,
ConnectionRequestInfo connectionRequestInfo)
Creates a new Connection handle to this ManagedConnection
. |
String |
getEISProductName()
|
String |
getEISProductVersion()
|
LocalTransaction |
getLocalTransaction()
|
PrintWriter |
getLogWriter()
|
int |
getMaxConnections()
|
ManagedConnectionMetaData |
getMetaData()
|
String |
getUserName()
|
XAResource |
getXAResource()
|
void |
removeConnectionEventListener(ConnectionEventListener listener)
Called by the application server to remove a listener. |
void |
setLogWriter(PrintWriter out)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ManagedConnectionImpl(ManagedConnectionFactoryImpl managedConnectionFactory, ConnectionRequestInfoImpl connectionRequestInfo) throws ResourceException
ManagedConnectionFactory
when it needs a new connection.
ResourceException
Method Detail |
---|
public Connection getConnection(Subject subject, ConnectionRequestInfo connectionRequestInfo) throws ResourceException
Connection
handle to this ManagedConnection
.
getConnection
in interface ManagedConnection
ResourceException
public void cleanup()
Called by the application server before putting back this
ManagedConnection
into the application server pool.
Later, the application server may call getConnection(javax.security.auth.Subject, javax.resource.spi.ConnectionRequestInfo)
again.
cleanup
in interface ManagedConnection
public void destroy() throws ResourceException
Called by the application server before this ManagedConnection
is
destroyed.
destroy
in interface ManagedConnection
ResourceException
public void associateConnection(Object object) throws ResourceException
Connection
handle with a
ManagedConnection
instance.
associateConnection
in interface ManagedConnection
ResourceException
public XAResource getXAResource()
getXAResource
in interface ManagedConnection
public LocalTransaction getLocalTransaction()
getLocalTransaction
in interface ManagedConnection
public void addConnectionEventListener(ConnectionEventListener listener)
addConnectionEventListener
in interface ManagedConnection
public void removeConnectionEventListener(ConnectionEventListener listener)
removeConnectionEventListener
in interface ManagedConnection
public ManagedConnectionMetaData getMetaData()
getMetaData
in interface ManagedConnection
public void setLogWriter(PrintWriter out)
setLogWriter
in interface ManagedConnection
public PrintWriter getLogWriter()
getLogWriter
in interface ManagedConnection
public String getEISProductName()
getEISProductName
in interface ManagedConnectionMetaData
public String getEISProductVersion()
getEISProductVersion
in interface ManagedConnectionMetaData
public int getMaxConnections()
getMaxConnections
in interface ManagedConnectionMetaData
public String getUserName() throws ResourceException
getUserName
in interface ManagedConnectionMetaData
ResourceException
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |