Business Components

oracle.jbo.server
Class NullDBTransactionImpl

java.lang.Object
  |
  +--oracle.jbo.server.NullDBTransactionImpl
All Implemented Interfaces:
DBTransaction, Transaction, oracle.jbo.server.TransactionManager, ValidationManager

public class NullDBTransactionImpl
extends java.lang.Object
implements DBTransaction

Internal: Applications should not use this class.


Field Summary
TypeField
protected  ConnectionCredentials mConnectionCredentials
           
 
Fields inherited from interface oracle.jbo.server.DBTransaction
DEFAULT
 
Fields inherited from interface oracle.jbo.Transaction
LOCK_NONE, LOCK_OPTIMISTIC, LOCK_PESSIMISTIC
 
Constructor Summary
NullDBTransactionImpl()
           
 
Method Summary
TypeMethod
 void addToValidationListeners(ValidationListener w)
          Implementation of the DBTransaction interface.
 void addTransactionListener(TransactionListener listener)
          Implementation of the DBTransaction interface.
 void addTransactionListenerNoCheck(TransactionListener listener)
          Implementation of the DBTransaction interface.
 void addTransactionPostListener(TransactionPostListener listener)
          Implementation of the DBTransaction interface.
 void addTransactionPostListenerNoCheck(TransactionPostListener listener)
          Implementation of the DBTransaction interface.
 void addTransactionStateListener(TransactionStateListener tl)
           
 void addWarning(JboWarning warn)
          Implementation of the DBTransaction interface.
 void applyChangeSet(int id)
          Applies the changes committed by another transaction in order to synchronize caches between root Application Module instances.
 void clearEntityCache(java.lang.String entityName)
          Clears the cache of the specified Entity Object.
 void closeTransaction()
          Implementation of the DBTransaction interface.
 void commit()
          Implementation of the DBTransaction interface.
 int commitAndSaveChangeSet()
          Commits the transaction and writes updated EntityImpls to the persistent store.
 void connect(java.sql.Connection sqlConnection)
          Deprecated.  
 void connect(java.lang.String url)
          Implementation of the DBTransaction interface.
 void connect(java.lang.String url, java.util.Properties info)
          Implementation of the DBTransaction interface.
 void connect(java.lang.String url, java.lang.String user, java.lang.String password)
          Implementation of the DBTransaction interface.
 void connectToDataSource(javax.sql.DataSource ds, boolean isJTAbased)
           
 void connectToDataSource(javax.sql.DataSource ds, java.lang.String user, java.lang.String passwd, boolean isJTAbased)
           
 void connectToDataSource(java.util.Hashtable env, java.lang.String dsName, boolean isJTABased)
          Looks up a datasource from a jndi tree and acquires the jdbc connection from the looked up datasource using the javax.sql.Datasource.getConnection(String user, String passwd) method.
 void connectToDataSource(java.util.Hashtable env, java.lang.String dsName, java.lang.String user, java.lang.String passwd, boolean isJTABased)
          Looks up a datasource from a jndi tree and acquires the jdbc connection from the looked up datasource using the javax.sql.Datasource.getConnection(String user, String passwd) method.
 void connectToDataSource(java.lang.String nsUrl, java.lang.String nsUser, java.lang.String nsPasswd, java.lang.String dsUrl)
          Looks up a datasource from Oracle 8i namespace using the jdbc_access protocol and acquires the default jdbc connection from the looked up datasource using the javax.sql.Datasource.getConnection() method.
 void connectToDataSource(java.lang.String nsUrl, java.lang.String nsUser, java.lang.String nsPasswd, java.lang.String dsUrl, java.lang.String user, java.lang.String passwd)
          Looks up a datasource from Oracle 8i namespace using the jdbc_access protocol and acquires the jdbc connection from the looked up datasource using the javax.sql.Datasource.getConnection(String user, String password) method.
 ApplicationModule createApplicationModule(java.lang.String defName)
          Implementation of the DBTransaction interface.
 ApplicationModule createApplicationModule(java.lang.String amName, java.lang.String defName)
          Implementation of the DBTransaction interface.
 java.sql.CallableStatement createCallableStatement(java.lang.String str, int noRowsPrefetch)
          Implementation of the DBTransaction interface.
 EntityImpl createEntityInstance(EntityDefImpl entityDef, AttributeList al)
          Implementation of the DBTransaction interface.
 EntityImpl createEntityInstance(java.lang.String entityDefName, AttributeList al)
          Implementation of the DBTransaction interface.
 java.sql.PreparedStatement createPreparedStatement(java.lang.String str, int noRowsPrefetch)
          Implementation of the DBTransaction interface.
 java.lang.Object createRef(java.lang.String structName, byte[] data)
          Internal: Applications should not use this method.
 java.sql.Statement createStatement(int noRowsPrefetch)
          Implementation of the DBTransaction interface.
 ViewLink createViewLink(java.lang.String viewLinkDefName, ViewObject master, ViewObject detail)
          Implementation of the DBTransaction interface.
 ViewLink createViewLinkBetweenViewObjects(java.lang.String accessorName, ViewObject master, AttributeDef[] srcAttrs, ViewObject detail, AttributeDef[] destAttrs, java.lang.String assocClause)
          Implementation of the DBTransaction interface.
 ViewLink createViewLinkFromEntityAssocName(java.lang.String entityAssocName, ViewObject master, ViewObject detail)
          Implementation of the DBTransaction interface.
 ViewObject createViewObject(java.lang.String voDefName)
          Implementation of the DBTransaction interface.
 ViewObject createViewObjectFromQueryClauses(java.lang.String eoName, java.lang.String selectClause, java.lang.String fromClause, java.lang.String whereClause, java.lang.String orderByClause)
          Implementation of the DBTransaction interface.
 ViewObject createViewObjectFromQueryStmt(java.lang.String sqlStatement)
          Implementation of the DBTransaction interface.
 void disconnect()
          Implementation of the DBTransaction interface.
 void disconnect(boolean retainState)
          Closes the JDBC connection object and removes this transaction from the root application module.
 java.lang.String dumpQueryResult(java.lang.String query, java.lang.String dumpClassName, java.lang.String[] data)
          Implementation of the DBTransaction interface.
 int executeCommand(java.lang.String command)
          Implementation of the DBTransaction interface.
 ApplicationModule findApplicationModule(java.lang.String amName)
          Implementation of the DBTransaction interface.
 EntityImpl findByPrimaryKey(EntityDefImpl entityDef, Key key)
          Implementation of the DBTransaction interface.
 EntityImpl findByPrimaryKey(java.lang.String entityDefName, Key key)
          Implementation of the DBTransaction interface.
 ConnectionMetadata getConnectionMetadata()
          Returns a metdata structure that describes the transaction's JDBC connection.
 int getLockingMode()
          Implementation of the DBTransaction interface.
 int getPostThreshold()
          Implementation of the DBTransaction interface.
 Session getSession()
          Implementation of the DBTransaction interface.
 SQLBuilder getSQLBuilder()
           
 TransactionHandler getTransactionHandler()
          Internal: Applications should not use this method.
