Hi,
I am a spring and hibernate learner now. Trying to understand the concept of transactions.
I am using hibernate template in my DAO classes and using annotation to declare the transactions. So far everything is good.
I have a GateWayService and AccountDAO , both are annotated with @Transactional. I am using AccountDAO in the GateWayService as shown below.
And here is AccountDAO.java
Now the problem is, even if I change the propagation level in the @Transaction annotation to any values (like ..supports/required/notsupported ), I am not seeing any change or exceptions . My programe is working fine.
If there is already one transaction initiated in the GateWayService class, and if I am calling AccountDAO which is also having a Transaction, Iam expecting that I should get some different behavior when i change the propagation levels. Is that true ???
Or, the underlying hibernate template always creating one session and hibernate transaction manager creating/using the same transactions in the current
thread ?
Can some one help me to understand this.
And in the hibernate configuration i have the current session context as "thread"
<prop key="hibernate.current_session_context_class">thread</prop>
Thanks
Prashanth