oracle.jbo.server
Class DefaultTxnHandlerImpl
java.lang.Object
|
+--oracle.jbo.server.DefaultTxnHandlerImpl
- public class DefaultTxnHandlerImpl
- extends java.lang.Object
- implements TransactionHandler
The default implementation of the TransactionHandler interface.
DefaultTxnHandlerImpl provides transaction handling when running under
non-EJB platforms. Hence the name "Default". Examples of non-EJB platforms are LOCAL, 8i
(Oracle8i),
CORBA, and VB (Visibroker). When running under a non-EJB platform,
transactions are committed using the JDBC API.
In contrast, when running under EJB, transactions are committed using the
JTS API.
- Since:
- JDeveloper 3.0
- See Also:
TransactionHandler
Constructor Summary |
DefaultTxnHandlerImpl(java.sql.Connection c)
Creates a transaction handler on a JDBC connection. |
Method Summary |
void |
handleClose()
Issues a close() command to the JDBC connection. |
void |
handleCommit()
Issues a commit() command to the JDBC connection. |
void |
handleOpen()
Opens a transaction. |
void |
handleRollback()
Issues a rollback() command to the JDBC connection. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
DefaultTxnHandlerImpl
public DefaultTxnHandlerImpl(java.sql.Connection c)
- Creates a transaction handler on a JDBC connection.
- Parameters:
c
- a connection.
handleOpen
public void handleOpen()
- Opens a transaction.
Under JDBC, the transaction is already assumed to be open. Other than set
autocommit to false, this default implementation does nothing.
- Specified by:
- handleOpen in interface TransactionHandler
handleCommit
public void handleCommit()
- Issues a commit() command to the JDBC connection.
- Specified by:
- handleCommit in interface TransactionHandler
- Throws:
- DMLException - if an attempt to post to the database was
unsuccessful.
handleRollback
public void handleRollback()
- Issues a rollback() command to the JDBC connection.
- Specified by:
- handleRollback in interface TransactionHandler
- Throws:
- DMLException - if an attempt to post to the database was
unsuccessful.
handleClose
public void handleClose()
- Issues a close() command to the JDBC connection.
- Specified by:
- handleClose in interface TransactionHandler
- Throws:
- DMLException - if an attempt to post to the database was
unsuccessful.