Subj : Re: Adding operator to javascript To : netscape.public.mozilla.jseng From : vector Date : Thu Sep 01 2005 01:04 am This statement can be supported by creating some public interface, which includes methods like: onStartTransaction() onCommit() onRollback() Implementing this interface in custom transaction manager will give us possibility to create some instance of it for each transaction. So we will get a possibility to use any specific transaction manager we need without hacking Rhino in some non-transparent way. The way I can work with transactions now is following myTransactionManager.beginTransaction() try { ....some code goes here... myTransactionManager.commitTransaction() } catch(ex) { myTransactionManager.rollbackTransaction(); } Disadvantage of this structure is that user should explicitly specify instance of transaction manager and call its methods. If we replace it with some statement like the one I've proposed, we can hide our internal implementation. .