Package org.firebirdsql.jdbc
Class InternalTransactionCoordinator
java.lang.Object
org.firebirdsql.jdbc.InternalTransactionCoordinator
- All Implemented Interfaces:
FBObjectListener.BlobListener,FBObjectListener.StatementListener,Synchronizable
public final class InternalTransactionCoordinator
extends Object
implements FBObjectListener.StatementListener, FBObjectListener.BlobListener, Synchronizable
Transaction coordinator for the
FBConnection class.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Method Summary
Modifier and TypeMethodDescriptionvoidcommit()voidvoidNotify listener that execution of some BLOB operation had been completed.voidexecutionStarted(FBStatement stmt) Notify listener that statement execution is being started.voidexecutionStarted(FirebirdBlob blob) Notify listener that execution of some BLOB operation had been started.booleanfinal FBConnectionGet the connection object to which this listener belongs to.final ObjectGet synchronization object.voidrollback()voidstatementClosed(FBStatement stmt) Notify the listener that statement was closed.voidNotify the listener that statement is completed.voidstatementCompleted(FBStatement stmt, boolean success) Notify the listener that statement is completed and tell whether execution was successfull or not.
-
Method Details
-
getSynchronizationObject
Description copied from interface:SynchronizableGet synchronization object.- Specified by:
getSynchronizationObjectin interfaceSynchronizable- Returns:
- object, cannot be
null.
-
getAutoCommit
- Throws:
SQLException
-
executionStarted
Description copied from interface:FBObjectListener.StatementListenerNotify listener that statement execution is being started.- Specified by:
executionStartedin interfaceFBObjectListener.StatementListener- Parameters:
stmt- statement that is being executed.- Throws:
SQLException- if something went wrong.
-
getConnection
Description copied from interface:FBObjectListener.StatementListenerGet the connection object to which this listener belongs to.- Specified by:
getConnectionin interfaceFBObjectListener.StatementListener- Returns:
- instance of
FBConnection - Throws:
SQLException- if something went wrong.
-
statementClosed
Description copied from interface:FBObjectListener.StatementListenerNotify the listener that statement was closed.- Specified by:
statementClosedin interfaceFBObjectListener.StatementListener- Parameters:
stmt- statement that was closed.- Throws:
SQLException
-
statementCompleted
Description copied from interface:FBObjectListener.StatementListenerNotify the listener that statement is completed. This is shortcut method forstatementCompleted(AbstractStatement, true).- Specified by:
statementCompletedin interfaceFBObjectListener.StatementListener- Parameters:
stmt- statement that was completed.- Throws:
SQLException
-
statementCompleted
Description copied from interface:FBObjectListener.StatementListenerNotify the listener that statement is completed and tell whether execution was successfull or not.- Specified by:
statementCompletedin interfaceFBObjectListener.StatementListener- Parameters:
stmt- statement that was completed.success-trueif completion was successfull.- Throws:
SQLException- if an error occured.
-
executionCompleted
Description copied from interface:FBObjectListener.BlobListenerNotify listener that execution of some BLOB operation had been completed.- Specified by:
executionCompletedin interfaceFBObjectListener.BlobListener- Parameters:
blob- instance ofFirebirdBlobthat caused this event.- Throws:
SQLException- if something went wrong.
-
executionStarted
Description copied from interface:FBObjectListener.BlobListenerNotify listener that execution of some BLOB operation had been started.- Specified by:
executionStartedin interfaceFBObjectListener.BlobListener- Parameters:
blob- instance ofFirebirdBlobthat caused this event.- Throws:
SQLException- if something went wrong.
-
ensureTransaction
- Throws:
SQLException
-
commit
- Throws:
SQLException
-
rollback
- Throws:
SQLException
-