Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3) B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.jbo.common.ampool
Interface Poolable

public interface Poolable

Defines the operationso that an object must support to be pooled by an ApplicationPool.

Not used yet. Still working on some issues with factoring the Transaction operations (connect, disconnect, reconnect, getConnectionMetadata).

Since:
  release specific (what release of product did this appear in)
Version:
  $Header: Poolable.java 05-nov-2005.09:58:16 rvangri Exp $

Method Summary
`byte[]` | `activateState(int id, SessionData info, int flags)` Internal: Applications should not use this method.
`int` | `passivateState(int id, byte[] clientData, int flags)` Internal: Applications should not use this method.
`void` | `prepareSession(SessionData info)` Internal: Applications should not use this method.
`void` | `removeState(int id)` Internal: Applications should not use this method.
`void` | `resetState(int flags)` Advanced use only

Method Detail

### prepareSession

    public void prepareSession(SessionData info)

  Internal: Applications should not use this method.

### resetState

    public void resetState(int flags)

  Advanced use only

  Applications should override/extend `ApplicationModuleImpl.reset()` to reset custom application module state. reset() is invoked by the internal `resetState` before resetState begins cleaning up internal application module state.

  Flag usage:

  `RESET_RELOAD_FLAG` directs resetState to eagerly reload the application module compoonents.

  `RESET_ROLLBACK_FLAG` directs resetState to rollback the application module.

  `RESET_INTERNAL_FLAG` directs resetState to perform an internal reset only. The ApplicationPool uses this to reset a managed state application module while also managing the previous session's state. For example, when RESET_INTERNAL has been specified the reset will not remove the persistent snapshot records on the snapshot stack.

  Resets the non-transaction state of an application module. For example:

       appModule.resetState(false);

  reload forces the application module to reload any child view usages, application module usages, and view link usages.

  Parameters:
    `flags` -

### passivateState

    public int passivateState(int id,
                              byte[] clientData,
                              int flags)

  Internal: Applications should not use this method.

  Serializes the current state of this application module's session, along with all changes cached, to a byte array and returns a unique identifier with which to re-establish the state.

  This method accepts an id which represents the unique identifier that should be used to re-establish the application module state. The id must have been generated by invoking `ApplicationModule.reserveSnapshotId(int)`.

  The same snapshot type bit which was specified when the snapshot id was reserved should be specified when this method is invoked. For example, if `reserveSnapshotId` was invoked with the PASSIVATE_TRANSIENT_FLAG set then this method should be invoked with the PASSIVATE_TRANSIENT_FLAG set. Failing to do so may result in invalid snapshot id exceptions.

  For more information regarding passivation please see `passivateState(int, byte[], int)`.

  Parameters:
    `id` - a reserved passivation id
    `clientData` - cached changes, or any information that a client might want to store.
    `flags` - a bit map defining passivation flags.
  Returns:
    a unique integer identifier associated with an instance of the application module.
  See Also:
    `ApplicationModule.reservePassivationId()`

### activateState

    public byte[] activateState(int id,
                                SessionData info,
                                int flags)

  Internal: Applications should not use this method.

  Deserializes a session-state from the persistent store based on the given `id`. This method always works from the top-level application module. If you have nested application modules and you call this method on a inner application module, it will still work from the top-level module.

  When the `PERSISTENT_SNAPSHOT` bit is set then this method will attempt to locate the snapshot bytes in a persistent store (database or file). If the `PERSISTENT_SNAPSHOT` bit is not set then this method will locate the snapshot bytes on the stack.

  When this method is called, the rows that are updated are locked; new rows are inserted into the transaction cache and posted. This is in contrast to `passivateState(int, byte[], int)`, which does not affect the transaction state.

  The `activateState` method preserves currency. When it is called, it will return the row that was active when `passivateState(int, byte[], int)` was called. For an example usage of `activateState`, see `passivateState(int, byte[], int)`.

  If the `REMOVE_SNAPSHOT` bit is set in the flags then the activation framework will remove the snapshot from the persistent store after activation.

  It is up to the developer to devise a clean-up strategy for the redundant store.

  Parameters:
    `id` - a unique integer identifier associated with an instance of the application module.
  Returns:
    a byte array containing any client information that was originally stored with the `passivateState(int, byte[], int)` method.

### removeState

    public void removeState(int id)

  Internal: Applications should not use this method.

  Removes the application module's session-state, and any cached change information, from the persistent store based on the given `id`. For example:

       appModule.removeState(id);

  Parameters:
    `id` - an unique integer identifier associated with an instance of the application module.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3) 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.