Chapter 29: Configuring Persistence Mechanisms  Supported Java, IDL, and JDBC/SQL types

Chapter 29: Configuring Persistence Mechanisms

Storage components

A storage component read and writes component state information from a remote database server or replicates state information to other servers for in-memory stateful failover. If your component uses automatic persistence, Java serialization, or component-managed persistence with an implementation that delegates to EAServer’s built-in storage component, you must specify the storage component used to interact with the persistent data store.

When using persistent (database) storage, the storage component uses the connection cache and database table identified on the Persistence/General subtab in the Component Properties dialog box.

For EJB stateful session beans, HeapStorageReqNew or JdbcStorageReqNew are the recommended storage components. For EJB CMP entity beans, JdbcStorage or JdbcStorageReqNew are recommended, and you cannot use in-memory storage. Table 29-1 describes the storage components available in EAServer.

Table 29-1: EAServer storage components

Storage component

Characteristics

CtsComponents/ JdbcStorage

Uses a JDBC connection cache to provide persistent storage of component state applied in the context of the current EAServer transaction. This component has the Requires transaction attribute. The component’s state is saved in the context of any existing transaction associated with the component. Consequently, a transaction rollback rolls back changes to the state data.

CtsComponents/ JdbcStorageReqNew

Database storage using a JDBC connection cache, applied in the context of a new transaction. A transaction rollback does not affect the storage of state data.

CtsComponents/ HeapStorage

For stateful components only, not for entity components. Supports in-memory failover using a mirror-pair model to replicate state between pairs of servers.

Changes are applied in the context of the current EAServer transaction. A transaction rollback rolls back changes to the state data.

Additional configuration is required to use in-memory storage, as described in “Requirements for in-memory stateful failover”.

CtsComponents/ HeapStorageReqNew

For stateful components only, not for entity components. Supports in-memory failover using a mirror-pair model to replicate state between pairs of servers.

In-memory storage applied in the context of a new transaction. A transaction rollback does not affect the storage of state data.

Additional configuration is required to use in-memory storage, as described in “Requirements for in-memory stateful failover”.

A custom storage component.

You can specify the name of your custom storage implementation, entered as package/component, where package and component are the package and component names, respectively, as displayed in EAServer Manager. The package must be installed on all servers where your component is installed.

Customers and partners can implement custom storage components. The component must implement the CtsComponents::Storage interface and must have the Bind Object option enabled on the Instances tab. Due to the thread-safe instance requirement for the Bind Object option, only C++ and Java are suitable for coding storage components.





Copyright © 2005. Sybase Inc. All rights reserved. Supported Java, IDL, and JDBC/SQL types