commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject [transaction] allow (easier) subclassing of FileResourceManager
Date Fri, 27 Jan 2006 15:41:57 GMT
Long time ago I mentioned a problem with the usage of the transaction ids as
directory name [1]. This problem resulted from JOTM using colon as part of an
Xid. For easier subclassing I created a patch at [2], so that all references to
this directory are collected at one place (getTransactionBaseDir(Object txId)).
This method could be easily overwritten in subclasses. Would be nice if anyone
could apply it.

Besides that I have a second problem subclassing FileResourceManager. I want to
add a feature allowing to append to an existent file, by adding
writeResource(Object txId, Object resourceId, boolean append). I copied the
existing writeResource(Object txId, Object resourceId) into my subclass and
ended at TransactionContext.readonly not being visible to my subclass. The
simple solution would be to add a public setter to TransactionContext, the
better solution to implement writeResource(Object txId, Object resourceId,
boolean append) ;)
For the implementation: If I get it correctly the file that should be written to
must be copied from store dir to work dir if it does not yet exist in the work
dir.

Thanks

Jörg

[1] http://marc.theaimsgroup.com/?l=jakarta-commons-dev&m=113101671215483&w=4
[2] http://issues.apache.org/bugzilla/show_bug.cgi?id=37379


---------------------------------------------------------------------
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