-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Transaction problem in application server
PostPosted: Fri Apr 29, 2005 9:28 am 
Regular
Regular

Joined: Fri Feb 25, 2005 3:02 am
Posts: 71
Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp

[b]Hibernate version: 3.0[/b]

[b]Mapping documents:[/b]

[b]Code between sessionFactory.openSession() and session.close():
try
{
session = HibernateUtil.currentSession();
tx = session.beginTransaction();
// do insert into database
tx.commit();
}
catch(Exception e)
{
if (tx != null)
tx.rollback();
}
finally
{
session.close();
HibernateUtil.closeSession();
}
[/b]

[b]Full stack trace of any exception that occurs:[/b]

[b]Name and version of the database you are using:Postgresql 8.0[/b]

[b]The generated SQL (show_sql=true):[/b]

[b]Debug level Hibernate log excerpt:[/b]

Hi, my problem is that when I call the function that will execute the above code in a console, everything works fine, but when I call the same function
from a jsp page in Tomcat, it seems that the transaction does not end. When I look in the Posgresql log, I found that the transaction is idle, as if it has not been commited. But the insert has been done correctly.

Can anyone please tell me what is causing this?
thanks in advance


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.