Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Back in the day, it was common to manage database transactions in Java by writing code that did it. Something like this:

Transaction tx = session.startTransaction();
...
try {
   tx.commit();
} catch (SomeException e){
   tx.rollback();
}

at the beginning and end of every method. This had some obvious problems - it's redundant, hides the intent of what's happening, etc. So, along came annotation-driven transactions:

@Transaction
public SomeResultObj getResult(...){

    ...
}

Is there any support for declarative transaction management in node.js?

share|improve this question
    
didn't know that was ever common... I've always written code to have a central place to execute JDBC code from and handle transactions, it's just a good idea... –  jwenting Jun 11 at 9:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.