[Registry-dev] Transaction support in the embedded registry

Deepal Jayasinghe deepal at wso2.com
Tue Apr 1 23:55:09 PDT 2008


>
> I think it is much simpler for the users if you put the necessary 
> methods in the registry itself. They don't have to remember too many 
> APIs.
>
> e.g.
> registry.beginTx();
> try{
>     Resource res = registry.newResource();
>     registry.put("/test", resource);
>
>     Resource res2 = registry.newResource();
>     registry.put("/test2", res2);
>
>     registry.commit();
> } catch(Exception){
>        registry.rollback();
> }
>
> So it is very simple for embedders as you can see above.
But the problem is if someone try to write a new registry implementation 
(that is why we have make the registry an interface) then he has to 
handle that by himself.  IMO the transaction handling should be some 
above layer , not at the registry level. So I m +0 on this.

Thank you!
Deepal





More information about the Registry-dev mailing list