|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.firebirdsql.jca.FBManagedConnection
The class FBManagedConnection
implements both the
ManagedConnection and XAResource interfaces.
Field Summary | |
boolean |
autoCommit
|
protected FBConnectionRequestInfo |
cri
Describe variable cri here. |
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)
Add an event listener. |
void |
associateConnection(java.lang.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 |
clearWarnings()
Clear warnings for this database connection. |
void |
close(AbstractConnection c)
|
void |
closeBlob(isc_blob_handle blob)
|
void |
closeStatement(isc_stmt_handle stmt,
boolean deallocate)
|
void |
commit(javax.transaction.xa.Xid id,
boolean twoPhase)
Commits a transaction. |
isc_blob_handle |
createBlobHandle(boolean segmented)
|
void |
destroy()
Destroys the physical connection to the underlying resource manager. |
void |
end(javax.transaction.xa.Xid id,
int flags)
Dissociates a resource from a global transaction. |
void |
executeImmediate(java.lang.String statement)
|
void |
executeStatement(isc_stmt_handle stmt,
boolean sendOutSqlda)
|
void |
fetch(isc_stmt_handle stmt,
int fetchSize)
|
void |
forget(javax.transaction.xa.Xid id)
Indicates that no further action will be taken on behalf of this transaction (after a heuristic failure). |
isc_stmt_handle |
getAllocatedStatement()
|
java.lang.Integer |
getBlobBufferLength()
|
byte[] |
getBlobSegment(isc_blob_handle blob,
int len)
|
java.lang.Object |
getConnection(javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo cri)
Creates a new connection handle for the underlying physical connection represented by the ManagedConnection instance. |
FBConnectionRequestInfo |
getConnectionRequestInfo()
Get information about the current connection parameters. |
java.lang.String |
getDatabase()
|
int |
getDatabaseProductMajorVersion()
|
int |
getDatabaseProductMinorVersion()
|
java.lang.String |
getDatabaseProductName()
|
java.lang.String |
getDatabaseProductVersion()
|
GDS |
getInternalAPIHandler()
Get Firebird API handler (sockets/native/embeded/etc) |
isc_db_handle |
getIscDBHandle()
Get connection handle for direct Firebird API access |
java.lang.String |
getIscEncoding()
|
int |
getIscTransactionIsolation()
Deprecated. you should not use internal transaction isolation levels directrly. |
javax.resource.spi.LocalTransaction |
getLocalTransaction()
Returns an javax.resource.spi.LocalTransaction instance. |
java.io.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. |
void |
getSqlCounts(isc_stmt_handle stmt)
|
FBTpb |
getTpb()
|
int |
getTransactionIsolation()
|
java.lang.String |
getTransactionIsolationName()
|
int |
getTransactionTimeout()
Gets the transaction timeout. |
java.lang.String |
getUserName()
|
java.util.List |
getWarnings()
Get all warnings associated with current connection. |
javax.transaction.xa.XAResource |
getXAResource()
In both javax.sql.XAConnection and javax.resource.spi.MangagedConnection Return an XA resource to the caller. |
void |
internalStart(javax.transaction.xa.Xid id,
int flags)
|
boolean |
inTransaction()
|
boolean |
isReadOnly()
|
boolean |
isSameRM(javax.transaction.xa.XAResource res)
|
isc_blob_handle |
openBlobHandle(long blob_id,
boolean segmented)
|
int |
prepare(javax.transaction.xa.Xid id)
Prepares a transaction to commit. |
void |
prepareSQL(isc_stmt_handle stmt,
java.lang.String sql,
boolean describeBind)
|
void |
putBlobSegment(isc_blob_handle blob,
byte[] buf)
|
javax.transaction.xa.Xid[] |
recover(int flag)
|
void |
registerStatement(isc_stmt_handle fbStatement)
|
void |
removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
Remove an event listener. |
void |
rollback(javax.transaction.xa.Xid id)
Rolls back the work, assuming it was done on behalf of the specified transaction. |
void |
setCursorName(isc_stmt_handle stmt,
java.lang.String cursorName)
|
void |
setIscTransactionIsolation(int isolation)
Deprecated. you should not use internal transaction isolation levels directrly. |
void |
setLogWriter(java.io.PrintWriter out)
Sets the log writer for this ManagedConnection instance. |
void |
setReadOnly(boolean readOnly)
|
void |
setTransactionIsolation(int isolation)
|
void |
setTransactionIsolationName(java.lang.String isolation)
|
boolean |
setTransactionTimeout(int timeout)
Sets the transaction timeout. |
void |
start(javax.transaction.xa.Xid id,
int flags)
Associates a JDBC connection with a global transaction. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected FBConnectionRequestInfo cri
cri
here. Needed from mcf when
killing a db handle when a new tx cannot be started.
public boolean autoCommit
Method Detail |
public javax.resource.spi.LocalTransaction getLocalTransaction()
getLocalTransaction
in interface javax.resource.spi.ManagedConnection
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 out)
setLogWriter
in interface javax.resource.spi.ManagedConnection
public java.io.PrintWriter getLogWriter()
getLogWriter
in interface javax.resource.spi.ManagedConnection
public void addConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
Add an event listener.
addConnectionEventListener
in interface javax.resource.spi.ManagedConnection
public void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
Remove an event listener.
removeConnectionEventListener
in interface javax.resource.spi.ManagedConnection
public void associateConnection(java.lang.Object connection) throws javax.resource.ResourceException
associateConnection
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 java.lang.Object getConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri) throws javax.resource.ResourceException
getConnection
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 javax.transaction.xa.XAResource getXAResource()
In both javax.sql.XAConnection and javax.resource.spi.MangagedConnection
Return an XA resource to the caller.
getXAResource
in interface javax.resource.spi.ManagedConnection
public void commit(javax.transaction.xa.Xid id, boolean twoPhase) throws javax.transaction.xa.XAException
commit
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
- Occurs when the state was not correct (end never called), the
transaction ID is wrong, the connection was set to Auto-Commit,
or the commit on the underlying connection fails. The error code
differs depending on the exact situation.public void end(javax.transaction.xa.Xid id, int flags) throws javax.transaction.xa.XAException
end
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
- Occurs when the state was not correct (end called twice), or the
transaction ID is wrong.public void forget(javax.transaction.xa.Xid id) throws javax.transaction.xa.XAException
forget
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
- Occurs when the state was not correct (end never called), or the
transaction ID is wrong.public int getTransactionTimeout() throws javax.transaction.xa.XAException
getTransactionTimeout
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public boolean isSameRM(javax.transaction.xa.XAResource res) throws javax.transaction.xa.XAException
isSameRM
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public int prepare(javax.transaction.xa.Xid id) throws javax.transaction.xa.XAException
prepare
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
- Occurs when the state was not correct (end never called), the
transaction ID is wrong, or the connection was set to Auto-Commit.public javax.transaction.xa.Xid[] recover(int flag) throws javax.transaction.xa.XAException
recover
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public void rollback(javax.transaction.xa.Xid id) throws javax.transaction.xa.XAException
rollback
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
- Occurs when the state was not correct (end never called), the
transaction ID is wrong, the connection was set to Auto-Commit,
or the rollback on the underlying connection fails. The error code
differs depending on the exact situation.public boolean setTransactionTimeout(int timeout) throws javax.transaction.xa.XAException
setTransactionTimeout
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public void start(javax.transaction.xa.Xid id, int flags) throws javax.transaction.xa.XAException
start
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
- Occurs when the state was not correct (start called twice), the
transaction ID is wrong, or the instance has already been closed.public void internalStart(javax.transaction.xa.Xid id, int flags) throws javax.transaction.xa.XAException, GDSException
javax.transaction.xa.XAException
GDSException
public isc_stmt_handle getAllocatedStatement() throws GDSException
GDSException
public boolean inTransaction()
public void prepareSQL(isc_stmt_handle stmt, java.lang.String sql, boolean describeBind) throws GDSException, java.sql.SQLException
GDSException
java.sql.SQLException
public void executeStatement(isc_stmt_handle stmt, boolean sendOutSqlda) throws GDSException
GDSException
public void executeImmediate(java.lang.String statement) throws GDSException
GDSException
public void fetch(isc_stmt_handle stmt, int fetchSize) throws GDSException
GDSException
public void setCursorName(isc_stmt_handle stmt, java.lang.String cursorName) throws GDSException
GDSException
public void closeStatement(isc_stmt_handle stmt, boolean deallocate) throws GDSException
GDSException
public void close(AbstractConnection c)
public void registerStatement(isc_stmt_handle fbStatement)
public isc_blob_handle openBlobHandle(long blob_id, boolean segmented) throws GDSException
GDSException
public isc_blob_handle createBlobHandle(boolean segmented) throws GDSException
GDSException
public byte[] getBlobSegment(isc_blob_handle blob, int len) throws GDSException
GDSException
public void closeBlob(isc_blob_handle blob) throws GDSException
GDSException
public void putBlobSegment(isc_blob_handle blob, byte[] buf) throws GDSException
GDSException
public void getSqlCounts(isc_stmt_handle stmt) throws GDSException
GDSException
public java.lang.String getDatabaseProductName()
public java.lang.String getDatabaseProductVersion()
public int getDatabaseProductMajorVersion()
public int getDatabaseProductMinorVersion()
public java.lang.String getDatabase()
public java.lang.String getUserName()
public int getTransactionIsolation() throws javax.resource.ResourceException
javax.resource.ResourceException
public void setTransactionIsolation(int isolation) throws javax.resource.ResourceException
javax.resource.ResourceException
public java.lang.String getTransactionIsolationName() throws javax.resource.ResourceException
javax.resource.ResourceException
public void setTransactionIsolationName(java.lang.String isolation) throws javax.resource.ResourceException
javax.resource.ResourceException
public int getIscTransactionIsolation() throws javax.resource.ResourceException
javax.resource.ResourceException
public void setIscTransactionIsolation(int isolation) throws javax.resource.ResourceException
javax.resource.ResourceException
public void setReadOnly(boolean readOnly)
public boolean isReadOnly()
public java.lang.Integer getBlobBufferLength()
public java.lang.String getIscEncoding()
public java.util.List getWarnings()
GDSException
instances representing warnings
for this database connection.public void clearWarnings()
public isc_db_handle getIscDBHandle() throws GDSException
GDSException
public GDS getInternalAPIHandler()
public FBConnectionRequestInfo getConnectionRequestInfo()
FBConnectionRequestInfo
.public FBTpb getTpb()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |