Ce contenu n'est pas disponible dans la langue sélectionnée.

A.2.4. The JDBC Store


The JDBCStore implementation stores persistent object states in a JDBC database. Nested transaction support is available when the JBDCStore is used in conjunction with the Transactional Objects for Java API. All object states are stored as Binary Large Objects (BLOBs) within a single table. Object state size is limited to 64k. If you try to store an object state which exceeds this limit, an exception is thrown and the state is not stored. The transaction is forced to roll back.
When using the JDBC object store, the application needs to provide an implementation of the JDBCAccess interface, located in the com.arjuna.ats.arjuna.objectstore package. See the Example A.2, “JDBCAccess Implementation Example”.

Example A.2. JDBCAccess Implementation Example

	  public interface JDBCAccess
	  {
	  public Connection getConnection () throws SQLException;
	  public void putConnection (Connection conn) throws SQLException;
	  public void initialise (ObjectName objName);
	  }
Copy to Clipboard Toggle word wrap
The implementation of the JDBCAccess class provides the Connection used by the JDBC ObjectStore to save and restore object states. Refer to JDBCAccess Connection Methods for details.

JDBCAccess Connection Methods

getConnection
Returns the Connection to use. This method will be called whenever a connection is required and the implementation should use whatever policy is necessary for determining what connection to return. This method need not return the same Connection instance more than once.
putConnection
Returns one of the Connections acquired from getConnection. Connections are returned if any errors occur when using them.
initialise
Passes additional arbitrary information to the implementation.
The JDBC object store initially requests the number of Connections defined in the com.arjuna.ats.arjuna.objectstore.jdbcPoolSizeInitial property, and uses no more than defined in the com.arjuna.ats.arjuna.objectstore.jdbcPoolSizeMaximum property.
The implementation of the JDBCAccess interface to use should be set in the com.arjuna.ats.arjuna.objectstore.jdbcUserDbAccess property variable.
The type of this object store is JDBCStore.
A JDBC object store can manage the transaction log. The transaction log implementation should be set to JDBCActionStore, and the JDBCAccess method should be provided via the com.arjuna.ats.arjuna.objectstore.jdbcTxDbAccess property. The default table name is JBossTSTxTable.

Note

You can use the same JDBCAccess implementation for both the user object store and the transaction log.
Retour au début
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2026 Red Hat