protected  ApplicationModuleImpl getTxnApplicationModuleImpl()
           
 int getValidationThreshold()
          Implementation of the DBTransaction interface.
 boolean isBundledExceptionMode()
           
 boolean isClearCacheOnCommit()
          Indicates whether all Entity Object caches will be cleared after the transaction is committed.
 boolean isClearCacheOnRollback()
          Indicates whether all Entity Object caches will be cleared after the transaction is rolled back.
 boolean isConnected()
          Implementation of the DBTransaction interface.
 boolean isDirty()
          Implementation of the DBTransaction interface.
 void postChanges()
          Implementation of the DBTransaction interface.
 void reconnect()
          Reconnect the application module to the database, if necessary, using previously supplied database credentials.
 void reconnect(boolean force)
          Implementation of the DBTransaction interface.
 void removeChangeSet(int id)
          Removes the change set that defines the changes to EntityImpls within a transaction.
 void removeTransactionListener(TransactionListener listener)
          Implementation of the DBTransaction interface.
 void removeTransactionPostListener(TransactionPostListener listener)
          Implementation of the DBTransaction interface.
 void removeTransactionStateListener(TransactionStateListener tl)
           
 void rollback()
          Implementation of the DBTransaction interface.
 void setBundledExceptionMode(boolean flag)
          Set this transaction into bundled exception mode.
 void setClearCacheOnCommit(boolean val)
          Indicates whether all Entity Object caches will be cleared after the transaction is committed.
 void setClearCacheOnRollback(boolean val)
          Indicates whether all Entity Object caches will be cleared after the transaction is rolled back.
 void setLockingMode(int mode)
          Implementation of the DBTransaction interface.
 void setPostThreshold(int count)
          Implementation of the DBTransaction interface.
 void setTransactionHandler(TransactionHandler txnHandler)
          Internal: Applications should not use this method.
 void setValidationThreshold(int count)
          Implementation of the DBTransaction interface.
 void validate()
          Implementation of the DBTransaction interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mConnectionCredentials

