Announcement Announcement Module
No announcement yet.
Spring + Hibernate + Quartz Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring + Hibernate + Quartz

    I am using Spring 1.2.6, Hibernate 3.0.1

    I have one interface and its implementor defined as

    public interface A {
        public void methodA1() throws DataAccessException;
        public void methodA2() throws DataAccessException;
    public class AImpl extends HibernateDaoSupport implements A {
       public void methodA1() {
       public void methodA2() {
    I have applied transaction on method calls of A >> AImpl using spring's decalrative transaction.
    So when method of A >> AImpl is called, transaction starts and commited when execution returns from the method.

    Consider the following code, where "a" is a reference of interface A
    ....[some other code here]
    In the above example, when methodA1() is called, transaction is started and commited when returned from methodA1(). When methodA2() is called, again transaction is started and commited when returned.

    What I want to do, I want to run these two method calls in the same transaction.
    How can I do that?
    I think, I have to start the transaction programmatically and attach it to the current thread beore calling methodA1() and commite it when returned from methodA2().
    How can I do it?
    Last edited by avi129; Jan 18th, 2006, 11:47 PM.

  • #2
    I solved the problem using nTemplate.