|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.speedo.jca.SpeedoManagedConnection
public class SpeedoManagedConnection
Field Summary | |
---|---|
protected SpeedoConnectionSpec |
cri
|
static java.lang.String |
EIS_PRODUCT_NAME
|
static java.lang.String |
EIS_PRODUCT_VERSION
|
static java.lang.String |
USER_NAME
|
SpeedoXAContext |
xac
It is the current SpeedoXAContext. |
Fields inherited from interface javax.transaction.xa.XAResource |
---|
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY |
Method Summary | |
---|---|
void |
addConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
Adds a listener to the listeners list if it has not already been done. |
void |
associateConnection(java.lang.Object o)
Associates a new Connection to this ManagedConnection. |
void |
begin()
Begins the LocalTransaction if it has not already been started. |
void |
cleanup()
Cleans up the connection. |
void |
commit()
Commits the LocalTransaction if it is active. |
void |
commit(javax.transaction.xa.Xid xid,
boolean b)
Unbind the PersistenceManager to the xid. |
void |
destroy()
Called when ManagedConnection is removed. |
void |
dissociateConnection(java.lang.Object conn)
Dissociates a Connection from the ones that are associated to this ManagedConnection. |
void |
end(javax.transaction.xa.Xid xid,
int i)
Unbind this instance to the PersistenceManager. |
void |
forget(javax.transaction.xa.Xid xid)
|
java.lang.Object |
getConnection(javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo info)
Delegates the creation of a Connection to the ConnectionFactory. |
java.lang.String |
getEISProductName()
|
java.lang.String |
getEISProductVersion()
|
javax.resource.spi.LocalTransaction |
getLocalTransaction()
|
java.io.PrintWriter |
getLogWriter()
Not supported yet. |
int |
getMaxConnections()
|
javax.resource.spi.ManagedConnectionMetaData |
getMetaData()
|
POManagerItf |
getPOManager()
Retrieves the right POManagerItf in according the managed connection state (in a local transaction, in a XA transaction or out of transaction) |
int |
getTransactionTimeout()
|
java.lang.String |
getUserName()
|
SpeedoXAContext |
getXAContext(javax.transaction.xa.Xid xid,
int flag)
find the SpeedoXAContext matching an Xid. |
javax.transaction.xa.XAResource |
getXAResource()
Retrieves an XA resource. |
boolean |
isSameRM(javax.transaction.xa.XAResource resource)
Used by JTA in order to verify that it has not already registered a XAResource to manage this transaction context from this RM. |
boolean |
localTransactionTerminated()
Specifies if this ManagedConnection still has an active LocalTransaction. |
int |
prepare(javax.transaction.xa.Xid xid)
Prepares the underlying JdoTxContext (prepare phase of the 2PC). |
javax.transaction.xa.Xid[] |
recover(int i)
Gets the Xid of distributed transactions to be recovered from the Speedo manager. |
void |
registerSynchronization()
Registers the POManagerItf of the current SpeedoXAContext to the current transaction, if it is not already done. |
void |
removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
Removes a listener from the listeners list. |
void |
rollback()
Rollbacks the LocalTransaction if it is active. |
void |
rollback(javax.transaction.xa.Xid xid)
Unbind the PersistenceManager to the xid. |
void |
setLogWriter(java.io.PrintWriter writer)
Not supported yet. |
boolean |
setTransactionTimeout(int i)
|
void |
start(javax.transaction.xa.Xid xid,
int i)
Assigns an actual Speedo transaction context to the XAResource within the give DTP context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String EIS_PRODUCT_NAME
public static final java.lang.String EIS_PRODUCT_VERSION
public static final java.lang.String USER_NAME
public SpeedoXAContext xac
protected SpeedoConnectionSpec cri
Method Detail |
---|
public POManagerItf getPOManager()
public SpeedoXAContext getXAContext(javax.transaction.xa.Xid xid, int flag) throws javax.transaction.xa.XAException
flag
- indicates expecting behavior:javax.transaction.xa.XAException
public void registerSynchronization() throws javax.transaction.xa.XAException
javax.transaction.xa.XAException
- if the registering is not possible:
- TM not availlable
- Prpublic boolean localTransactionTerminated()
public void dissociateConnection(java.lang.Object conn) throws javax.resource.ResourceException
conn
- The Connection to be dissociated.
javax.resource.ResourceException
public java.lang.String getEISProductName() throws javax.resource.ResourceException
getEISProductName
in interface javax.resource.spi.ManagedConnectionMetaData
javax.resource.ResourceException
public java.lang.String getEISProductVersion() throws javax.resource.ResourceException
getEISProductVersion
in interface javax.resource.spi.ManagedConnectionMetaData
javax.resource.ResourceException
public int getMaxConnections() throws javax.resource.ResourceException
getMaxConnections
in interface javax.resource.spi.ManagedConnectionMetaData
javax.resource.ResourceException
public java.lang.String getUserName() throws javax.resource.ResourceException
getUserName
in interface javax.resource.spi.ManagedConnectionMetaData
javax.resource.ResourceException
public java.lang.Object getConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo info) throws javax.resource.ResourceException
getConnection
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
public void cleanup() throws javax.resource.ResourceException
cleanup
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
public void destroy() throws javax.resource.ResourceException
destroy
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
public void associateConnection(java.lang.Object o) throws javax.resource.ResourceException
associateConnection
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
public void addConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
addConnectionEventListener
in interface javax.resource.spi.ManagedConnection
public void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
removeConnectionEventListener
in interface javax.resource.spi.ManagedConnection
public javax.transaction.xa.XAResource getXAResource() throws javax.resource.ResourceException
getXAResource
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
public javax.resource.spi.LocalTransaction getLocalTransaction() throws javax.resource.ResourceException
getLocalTransaction
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
public javax.resource.spi.ManagedConnectionMetaData getMetaData() throws javax.resource.ResourceException
getMetaData
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
public void setLogWriter(java.io.PrintWriter writer) throws javax.resource.ResourceException
setLogWriter
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
public java.io.PrintWriter getLogWriter() throws javax.resource.ResourceException
getLogWriter
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
public void begin() throws javax.resource.ResourceException
begin
in interface javax.resource.cci.LocalTransaction
javax.resource.ResourceException
public void commit() throws javax.resource.ResourceException
commit
in interface javax.resource.cci.LocalTransaction
javax.resource.ResourceException
public void rollback() throws javax.resource.ResourceException
rollback
in interface javax.resource.cci.LocalTransaction
javax.resource.ResourceException
public void start(javax.transaction.xa.Xid xid, int i) throws javax.transaction.xa.XAException
start
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public void end(javax.transaction.xa.Xid xid, int i) throws javax.transaction.xa.XAException
end
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public boolean isSameRM(javax.transaction.xa.XAResource resource) throws javax.transaction.xa.XAException
isSameRM
in interface javax.transaction.xa.XAResource
resource
- The resource to be compared against this one wrt RM.
javax.transaction.xa.XAException
public int prepare(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
prepare
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public void commit(javax.transaction.xa.Xid xid, boolean b) throws javax.transaction.xa.XAException
commit
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public void rollback(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
rollback
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public void forget(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
forget
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public javax.transaction.xa.Xid[] recover(int i) throws javax.transaction.xa.XAException
recover
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public int getTransactionTimeout() throws javax.transaction.xa.XAException
getTransactionTimeout
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public boolean setTransactionTimeout(int i) throws javax.transaction.xa.XAException
setTransactionTimeout
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |