jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Pfister" <dominique.pfis...@day.com>
Subject Re: Missing (?) code in XAEnvironment class
Date Sat, 09 Dec 2006 12:59:06 GMT
Hi Sawas,

On 12/8/06, Savas Triantafillou <savvas.triantafillou@gmail.com> wrote:
> Hi,
>
> I'm using version 1.1.1  and I was trying to add a lockToken of an
> open-scoped lock to an XASession but it seems to be ignored.
>
> While debugging, I found out that XALockManager.lockTokenAdded redirects to
> XAEnvironment.addLockToken which is ... empty!
>
> I've notice that XAEnvironment.removeLockToken is empty too...
>

Yes, the code is actually missing a "todo" section, describing what
the potential problems are with transactional lock token addition and
removal.

>
> I have updated these methods as follows
>  /**
>      * Add lock token to this environment.
>      * @param lt lock token
>      */
>     public void addLockToken(String lt) {
>         lockMgr.lockTokenAdded(session, lt);
>     }
>
>     /**
>      * Remove lock token from this environment.
>      * @param lt lock token
>      */
>     public void removeLockToken(String lt) {
>         lockMgr.lockTokenRemoved(session, lt);
>     }
>
> but I would like to know if there is more than one should do. For the moment
> this seems to fix
> the problem of adding and removing lock tokens but I have the sense that
> there is more to do...
>

The lock tokens should probably be part of the XAEnvironment (in order
to be associated or disassociated when a XASession is associated or
disassociated with a transaction). For the time being, please file a
JIRA issue.

Kind Regards
Dominique

Mime
View raw message