[Registry-dev] Transaction support in the embedded registry

Afkham Azeez azeez at wso2.com
Tue Apr 1 23:42:18 PDT 2008


I don't think we need endTransaction. commit & rollback means the end of 
the Transaction.

Azeez

Chathura C. Ekanayake wrote:
> 
> I am implementing the transaction support in the embedded registry 
> layer. I have introduced below four methods to the Registry API to 
> handle transactions. These methods can be used by client application in 
> a similar way to JDBC connection transactions.
> 
> registry.beginTransaction();
> 
> registry.commit();
> 
> registry.rollback();
> 
> registry.endTransaction();
> 
> When beginTransaction() is called, a database connection is obtained and 
> stored in a thread local variable. Then all other database related 
> registry components use that connection by calling:
> 
> Connection conn = Transaction.getConnection();
> 
> When a transaction is started, connections are not commited unless 
> registry.commit() is called. Therefore, client application can perform 
> sequence of operations in a single transaction by listing them within 
> registry.beginTransaction() and registry.commit(). Once the transaction 
> is complete client applications should call registry.endTransaction(), 
> so that the connection is closed and the thread local variable is cleared.
> 
> 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