public class TxConnectionManagerImpl extends AbstractConnectionManager implements TxConnectionManager
enlistment, trace
Constructor and Description |
---|
TxConnectionManagerImpl(TransactionIntegration txIntegration,
boolean localTransactions)
Constructor
|
Modifier and Type | Method and Description |
---|---|
ConnectionListener |
createConnectionListener(javax.resource.spi.ManagedConnection mc,
ManagedConnectionPool mcp)
Create a managed connection listener for the managed connection.
|
java.lang.Boolean |
getIsSameRMOverride()
Get the IsSameRMOverride value
|
protected CoreLogger |
getLogger()
Get the logger.
|
ConnectionListener |
getManagedConnection(javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo cri)
Public for use in testing pooling functionality by itself.
|
boolean |
getPadXid()
Get PadXis status
|
long |
getTimeLeftBeforeTransactionTimeout(boolean errorRollback)
Gets time left.
|
TransactionIntegration |
getTransactionIntegration()
Get the transaction integration instance
|
int |
getTransactionTimeout()
Get the transaction timeout.
|
boolean |
getWrapXAResource()
Returns true if wrap xa resource.
|
int |
getXAResourceTimeout()
Gets XA resource transaction time out.
|
boolean |
isAllowMarkedForRollback()
Is allow marked for rollback enabled
|
boolean |
isInterleaving()
Gets interleaving flag.
|
boolean |
isLocalTransactions()
Returns local tx or not.
|
boolean |
isTransactional()
Determine whether there connection is a transactional.
|
void |
lazyEnlist(javax.resource.spi.ManagedConnection mc) |
protected void |
managedConnectionDisconnected(ConnectionListener cl)
For polymorphism.
|
protected void |
managedConnectionReconnected(ConnectionListener cl)
For polymorphism.
|
static void |
rethrowAsSystemException(java.lang.String context,
javax.transaction.Transaction tx,
java.lang.Throwable t)
RethrowAsSystemException.
|
void |
setInterleaving(boolean value)
Sets interleaving flag.
|
void |
setIsSameRMOverride(java.lang.Boolean v)
Set the IsSameRMOverride value.
|
void |
setPadXid(boolean v)
Set if the Xid should be padded
|
void |
setWrapXAResource(boolean v)
Set if the XAResource should be wrapped
|
void |
setXAResourceTimeout(int timeout)
Sets XA resource transaction timeout.
|
void |
transactionStarted(java.util.Collection<ConnectionRecord> crs)
Notification of transaction started
|
allocateConnection, associateConnection, associateManagedConnection, disconnect, disconnectManagedConnection, dissociateManagedConnection, getAllocationRetry, getAllocationRetryWaitMillis, getCachedConnectionManager, getFlushStrategy, getJndiName, getManagedConnection, getManagedConnectionFactory, getPool, getSecurityDomain, getSubjectFactory, inactiveConnectionClosed, isEnlistment, isSharable, reconnect, reconnectManagedConnection, returnManagedConnection, setAllocationRetry, setAllocationRetryWaitMillis, setCachedConnectionManager, setEnlistment, setFlushStrategy, setJndiName, setPool, setSecurityDomain, setSharable, setSubjectFactory, shutdown, unregisterAssociation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAllocationRetry, getAllocationRetryWaitMillis, getCachedConnectionManager, getJndiName, getPool, getSecurityDomain, getSubjectFactory, isEnlistment, isSharable, setJndiName, shutdown, unregisterAssociation
associateManagedConnection, dissociateManagedConnection, returnManagedConnection
associateConnection, inactiveConnectionClosed
disconnect, reconnect
public TxConnectionManagerImpl(TransactionIntegration txIntegration, boolean localTransactions)
txIntegration
- The transaction integration layerlocalTransactions
- Is local transactions enabledprotected CoreLogger getLogger()
getLogger
in class AbstractConnectionManager
public TransactionIntegration getTransactionIntegration()
getTransactionIntegration
in class AbstractConnectionManager
public boolean isInterleaving()
isInterleaving
in interface TxConnectionManager
public void setInterleaving(boolean value)
value
- interleavingpublic boolean isLocalTransactions()
isLocalTransactions
in interface TxConnectionManager
public int getXAResourceTimeout()
getXAResourceTimeout
in interface TxConnectionManager
public void setXAResourceTimeout(int timeout)
timeout
- xa resource transaction timeoutpublic java.lang.Boolean getIsSameRMOverride()
getIsSameRMOverride
in interface TxConnectionManager
public void setIsSameRMOverride(java.lang.Boolean v)
v
- The valuepublic boolean getWrapXAResource()
getWrapXAResource
in interface TxConnectionManager
public void setWrapXAResource(boolean v)
v
- The valuepublic boolean getPadXid()
getPadXid
in interface TxConnectionManager
public void setPadXid(boolean v)
v
- The valuepublic boolean isAllowMarkedForRollback()
isAllowMarkedForRollback
in interface TxConnectionManager
True
if set, otherwise false
public long getTimeLeftBeforeTransactionTimeout(boolean errorRollback) throws javax.transaction.RollbackException
getTimeLeftBeforeTransactionTimeout
in interface TransactionTimeoutConfiguration
errorRollback
- error rollbackjavax.transaction.RollbackException
- if exceptionpublic ConnectionListener getManagedConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri) throws javax.resource.ResourceException
getManagedConnection
in class AbstractConnectionManager
subject
- a Subject
valuecri
- a ConnectionRequestInfo
valueManagedConnection
valuejavax.resource.ResourceException
- if an error occurspublic void transactionStarted(java.util.Collection<ConnectionRecord> crs) throws javax.transaction.SystemException
transactionStarted
in class AbstractConnectionManager
crs
- the connectionsjavax.transaction.SystemException
- for any errorprotected void managedConnectionReconnected(ConnectionListener cl) throws javax.resource.ResourceException
Do not invoke directly, use reconnectManagedConnection which does the relevent exception handling
managedConnectionReconnected
in class AbstractConnectionManager
cl
- connection listenerjavax.resource.ResourceException
- for exceptionprotected void managedConnectionDisconnected(ConnectionListener cl) throws javax.resource.ResourceException
Do not invoke directly, use disconnectManagedConnection which does the relevent exception handling
managedConnectionDisconnected
in class AbstractConnectionManager
cl
- connection listenerjavax.resource.ResourceException
- for exceptionpublic ConnectionListener createConnectionListener(javax.resource.spi.ManagedConnection mc, ManagedConnectionPool mcp) throws javax.resource.ResourceException
mc
- the managed connectionmcp
- the managed connection pooljavax.resource.ResourceException
- for any errorpublic boolean isTransactional()
isTransactional
in class AbstractConnectionManager
public int getTransactionTimeout() throws javax.transaction.SystemException
getTransactionTimeout
in interface TransactionTimeoutConfiguration
javax.transaction.SystemException
- For any errorpublic void lazyEnlist(javax.resource.spi.ManagedConnection mc) throws javax.resource.ResourceException
lazyEnlist
in interface javax.resource.spi.LazyEnlistableConnectionManager
lazyEnlist
in class AbstractConnectionManager
javax.resource.ResourceException
public static void rethrowAsSystemException(java.lang.String context, javax.transaction.Transaction tx, java.lang.Throwable t) throws javax.transaction.SystemException
context
- contexttx
- transactiont
- throwablejavax.transaction.SystemException
- system exceptionCopyright © 2013 IronJacamar (http://www.ironjacamar.org)