start « Transaction « JPA Q&A





1. Hibernate: Transaction not successfully started (Threaded webapp) Problem!    stackoverflow.com

I am having this serious problem in a web-app that is using a thread to listen on a port for packets and process those packets. Processing of a packet involves database transactions, ...

2. Hibernate session.beginTransaction() call and Mysql Start Transaction    stackoverflow.com

When I issue the command

session.beginTransaction();
// do something
session.getTransaction().commit();
I don't see a corresponding Start Transaction command issue to my database. Can any body explain to why it is not there and how mysql ...

3. Hibernate transaction not successfully started    stackoverflow.com

Consider this simple Hibernate scenario:

session = getHibernateSession();
tx = session.beginTransaction();
SomeObject o = (SomeObject) session.get(SomeObject.class, objectId);
tx.commit();
This code produces the following exception:
org.hibernate.TransactionException: Transaction not successfully started
    at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:100)
    ...

4. is it ok to start a Hibernate transaction inside a JTA tx?    coderanch.com

I have a session bean method which has a container managed tx associated with it. It calls a method on a DAO class, which has: tx = s.beginTransaction(); .. tx.commit(); inside it. The reason being, this method could be called from within an already running JTA tx, or standalone, in which case, it would have it's own tx. Is there a ...

5. I can establish a session but can't start a transaction.    forum.hibernate.org

I followed the "Getting Started" at http://www.hibernate.org/152.html and the "Quickstart with Tomcat" at http://www.hibernate.org/hib_docs/refer ... start.html I'm trying to run the suggested code in an HttpServlet: Code: ... public void doGet( ... try { Session session = HibernateUtil.currentSession(); ...

6. Urgent!Transaction not successfully started!    forum.hibernate.org

Hibernate version:3.1 Database:SQL Server 2005 with SP1 WebServer:Tomcat 5.5.20 IDE:Eclipse 3.2 I can not use transaction!!! Code between sessionFactory.openSession() and session.close(): try { session = HSessionFactory.getSession(); tx = session.beginTransaction(); Query query = session .createQuery("from Users as u where u.name = '" + userName + "' and u.pwd='" + pwd + "'"); if (query != null) { List list = query.list(); if ...

7. Transaction not successfully started    forum.hibernate.org

Newbie Joined: Wed Aug 08, 2007 3:51 am Posts: 6 Hello all I'm working with hibernate3.jar + spring I had a transactionfilter to start and terminate a hibernate session. Code: public class HibernateFilter implements Filter { public void destroy() { // TODO Auto-generated method stub } ...

8. Transaction not successfully started    forum.hibernate.org

Hibernate 3.1 What does this exception mean? and what can it be the cause of it? I had never seen it before. It happens when I am going to commit, the program is a quite complex program that gets a lot of data and insert them in the database. If somebody wants, i can put some concrete code, I am not ...

9. Why to start DB transaction for createCriteria/createQuery?    forum.hibernate.org

Well, you actually do need a transaction. A transaction represents a unit of work, and doing a select statement is indeed work. Many times in the past, the JDBC connection would create the transaction if you didn't do it yourself explicitly. It was also friendly on closes. It's not so freindly anymore.





10. Transaction not started error    forum.hibernate.org

11. How to force hibernate to start transaction?    forum.hibernate.org

Connection connection = session.connection(); connection.setAutoCommit(false); tx = session.beginTransaction(); tx.begin(); String statement = "{call SWIA.CALC_INIT(?,?,?,?,?,?,?,?,?,?,?)}"; CallableStatement cs = connection.prepareCall(statement); //...(set parameters) cs.execute String statement2 = "{call SWIA.CALC_C(?,?,?)}"; CallableStatement cs2 = connection.prepareCall(statement); //...(set parameters) cs2.execute //...(get results) //... I execute many many procedures with that way.... tx.rollback(); ...