-->
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.  [ 3 posts ] 
Author Message
 Post subject: strange query-results on tomcat
PostPosted: Thu Nov 12, 2009 3:20 am 
Newbie

Joined: Thu Nov 12, 2009 3:01 am
Posts: 3
Hi,

I've built a small web-app with Hibernate 3 and Struts 2 which is running on Tomcat 6. the DB is MySQL.

I've the strange problem, that identical queries returns different results.

For example: I've a page with a JSP with a list of my entries of a table.
After a change of the table-content (add or remove some datas) the result of the query returns the current table-content and the old one.
If I make some other changes I also get these results.

So, every time I access the JSP with the list or refresh the site I see another list. Chiefly the right one, but also old result sets.

I debugged my app and it is Hibernate which give me the wrong results for a query.


Hope you have an idea.

thanks in advance


Top
 Profile  
 
 Post subject: Re: strange query-results on tomcat
PostPosted: Thu Nov 12, 2009 3:49 am 
Newbie

Joined: Thu Nov 12, 2009 3:01 am
Posts: 3
Additional info:

I disabled the 2nd-level-cache of Hibernate and the query cache of MySQL.

When I make a conditional query it take some time to get the new entries (or don't get the deleted entries).


Top
 Profile  
 
 Post subject: [RESOLVED] Re: strange query-results on tomcat
PostPosted: Thu Nov 12, 2009 6:22 am 
Newbie

Joined: Thu Nov 12, 2009 3:01 am
Posts: 3
Looks like I solved my problem.

Hibernate was configured to use a direct connection.
Now I'm using a connection pool ressource of tomcat and it works fine.


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

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.