JAC project
AOPSYS
CEDRIC & LIP6 labs

org.objectweb.jac.aspects.distrans.persistence
Class ReadWrapper

java.lang.Object
  |
  +--org.objectweb.jac.core.Wrapper
        |
        +--org.objectweb.jac.aspects.distrans.persistence.ReadWrapper
All Implemented Interfaces:
Serializable

public class ReadWrapper
extends Wrapper

This class define a wrapping method (read) for wrappees that perform read operations on transactional ressources. This wrapper may wrap several wrappees from different classes. Each wrappee field is mapped onto a SQL table attribute. The SQL tables contain one more attribute which is the name of the wrappee, and which is also the primary key of the table.

Version:
1.0
Author:
Lionel Seinturier
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.jac.core.Wrapper
ac
 
Constructor Summary
ReadWrapper(AspectComponent ac, PersistenceItf storage, org.enhydra.jdbc.standard.StandardXADataSource ds)
           
 
Method Summary
 Object read(Interaction interaction)
          Wrapping method for wrappees that perform write operations on transactional ressources.
 
Methods inherited from class org.objectweb.jac.core.Wrapper
attr, attrdef, defines, getAspectComponent, getAspectComponentName, getExceptionHandlers, proceed, setAspectComponent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReadWrapper

public ReadWrapper(AspectComponent ac,
                   PersistenceItf storage,
                   org.enhydra.jdbc.standard.StandardXADataSource ds)
Parameters:
ac - the AC managing this wrapper
storage - the technical instance for persistence
ds - the data source used to create a connection towards the database where the data is stored
Method Detail

read

public Object read(Interaction interaction)
            throws Exception
Wrapping method for wrappees that perform write operations on transactional ressources. After proceeding the interaction, fields value are saved into the database. Fetching (ie reading) the data before, is a way to let the database manage the blocking mechanism whenever concurrent transactions occur.

Exception

Contact JAC development team:
Renaud Pawlak
Lionel Seinturier
Laurent Martelli