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