Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference VERSION B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.adf.model.generic.toplink
Class TransactionBroker

`java.lang.Object
oracle.adf.model.generic.toplink.TransactionBroker`

Deprecated. - TopLink Data Controls created with 10.1.3 ADF, will no longer use these classes.

public class TransactionBroker
extends java.lang.Object

Purpose: Transactional unti used by all TopLinkDataControls that share common deployment resources in a given application context

Description: Defines the transactional behavior and boundaries for a given instance of a TopLink application in ADF and brokers these transactional properties between all TopLinkDataControls in this application instance. This transactional behavior includes operations such as: create, delete, update, query execution, commit, and rollback. The transactional boundaries of a given application are defined by the application BindingContext instance and extend to all TopLinDataControl which share a common binding context and TopLink deployment and data access resources.

Version:
  10.1.2
See Also:
  `BindingContext`, `DataControlFactoryImpl`, `TopLinkDataControl`

Field Summary
`protected static int` | `CLIENT_SESSION_BROKER_TYPE` Deprecated. Defines this instance as a three tier user of a TopLink Client SessionBroker per application instance.
`protected static int` | `CLIENT_SESSION_TYPE` Deprecated. Defines this TransactionBroker as three tier user of a TopLink ClientSession per application instance.
`protected static int` | `ISOLATED_DATABASE_SESSION_TYPE` Deprecated. Defines this TransactionBroker as using a DatabaseSession per application instance.
`protected static int` | `SHARED_DATABASE_SESSION_TYPE` Deprecated. Defines this TransactionBroker as using a shared DatabaseSession across all application instances.
`protected static int` | `SHARED_SESSION_BROKER_TYPE` Deprecated. Defines this TransactionBroker as using a shared SessionBroker across all application instances.

Constructor Summary
`protected` | `TransactionBroker(oracle.adf.model.BindingContext applicationBindingContext, oracle.toplink.sessions.Session session, PersistenceManager persistenceManager, int brokerType, boolean shouldPerformDeletesFirst)` Deprecated. Creates a new TransactionBroker instance.

Method Summary
`protected void` | `addDataControl(TopLinkDataControl dataControl)` Deprecated. Adds a TopLinkDataControl to be managed by this TransactionBroker.
`protected java.util.Iterator` | `associatedDataControls()` Deprecated. Returns an Iterator over all TopLinkDataControls that are a client of this TransactionBroker.
`protected void` | `commitTransaction()` Deprecated. Commits the transaction for all TopLinkDataControls associated with this TransactionBroker.
`protected java.lang.Object` | `createNewInstance(java.lang.Class objectType)` Deprecated. Creates a new object instance based upon the given class type to be created in this transaction.
`protected java.lang.Object` | `createNewInstance(java.lang.Class objectType, boolean assignSequenceNumber)` Deprecated. Creates a new object instance based upon the given class type to be created in this transaction.
`protected java.lang.Object` | `deleteObject(java.lang.Object objectToRemove)` Deprecated. Marks the given object to be deleted in this transaction.
`protected java.lang.Object` | `executeQuery(java.lang.Class beanClass, java.lang.String queryName, java.util.Vector queryParameters)` Deprecated. Executes the defined TopLink query based upon the given class, query name, and parameters.
`protected java.lang.Object` | `executeReadAllQuery(java.lang.Class javaClass)` Deprecated. Executes the default TopLink "read all" query for the given class.
`protected oracle.adf.model.BindingContext` | `getApplicationBindingContext()` Deprecated. Returns the application BindingContext associated with this TransactionBroker.
`protected PersistenceManager` | `getPersistenceManager()` Deprecated. Returns the PersistenceManager that this TransactionBroker is associated with.
`protected oracle.toplink.sessions.Session` | `getSession()` Deprecated. Returns the Session associated with this transaction.
`protected oracle.toplink.sessions.UnitOfWork` | `getUnitOfWork()` Deprecated. Returns the UnitOfWork associated with this transaction.
`protected void` | `initialize(oracle.adf.model.BindingContext applicationBindingContext, oracle.toplink.sessions.Session session, PersistenceManager persistenceManager, int brokerType, boolean shouldPerformDeletesFirst)` Deprecated. Initializes based constructor parameters.
`protected boolean` | `isDataControlRegistered(TopLinkDataControl dataControl)` Deprecated. Determines whether a TopLinkDataControl is being managed by this TransactionBroker.
`protected void` | `notifyStateReset()` Deprecated. Notifies all TopLinkDataControls associated with this application and TL transactional resources that the transactional state has been reset.
`protected void` | `notifyTransactionCommitted()` Deprecated. Notifies all TopLinkDataControls associated with this application and TL transactional resources that the transaction has been commited.
`protected void` | `notifyTransactionRolledback()` Deprecated. Notifies all TopLinkDataControls associated with this application and TL transactional resources that the transaction has been rolled back.
`protected java.lang.Object` | `registerInTransaction(java.lang.Object object)` Deprecated. Registers the given object in this transaction.
`protected void` | `release(TopLinkDataControl dataControl)` Deprecated. Handles the releasing behavior that occurs when associated TopLinkDataControls are released from the binding container and subsequent application server (typically during application timeout or shutdown).
`protected void` | `releaseSession()` Deprecated. Releases the TL Session and performs a logout if necessary.
`protected void` | `releaseUnitOfWork()` Deprecated. Releases the UnitOfWork for this broker.
`protected void` | `removeDataControl(TopLinkDataControl dataControl)` Deprecated. Removes a TopLinkDataControl from being managed by this TransactionBroker.
`protected void` | `resetState()` Deprecated. Resets the transaction for all TopLinkDataControls associated with this TransactionBroker.
`protected void` | `resetTransactionalResources()` Deprecated. Resets the transactional resources for this TransactionalBroker instance and notifies all associated TopLinkDataControls of that the transactional state has been reset.
`protected void` | `resetUnitOfWork()` Deprecated. Creates and configures a new TopLink UnitOfWork from the client Session.
`protected void` | `rollbackTransaction()` Deprecated. Rollback the transaction for all TopLinkDataControls associated with this TransactionBroker.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### CLIENT_SESSION_TYPE

    protected static final int CLIENT_SESSION_TYPE

  Deprecated.
  Defines this TransactionBroker as three tier user of a TopLink ClientSession per application instance.

