commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Zeigermann <ozeigerm...@apache.org>
Subject TX (=transaction) Package in commons?
Date Wed, 12 May 2004 10:22:52 GMT
Folks!

I just started an effort to create a package for transactional utility 
classes in the commons sandbox area. The aim is to seperate common 
transaction utilities used in Jakarta Slide into a project of its own. 
As a side-effect I would clean up interfaces and code.

All this would result in a package called org.apache.commons.tx (or 
org.apache.commons.transaction?). It would contain at least the 
following stuff:

interface XAMap extends Map, XAResource
---------------------------------------
All retrieval / insertion of data is done using the well known Map 
methods. Tx controll will also be done using a standard interface from 
the JTA. This also allows to link this cache / map into a distributed 
transaction in a J2EE container, even though this required the 
implementation of a connector.

abstract class XAMapBase implements XAMap
-----------------------------------------
Base class that mainly implements XAResource

class XAHashMap extends XAMapBase; uses HashMap, PriorityLock
-------------------------------------------------------------
Transactional HashMap based on HashMap from java.util. Uses PriorityLock
  from org.apache.commons.tx to allow for several isolation levels that 
are configured in the ctor.

clsss XALRUCache extendes XAMapBase; uses LRUMap, PriorityLock
------------------------------------------------------------------
Transactional Cache based on LRUMap from org.apache.commons.collections. 
Uses PriorityLock from org.apache.commons.tx to allow for several 
isolation levels that are configured in the ctor.

interface MultiLevelLock /
------------------------
class GenericLock implements MultiLevelLock /
-------------------------------------------
class PriorityLock implements MultiLevelLock
--------------------------------------------

Interfaces and implementations for locks that can have more than one 
owner at different compatible levels. PriorityLock allows to specify 
preferences of lock levels. E.g. this would allow to prefer write locks 
over read locks. Preferences can be specified either by direction 
(higher level over lower or vice-versa) or by an array explicitely 
decribing the sequqnece of preferred levels.


MAYBE: Transactional file system
--------------------------------

Slide also contains a transactional file system that allows you to 
create / delete / modify a set of files using full ACID transactions. 
But, maybe, commons is not the right place for this?


WHAT DO I WANT FROM YOU?
------------------------

I am looking for comments / opinions / etc. E.g. "Is commons sandbox the 
right place for such a package?" , "Does all this already exist 
somewhere in Jakarata or somewhere else?", "Are there any reasons I 
should *not* do what I plan?", "Would anyone except my be interested in 
this?" ...

That's it and cheers,

Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message