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: Multiple Transactions per Session, SQL not generated
PostPosted: Fri Aug 25, 2006 12:08 pm 
Regular
Regular

Joined: Mon Jun 13, 2005 12:21 pm
Posts: 61
Location: Hannover
Hi,

I've developed a web based application which does NOT use the Transaction per request pattern nor JTA transactions. Instead my current session is obtained via plain JDBC. My current session and my currenct transaction are both bound to a ThreadLocal variables.

My session is opened with a servlet filter and closed at the end of every request (I don't use disconnected sessions). My transaction is started at the beginning of each transactional method (by using the ThreadLocal instance) and commited at the end of the method. Within one request (and one session) multiple transactions can occur (with multiple commits).

When starting the application everything is fine, but after running a while i get problems. Hibernate doesn't generate all the SQL code that is needed. At the beginning all INSERT, UPDATE and DELETE statements are fine, but now some statement are no longer executed (they don't appear in the logfiles) and I just don't know why.

My questions are:
- Has anybody ever had similiar problems?
- How does hibernate decide if it should generated SQL or if not?
- Can this be a synchronization issuel (also I'm using ThreadLocal) ?
- Is their a recommendation for using JTA transaction, also I'm not using EJBs and want to do transaction handling on my own?
- Should I close the hibernate session after each transaction?

Hibernate version: 3.05

Name and version of the database you are using: IBM DB2 400 V5R3


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.