### CLIENT_SESSION_BROKER_TYPE

    protected static final int CLIENT_SESSION_BROKER_TYPE

  Deprecated.
  Defines this instance as a three tier user of a TopLink Client SessionBroker per application instance.

### SHARED_SESSION_BROKER_TYPE

    protected static final int SHARED_SESSION_BROKER_TYPE

  Deprecated.
  Defines this TransactionBroker as using a shared SessionBroker across all application instances.

### SHARED_DATABASE_SESSION_TYPE

    protected static final int SHARED_DATABASE_SESSION_TYPE

  Deprecated.
  Defines this TransactionBroker as using a shared DatabaseSession across all application instances.

### ISOLATED_DATABASE_SESSION_TYPE

    protected static final int ISOLATED_DATABASE_SESSION_TYPE

  Deprecated.
  Defines this TransactionBroker as using a DatabaseSession per application instance.

Constructor Detail

### TransactionBroker

    protected TransactionBroker(oracle.adf.model.BindingContext applicationBindingContext,
                                oracle.toplink.sessions.Session session,
                                PersistenceManager persistenceManager,
                                int brokerType,
                                boolean shouldPerformDeletesFirst)

  Deprecated.
  Creates a new TransactionBroker instance.
Parameters:
  `applicationBindingContext` - - BindingContext unique to this application instance.
  `session` - - TopLink Session for this application instance.
  `persistenceManager` - - PersistenceManager for all application instances.
  `brokerType` - - describes the mode of operation with regards to the underlying TL Session.
  `shouldPerformDeletesFirst` - - determines whether the UnitOfWork in this TransactionBroker should perform deletes first pn commit.

Method Detail

### initialize

    protected void initialize(oracle.adf.model.BindingContext applicationBindingContext,
                              oracle.toplink.sessions.Session session,
                              PersistenceManager persistenceManager,
                              int brokerType,
                              boolean shouldPerformDeletesFirst)

  Deprecated.
  Initializes based constructor parameters.

### commitTransaction

    protected void commitTransaction()

  Deprecated.
  Commits the transaction for all TopLinkDataControls associated with this TransactionBroker. Also resets the transactional state as being commited for all TopLinkDataControls that are associated with this TransactionBroker.

### rollbackTransaction

    protected void rollbackTransaction()

  Deprecated.
  Rollback the transaction for all TopLinkDataControls associated with this TransactionBroker. Also resets the transactional state as being rolled back for all TopLinkDataControls that are associated with this TransactionBroker.

### resetState

    protected void resetState()

  Deprecated.
  Resets the transaction for all TopLinkDataControls associated with this TransactionBroker. Also resets the transactional state as being rolled back for all TopLinkDataControls that are associated with this TransactionBroker.

### notifyTransactionCommitted

    protected void notifyTransactionCommitted()

  Deprecated.
  Notifies all TopLinkDataControls associated with this application and TL transactional resources that the transaction has been commited.

