0
votes

I have some doubts on container managed transaction, as per my knowledge container managed transaction is one where container takes care of transactions i.e commit and rollback.

  1. What is container? Is it EJB or App server?
  2. If I want to do CMT with hibernate how do Iachieve this? I have tried using app server JTA but when I open session in hibernate it says no transaction found.
  3. If I use App server JTA implementation what kind of transaction is it?
  4. Do I have to make use of EJB to have CMT?
1

1 Answers

0
votes
  1. EJB is a container, a container like EJB can be part of an App server.
  2. Try to find some tutorials, there are many of them available. Here an tutorial for EJB on JBoss: http://www.mastertheboss.com/jboss-frameworks/hibernate-jpa/quickstart-tutorials-hibernate-jpa
  3. Sry, i don't understand the question.
  4. CMT is an ejb concept, but you could use the transaction management from spring => have a look at this if you are interested in spring transaction management: http://docs.spring.io/spring-framework/docs/current/spring-framework-reference/html/transaction.html

Just try some simple tutorials => for example google for ejb hibernate tutorial => after some practice you will find out how it works :)