[Registry-dev] Transactional API methods for the Regisrty interface

Chathura C. Ekanayake chathura at wso2.com
Mon Sep 24 00:25:03 PDT 2007


Hi Paul,

Yes, we need a rollback() method as well :)

Thanks,
Chathura

Paul Fremantle wrote:
> Chathura
>
> How about a "rollback()"!?
>
> Paul
>
> Chathura C. Ekanayake wrote:
>>
>> 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
>>
>> _______________________________________________
>> Registry-dev mailing list
>> Registry-dev at wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/registry-dev
>>
>




More information about the Registry-dev mailing list