### notifyTransactionRolledback

    protected void notifyTransactionRolledback()

  Deprecated.
  Notifies all TopLinkDataControls associated with this application and TL transactional resources that the transaction has been rolled back.

### notifyStateReset

    protected void notifyStateReset()

  Deprecated.
  Notifies all TopLinkDataControls associated with this application and TL transactional resources that the transactional state has been reset.

### resetTransactionalResources

    protected void resetTransactionalResources()

  Deprecated.
  Resets the transactional resources for this TransactionalBroker instance and notifies all associated TopLinkDataControls of that the transactional state has been reset. Specifically, the TopLink UnitOfWork is reset to a new instance and all DC instances(and associated RSIs) are brought back to their initial state.

### resetUnitOfWork

    protected void resetUnitOfWork()

  Deprecated.
  Creates and configures a new TopLink UnitOfWork from the client Session. If a UnitOfWork exists already then all working copies in use must be replaced with new working copies.

### registerInTransaction

    protected java.lang.Object registerInTransaction(java.lang.Object object)

  Deprecated.
  Registers the given object in this transaction.
  Returns:
    - the working copy of the object.

### createNewInstance

    protected java.lang.Object createNewInstance(java.lang.Class objectType)

  Deprecated.
  Creates a new object instance based upon the given class type to be created in this transaction. This does not assign a sequence number in the case where the newly created object uses sequencing.
  Returns:
    the working copy of the newly created object.

### createNewInstance

    protected java.lang.Object createNewInstance(java.lang.Class objectType,
                                                 boolean assignSequenceNumber)

  Deprecated.
  Creates a new object instance based upon the given class type to be created in this transaction.
  Parameters:
    `objectType` - - type of object.
    `assignSequenceNumber` - - should assign a sequence number in the case where sequencing is used with the associated object type.
  Returns:
    the working copy of the newly created object.

### deleteObject

    protected java.lang.Object deleteObject(java.lang.Object objectToRemove)

  Deprecated.
  Marks the given object to be deleted in this transaction.
  Returns:
    the working copy of the deleted object.

### release

    protected void release(TopLinkDataControl dataControl)

  Deprecated.
  Handles the releasing behavior that occurs when associated TopLinkDataControls are released from the binding container and subsequent application server (typically during application timeout or shutdown). For each TopLinkDataControl that this method is invoked on, they are disassociated with this TransactionBroker. Upon the last data control instance being released, the given TransactionBroker instance destroys its TL Session(in the Client Session case) and UnitOfWork as well as removing itself from the PersistenceManager.

### releaseUnitOfWork

    protected void releaseUnitOfWork()

  Deprecated.
  Releases the UnitOfWork for this broker.

### releaseSession

    protected void releaseSession()

  Deprecated.
  Releases the TL Session and performs a logout if necessary.

### executeReadAllQuery

    protected java.lang.Object executeReadAllQuery(java.lang.Class javaClass)

  Deprecated.
  Executes the default TopLink "read all" query for the given class.
  Returns:
    result set from read all query.

### executeQuery

    protected java.lang.Object executeQuery(java.lang.Class beanClass,
                                            java.lang.String queryName,
                                            java.util.Vector queryParameters)

  Deprecated.
  Executes the defined TopLink query based upon the given class, query name, and parameters.
  Returns:
    results of the query.

### addDataControl

    protected void addDataControl(TopLinkDataControl dataControl)

  Deprecated.
  Adds a TopLinkDataControl to be managed by this TransactionBroker.

### removeDataControl

    protected void removeDataControl(TopLinkDataControl dataControl)

  Deprecated.
  Removes a TopLinkDataControl from being managed by this TransactionBroker.

### isDataControlRegistered

    protected boolean isDataControlRegistered(TopLinkDataControl dataControl)

  Deprecated.
  Determines whether a TopLinkDataControl is being managed by this TransactionBroker.

### associatedDataControls

    protected java.util.Iterator associatedDataControls()

  Deprecated.
  Returns an Iterator over all TopLinkDataControls that are a client of this TransactionBroker.

### getPersistenceManager

    protected PersistenceManager getPersistenceManager()

  Deprecated.
  Returns the PersistenceManager that this TransactionBroker is associated with.

### getApplicationBindingContext

    protected oracle.adf.model.BindingContext getApplicationBindingContext()

  Deprecated.
  Returns the application BindingContext associated with this TransactionBroker.

### getUnitOfWork

    protected oracle.toplink.sessions.UnitOfWork getUnitOfWork()

  Deprecated.
  Returns the UnitOfWork associated with this transaction.

### getSession

    protected oracle.toplink.sessions.Session getSession()

  Deprecated.
  Returns the Session associated with this transaction.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference VERSION B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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