[Registry-dev] Transactional API methods for the Regisrty interface
Chathura C. Ekanayake
chathura at wso2.com
Sun Sep 23 22:06:07 PDT 2007
When performing resource imports to the registry, it is necessary make
the whole import transactional.
For example we don't want to end up importing only few files and
subdirectories in a imported directory,
if the import fails in the middle of the operation.
To overcome this, I propose following two methods for the Registry
interface.
public void beginTransaction();
public void commit();
So the ResourceImporter can call the beginTrasaction() method before
starting the import. Then import
all resources by calling the put(...) method for all files. Finally call
the commit() method.
Then JDBCRegistry impl can perform all the put() and other updating
methods in a single database transaction.
Alternative approach would be to introduce a import(...) method to the
Registry interface, so that it internally
invokes all put(...) methods in a single transaction.
Thoughts...
Thanks,
Chathura
More information about the Registry-dev
mailing list