Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.4.0)

E10653-05

oracle.jbo.server
Class DefaultTxnHandlerImpl

java.lang.Object
  extended by oracle.jbo.server.DefaultTxnHandlerImpl
All Implemented Interfaces:
TransactionHandler
Direct Known Subclasses:
DefaultJTATxnHandlerImpl, ServiceNonJTATxnHandlerImpl

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()
          Creates a transaction handler on a JDBC connection.
 
Method Summary
 void begin()
           
 void beginActivation()
           
 void beginPassivation()
           
 void end()
           
 void endActivation()
           
 void endPassivation()
           
 void handleClose(java.sql.Connection conn)
          Issues a close() command to the JDBC connection.
 void handleCommit(java.sql.Connection conn, boolean autoStart)
          Issues a commit() command to the JDBC connection.
 void handleOpen(java.sql.Connection conn)
          Opens a transaction.
 void handleRollback(java.sql.Connection conn, boolean autoStart)
          Issues a rollback() command to the JDBC connection.
 void resume()
           
 void suspend()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTxnHandlerImpl

public DefaultTxnHandlerImpl()
Creates a transaction handler on a JDBC connection.

Method Detail

begin

public void begin()
Specified by:
begin in interface TransactionHandler

end

public void end()

suspend

public void suspend()
Specified by:
suspend in interface TransactionHandler

resume

public void resume()
Specified by:
resume in interface TransactionHandler

beginActivation

public void beginActivation()
Specified by:
beginActivation in interface TransactionHandler

endActivation

public void endActivation()
Specified by:
endActivation in interface TransactionHandler

beginPassivation

public void beginPassivation()
Specified by:
beginPassivation in interface TransactionHandler

endPassivation

public void endPassivation()
Specified by:
endPassivation in interface TransactionHandler

handleOpen

public void handleOpen(java.sql.Connection conn)
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(java.sql.Connection conn,
                         boolean autoStart)
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(java.sql.Connection conn,
                           boolean autoStart)
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(java.sql.Connection conn)
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.

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.4.0)

E10653-05

Copyright © 1997, 2011, Oracle. All rights reserved.