Back Forum Reply New

when is commit called with transaction annotation

My application has   openview session filter and enabled  spring aop transactions. I am assuming openview session filter  opens a session for every request puts it in threadlocal and closes after the responses is rendered.Now for processing request web layer calls service class which is annotated with @Transaction so  spring creates a new transaction   once the method is complete  control comes back to web layer , so what happens  to transaction ,is it committed?  or how how does spring know when to call complete transaction , tomarrow if  I add one more service call tho the web layer and if the transaction was complted after the first service will a new transaction gets started for se4cond service call ?
here an example

my struts  performAction  method  and all my service classes has default transaction attribute required

public void performAction(ActionForm...........){     // new transaction starts here     myservice().callMethod1()     // is transaction committed here ?    // a new transaction created for my second call to service ?     myservice2().callMethod1()   

}
and if transaction is committed does the open view session filter  commits transaction ?
please help me understand transaction  behaviour
¥
Back Forum Reply New