JAC project
AOPSYS
CEDRIC & LIP6 labs

Package org.objectweb.jac.aspects.distrans.persistence

Provides an aspect that allows to define persistent data for a distributed transaction.

See:
          Description

Interface Summary
PersistenceItf  
 

Class Summary
PersistenceAC Transaction-enabled persistence storage.
ReadWrapper This class define a wrapping method (read) for wrappees that perform read operations on transactional ressources.
SimpleDbPersistence Basic transaction-enabled persistence storage.
WriteWrapper This class define a wrapping method (write) for wrappees that perform write operations on transactional ressources.
XAPoolCache This class implements a cache of connections towards multiple XADataSource.
 

Package org.objectweb.jac.aspects.distrans.persistence Description

Provides an aspect that allows to define persistent data for a distributed transaction. This aspect is used jointly with org.objectweb.jac.aspects.distrans.DistransAC.

The typical usage scenario of this AC is illustrated below (the example can also be found in the org.objectweb.jac.samples.distransbank application).

/**
 * Tell which technical API is to be selected for persistence.
 */
setStorageType org.objectweb.jac.aspects.distrans.persistence.SimpleDbPersistence;

/**
 * Define data source names (bank0 & bank1).
 * These data sources represent persistent storage locations.
 * Additional parameters are: the JDBC driver class name, the JDBC URL,
 * the user login, the user password.
 */
defineDataSource bank0 org.postgresql.Driver "jdbc:postgresql://localhost/bank0" "Lionel Seinturier" "";
defineDataSource bank1 org.postgresql.Driver "jdbc:postgresql://localhost/bank1" "Lionel Seinturier" "";

/** If needed, create tables to hold data on these data sources. */
initStorageIfNeeded org.objectweb.jac.samples.distransbank.Account bank0;
initStorageIfNeeded org.objectweb.jac.samples.distransbank.Account bank1;

/**
 * Tell which JAC objects (account0 & account1)
 * are to be made persistent.
 * Give also the name of the data source where these objects are stored.
 */
registerPersistentRessource account0 bank0;
registerPersistentRessource account1 bank1;

Related Documentation

For overviews, sources, tutorials, examples, guides, and tool documentation, please see:


Contact JAC development team:
Renaud Pawlak
Lionel Seinturier
Laurent Martelli