protected ConnectionCredentials mConnectionCredentials
Constructor Detail

NullDBTransactionImpl

public NullDBTransactionImpl()
Method Detail

closeTransaction

public void closeTransaction()
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
closeTransaction in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

commit

public void commit()
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
commit in interface Transaction
Throws:
NotConnectedConnection - Always thrown.

commitAndSaveChangeSet

public int commitAndSaveChangeSet()
Description copied from interface: Transaction
Commits the transaction and writes updated EntityImpls to the persistent store.

This method (along with applyChangeSet and removeChangeSet is used to synchronize the cache between root Application Module instances in an Application Module pool.

commitAndSaveChangeSet commits the transaction, but during the commit process, writes out "changed" EntityImpls to the persistent store. These changes are stored as a "change set". The change set can then be applied to other transactions (that is, to the Entity caches of other root Application Modules).

The integer value returned by this method identifies the change set that is stored in persistent store.

To apply the changes to another transaction (or Application Module cache), call Transaction.applyChangeSet(int) where int is the integer value returned by commitAndSaveChangeSet that represents the change set.

For example, assume you have two root Application Modules, named am1 and am2, in an Application Module pool.

  // The line below commits the transaction in am1 and writes the change
  // set to persistent store (database table).  The returning snapId
  // identifies the (persistent) change set.

  int snapId = am1.getTransaction().commitAndSaveChangeSet();

  // Use that change set and apply the changes to the other Application
  // Module, am2.  That is, apply changes from am1 to am2.

  am2.getTransaction().applyChangeSet(snapId);

  // When you are done with the change set, remove (free) it.

  am1.getTransaction().removeChangeSet(snapId);
 

Specified by:
commitAndSaveChangeSet in interface Transaction
Following copied from interface: oracle.jbo.Transaction
Returns:
an integer representing an EntityImpl change set in persistent store.
See Also:
Transaction.applyChangeSet(int), Transaction.removeChangeSet(int)

applyChangeSet

public void applyChangeSet(int id)
Description copied from interface: Transaction
Applies the changes committed by another transaction in order to synchronize caches between root Application Module instances.

This method (along with commitAndSaveChangeSet and removeChangeSet is used to synchronize the cache between root Application Module instances in an Application Module pool.

Call applyChangeSet to apply changes commited by another transaction. The integer id parameter (returned by commitAndSaveChangeSet) identifies the change set to be found in the persistent store.

After this call, this transaction's cache is synchronized with the changes from the change set.

For an example of how to use applyChangeSet, see commitAndSaveChangeSet.

Specified by:
applyChangeSet in interface Transaction
Following copied from interface: oracle.jbo.Transaction
Parameters:
id - an integer representing the change set to apply to the transaction.
See Also:
Transaction.commitAndSaveChangeSet(), Transaction.removeChangeSet(int)

removeChangeSet

public void removeChangeSet(int id)
Description copied from interface: Transaction
Removes the change set that defines the changes to EntityImpls within a transaction.

This method (along with commitAndSaveChangeSet and applyChangeSet is used to synchronize the cache between root Application Module instances in an Application Module pool.

For an example of how to use removeChangeSet, see commitAndSaveChangeSet.

Specified by:
removeChangeSet in interface Transaction
Following copied from interface: oracle.jbo.Transaction
Parameters:
id - an integer representing the change set to remove from the persistent store.
See Also:
Transaction.commitAndSaveChangeSet(), Transaction.applyChangeSet(int)

rollback

public void rollback()
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
rollback in interface Transaction
Throws:
NotConnectedConnection - Always thrown.

postChanges

public void postChanges()
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
postChanges in interface Transaction
Throws:
NotConnectedConnection - Always thrown.

isDirty

public boolean isDirty()
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
isDirty in interface Transaction
Throws:
NotConnectedConnection - Always thrown.

setPostThreshold

public void setPostThreshold(int count)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
setPostThreshold in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

getPostThreshold

public int getPostThreshold()
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
getPostThreshold in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

setValidationThreshold

public void setValidationThreshold(int count)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
setValidationThreshold in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

getValidationThreshold

public int getValidationThreshold()
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
getValidationThreshold in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

addTransactionListener

public void addTransactionListener(TransactionListener listener)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
addTransactionListener in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

addTransactionListenerNoCheck

public void addTransactionListenerNoCheck(TransactionListener listener)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
addTransactionListenerNoCheck in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

removeTransactionListener

public void removeTransactionListener(TransactionListener listener)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
removeTransactionListener in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

addTransactionPostListener

public void addTransactionPostListener(TransactionPostListener listener)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
addTransactionPostListener in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

addTransactionPostListenerNoCheck

public void addTransactionPostListenerNoCheck(TransactionPostListener listener)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
addTransactionPostListenerNoCheck in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

removeTransactionPostListener

public void removeTransactionPostListener(TransactionPostListener listener)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
removeTransactionPostListener in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

createStatement

public java.sql.Statement createStatement(int noRowsPrefetch)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
createStatement in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

createCallableStatement

public java.sql.CallableStatement createCallableStatement(java.lang.String str,
                                                          int noRowsPrefetch)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
createCallableStatement in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

createPreparedStatement

public java.sql.PreparedStatement createPreparedStatement(java.lang.String str,
                                                          int noRowsPrefetch)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
createPreparedStatement in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

executeCommand

public int executeCommand(java.lang.String command)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
executeCommand in interface Transaction
Throws:
NotConnectedConnection - Always thrown.

dumpQueryResult

public java.lang.String dumpQueryResult(java.lang.String query,
                                        java.lang.String dumpClassName,
                                        java.lang.String[] data)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
dumpQueryResult in interface Transaction
Throws:
NotConnectedConnection - Always thrown.

validate

public void validate()
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
validate in interface Transaction
Throws:
NotConnectedConnection - Always thrown.

addToValidationListeners

public void addToValidationListeners(ValidationListener w)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
addToValidationListeners in interface ValidationManager
Throws:
NotConnectedConnection - Always thrown.

connect

public void connect(java.sql.Connection sqlConnection)
Deprecated.  

Implementation of the DBTransaction interface. Transitions the application from disconnected to connected state using the DatabaseTransactionFactory.
Specified by:
connect in interface DBTransaction
Parameters:
sqlConnection - Reqeusts the factory to create a DBTransactionImpl object from the given Connection
Since:
5.0
See Also:
DBTransaction.connect(Connection), DatabaseTransactionFactory

connect

public void connect(java.lang.String url)
Implementation of the DBTransaction interface. Transitions the application from disconnected to connected state using the DatabaseTransactionFactory.
Specified by:
connect in interface Transaction
Parameters:
url - Reqeusts the factory to create a DBTransactionImpl object from the given URL
See Also:
Transaction.connect(String), DatabaseTransactionFactory

connect

public void connect(java.lang.String url,
                    java.util.Properties info)
Implementation of the DBTransaction interface. Transitions the application from disconnected to connected state using the DatabaseTransactionFactory.
Specified by:
connect in interface Transaction
Parameters:
url - Reqeusts the factory to create a DBTransactionImpl object from the given url and properties
info - Reqeusts the factory to create a DBTransactionImpl object from given the url and properties
See Also:
Transaction.connect(String, Properties), DatabaseTransactionFactory

connect

public void connect(java.lang.String url,
                    java.lang.String user,
                    java.lang.String password)
Implementation of the DBTransaction interface. Transitions the application from disconnected to connected state using the DatabaseTransactionFactory.
Specified by:
connect in interface Transaction
Parameters:
url - Reqeusts the factory to create a DBTransactionImpl object from the given url, username and password.
user - Reqeusts the factory to create a DBTransactionImpl object from the given url, username and password.
password - Reqeusts the factory to create a DBTransactionImpl object from the given url, username and password.
See Also:
Transaction.connect(String, Properties), DatabaseTransactionFactory

disconnect

public void disconnect()
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
disconnect in interface Transaction
Throws:
NotConnectedConnection - Always thrown.

isConnected

public boolean isConnected()
Implementation of the DBTransaction interface. Test if JDBC connection is established
Specified by:
isConnected in interface Transaction
Returns:
Always returns false.

reconnect

public void reconnect(boolean force)
Implementation of the DBTransaction interface. reconnects if possible: ie. if we have been connected before, using the existing credentials.
Specified by:
reconnect in interface Transaction
Throws:
NotConnectedConnection - Always thrown.

setLockingMode

public void setLockingMode(int mode)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
setLockingMode in interface Transaction
Throws:
NotConnectedConnection - Always thrown.

getLockingMode

public int getLockingMode()
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
getLockingMode in interface Transaction
Throws:
NotConnectedConnection - Always thrown.

getTransactionHandler

public TransactionHandler getTransactionHandler()
Description copied from interface: DBTransaction
Internal: Applications should not use this method.
Specified by:
getTransactionHandler in interface DBTransaction

setTransactionHandler

public void setTransactionHandler(TransactionHandler txnHandler)
Description copied from interface: DBTransaction
Internal: Applications should not use this method.
Specified by:
setTransactionHandler in interface DBTransaction

createEntityInstance

public EntityImpl createEntityInstance(EntityDefImpl entityDef,
                                       AttributeList al)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
createEntityInstance in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

createEntityInstance

public EntityImpl createEntityInstance(java.lang.String entityDefName,
                                       AttributeList al)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
createEntityInstance in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

findByPrimaryKey

public EntityImpl findByPrimaryKey(EntityDefImpl entityDef,
                                   Key key)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
findByPrimaryKey in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

findByPrimaryKey

public EntityImpl findByPrimaryKey(java.lang.String entityDefName,
                                   Key key)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
findByPrimaryKey in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

createApplicationModule

public ApplicationModule createApplicationModule(java.lang.String amName,
                                                 java.lang.String defName)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
createApplicationModule in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

findApplicationModule

public ApplicationModule findApplicationModule(java.lang.String amName)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
findApplicationModule in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

createViewObject

public ViewObject createViewObject(java.lang.String voDefName)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
createViewObject in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

createViewObjectFromQueryClauses

public ViewObject createViewObjectFromQueryClauses(java.lang.String eoName,
                                                   java.lang.String selectClause,
                                                   java.lang.String fromClause,
                                                   java.lang.String whereClause,
                                                   java.lang.String orderByClause)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
createViewObjectFromQueryClauses in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

createViewObjectFromQueryStmt

public ViewObject createViewObjectFromQueryStmt(java.lang.String sqlStatement)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
createViewObjectFromQueryStmt in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

createApplicationModule

public ApplicationModule createApplicationModule(java.lang.String defName)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
createApplicationModule in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

createViewLink

public ViewLink createViewLink(java.lang.String viewLinkDefName,
                               ViewObject master,
                               ViewObject detail)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
createViewLink in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

createViewLinkFromEntityAssocName

public ViewLink createViewLinkFromEntityAssocName(java.lang.String entityAssocName,
                                                  ViewObject master,
                                                  ViewObject detail)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
createViewLinkFromEntityAssocName in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

createViewLinkBetweenViewObjects

public ViewLink createViewLinkBetweenViewObjects(java.lang.String accessorName,
                                                 ViewObject master,
                                                 AttributeDef[] srcAttrs,
                                                 ViewObject detail,
                                                 AttributeDef[] destAttrs,
                                                 java.lang.String assocClause)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
createViewLinkBetweenViewObjects in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

addWarning

public void addWarning(JboWarning warn)
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
addWarning in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

getSession

public Session getSession()
Implementation of the DBTransaction interface. Calling this method always results in NotConnectedException.
Specified by:
getSession in interface DBTransaction
Throws:
NotConnectedConnection - Always thrown.

getSQLBuilder

public SQLBuilder getSQLBuilder()
Specified by:
getSQLBuilder in interface DBTransaction

getConnectionMetadata

public ConnectionMetadata getConnectionMetadata()
Description copied from interface: Transaction
Returns a metdata structure that describes the transaction's JDBC connection.
Specified by:
getConnectionMetadata in interface Transaction

isClearCacheOnCommit

public boolean isClearCacheOnCommit()
Description copied from interface: Transaction
Indicates whether all Entity Object caches will be cleared after the transaction is committed. If the Entity caches are cleared, they will be refreshed with new data from the database. Clearing the Entity cache will ensure that all changes from the database will be captured; relying on the fault-in mechanism or RowSet.executeQuery might miss some of the changes.

The value of the Application Module's isClearCacheOnCommit() flag will be used if the client has not set this flag in the Transaction. At the end of transaction, the transaction checks the value of its isClearCacheOnCommit() flag and either clears the Entity Object caches or not. However, if the client never called setClearCacheOnCommit on this transaction, the framework will use the value for the root Application Module's definition object.

In contrast, if the client called setClearCacheOnCommit on the Transaction, then the value of the root Application Module Def's isClearCacheOnCommit is not used.

Note that clearing the Entity Object caches has performance ramifications: repopulating the caches is expensive in terms of time and processing effort.

For middle-tier applications, you can use isClearCacheOnCommit and setClearCacheOnCommit in the DBTransactionImpl class.

Specified by:
isClearCacheOnCommit in interface Transaction
Following copied from interface: oracle.jbo.Transaction
Returns:
true indicates that the Entity Object caches will be cleared on commit, and will be refreshed with new data from the database.
See Also:
RowSet.executeQuery(), Transaction.setClearCacheOnCommit(boolean val), DBTransactionImpl.isClearCacheOnCommit(), DBTransactionImpl.setClearCacheOnCommit(boolean val)

setClearCacheOnCommit

public void setClearCacheOnCommit(boolean val)
Description copied from interface: Transaction
Indicates whether all Entity Object caches will be cleared after the transaction is committed. For more information on this topic, see isClearCacheOnCommit.
Specified by:
setClearCacheOnCommit in interface Transaction
Following copied from interface: oracle.jbo.Transaction
Parameters:
val - true indicates that the Entity Object caches will be cleared on commit, and will be refreshed with new data from the database.
See Also:
#isClearCacheOnCommit(boolean val)

isClearCacheOnRollback

public boolean isClearCacheOnRollback()
Description copied from interface: Transaction
Indicates whether all Entity Object caches will be cleared after the transaction is rolled back. If the Entity caches are cleared, they will be refreshed with new data from the database. Clearing the Entity caches will ensure that all changes from the database will be captured; relying on the fault-in mechanism or RowSet.executeQuery might miss some of the changes.

The value of the Application Module's isClearCacheOnRollback() flag will be used if the client has not set this flag in the Transaction. At the end of transaction, the transaction checks the value of its isClearCacheOnRollback flag and either clears the Entity Object caches or not. However, if the client never called setClearCacheOnRollback on this transaction, the framework will use the value for the root Application Module's definition object.

In contrast, if the client called oracle.jbo.Transaction.setClearCacheOnRollback on the Transaction, then the value of the root Application Module Def's isClearCacheOnRollback is not used.

For middle-tier applications, you can use isClearCacheOnCommit and setClearCacheOnCommit in the DBTransactionImpl class.

Note that clearing the Entity Object caches has performance ramifications: repopulating the caches is expensive in terms of time and processing effort.

Specified by:
isClearCacheOnRollback in interface Transaction
Following copied from interface: oracle.jbo.Transaction
Returns:
true indicates that the Entity Object caches will be cleared on rollback, and will be refreshed with new data from the database.
See Also:
RowSet.executeQuery(), Transaction.setClearCacheOnRollback(boolean val), DBTransactionImpl.setClearCacheOnRollback(boolean val), DBTransactionImpl.isClearCacheOnRollback()

setClearCacheOnRollback

public void setClearCacheOnRollback(boolean val)
Description copied from interface: Transaction
Indicates whether all Entity Object caches will be cleared after the transaction is rolled back. For more information on this topic, see isClearCacheOnRollback
Specified by:
setClearCacheOnRollback in interface Transaction
Following copied from interface: oracle.jbo.Transaction
Parameters:
val - true indicates that the Entity Object caches will be cleared on rollback, and will be refreshed with new data from the database.
See Also:
Transaction.isClearCacheOnRollback()

createRef

public java.lang.Object createRef(java.lang.String structName,
                                  byte[] data)
Description copied from interface: Transaction
Internal: Applications should not use this method.
Specified by:
createRef in interface Transaction

clearEntityCache

public void clearEntityCache(java.lang.String entityName)
Description copied from interface: Transaction
Clears the cache of the specified Entity Object. A value of null clears the caches of all Entities. If a View Object uses the Entity Object, the View Object's cache will be cleared as well.
Specified by:
clearEntityCache in interface Transaction
Following copied from interface: oracle.jbo.Transaction
Parameters:
entityName - the name of the entity whose cache is to be cleared. If null, caches for all entities are cleared.

reconnect

public void reconnect()
Reconnect the application module to the database, if necessary, using previously supplied database credentials.
Specified by:
reconnect in interface DBTransaction

disconnect

public void disconnect(boolean retainState)
Closes the JDBC connection object and removes this transaction from the root application module. Retains the ApplicationModule state wrt cache as is.

All ViewObjects should have fetched all their data or be in forwardonly mode before this method is invoked with retainState = true

In the middle-tier, you can also use the disconnect method on the DBTransactionImpl interface.

Specified by:
disconnect in interface DBTransaction

connectToDataSource

public void connectToDataSource(java.lang.String nsUrl,
                                java.lang.String nsUser,
                                java.lang.String nsPasswd,
                                java.lang.String dsUrl)
Description copied from interface: Transaction
Looks up a datasource from Oracle 8i namespace using the jdbc_access protocol and acquires the default jdbc connection from the looked up datasource using the javax.sql.Datasource.getConnection() method.

Specified by:
connectToDataSource in interface Transaction
Following copied from interface: oracle.jbo.Transaction
Parameters:
nsUrl - Url to the jndi namespace where the datasource is bound
nsUser - User name that is used to access the namespace.
nsPasswd - nsUsers' passwd
datasourceName - Datasource name as bound in the namespace. Name can be the fully qaultified url such as jdbc_access://test/ds/db1 otherwise the the url prefix jdbc_acess:// is prepended to the datasource name for lookup.

connectToDataSource

public void connectToDataSource(java.lang.String nsUrl,
                                java.lang.String nsUser,
                                java.lang.String nsPasswd,
                                java.lang.String dsUrl,
                                java.lang.String user,
                                java.lang.String passwd)
Description copied from interface: Transaction
Looks up a datasource from Oracle 8i namespace using the jdbc_access protocol and acquires the jdbc connection from the looked up datasource using the javax.sql.Datasource.getConnection(String user, String password) method.

Specified by:
connectToDataSource in interface Transaction
Following copied from interface: oracle.jbo.Transaction
Parameters:
nsUrl - Url to the jndi namespace where the datasource is bound
nsUser - User name that is used to access the namespace.
nsPasswd - nsUsers' passwd
datasourceName - Datasource name as bound in the namespace. Name can be the fully qaultified url such as jdbc_access://test/ds/db1 otherwise the the url prefix jdbc_acess:// is prepended to the datasource name for lookup.
user - Username for which the connection is acquired from the datasource
password - User's password.

connectToDataSource

public void connectToDataSource(javax.sql.DataSource ds,
                                boolean isJTAbased)
Specified by:
connectToDataSource in interface DBTransaction

connectToDataSource

public void connectToDataSource(javax.sql.DataSource ds,
                                java.lang.String user,
                                java.lang.String passwd,
                                boolean isJTAbased)
Specified by:
connectToDataSource in interface DBTransaction

connectToDataSource

public void connectToDataSource(java.util.Hashtable env,
                                java.lang.String dsName,
                                java.lang.String user,
                                java.lang.String passwd,
                                boolean isJTABased)
Description copied from interface: Transaction
Looks up a datasource from a jndi tree and acquires the jdbc connection from the looked up datasource using the javax.sql.Datasource.getConnection(String user, String passwd) method.

Specified by:
connectToDataSource in interface Transaction
Following copied from interface: oracle.jbo.Transaction
Parameters:
initialContextEnv - Envirionment used the create initial context. May be null.
datasourceName - Datasource name as bound in the namespace.
user - Username for which the connection is acquired from the datasource
password - User's password.
isXABased - True if datasource is XADataSource implementation. If true, the tranasction is assumed to be controlled by an external transaction manager.

connectToDataSource

public void connectToDataSource(java.util.Hashtable env,
                                java.lang.String dsName,
                                boolean isJTABased)
Description copied from interface: Transaction
Looks up a datasource from a jndi tree and acquires the jdbc connection from the looked up datasource using the javax.sql.Datasource.getConnection(String user, String passwd) method.

Specified by:
connectToDataSource in interface Transaction
Following copied from interface: oracle.jbo.Transaction
Parameters:
initialContextEnv - Envirionment used the create initial context. May be null.
datasourceName - Datasource name as bound in the namespace.
isXABased - True if datasource is XADataSource implementation. If true, the tranasction is assumed to be controlled by an external transaction manager.

setBundledExceptionMode

public void setBundledExceptionMode(boolean flag)
Description copied from interface: Transaction
Set this transaction into bundled exception mode. In this mode, all exceptions thrown during updates to rows will be cached by the entity-cache. However when the rows are validated either by explicit validation call or when the transaction is committed, these exceptions will be thrown bundled in a RowValException. When in bundledException mode, validation code in setXXX methods on the Entity will be executed and if a ValidationException is thrown from these methods, they're cached by the Entity and thrown later as a detail of RowValException when the Entity is eventually validated.
Specified by:
setBundledExceptionMode in interface Transaction

isBundledExceptionMode

public final boolean isBundledExceptionMode()
Specified by:
isBundledExceptionMode in interface Transaction

getTxnApplicationModuleImpl

protected ApplicationModuleImpl getTxnApplicationModuleImpl()

addTransactionStateListener

public void addTransactionStateListener(TransactionStateListener tl)
Specified by:
addTransactionStateListener in interface Transaction

removeTransactionStateListener

public void removeTransactionStateListener(TransactionStateListener tl)
Specified by:
removeTransactionStateListener in interface Transaction

Business Components