开发者

tomcat dbcp and mysql connection pooling

开发者 https://www.devze.com 2023-03-23 06:07 出处:网络
I am using a tomcat dbcp along with spring jdbc. When I start the server for first time and try to load the web-page it fetches the data from database and returns correct result set but when i make so

I am using a tomcat dbcp along with spring jdbc. When I start the server for first time and try to load the web-page it fetches the data from database and returns correct result set but when i make some changes to db using editor and try to reload the page, it shows old result set. I tried database logging and can see that query is reached to database. I think the result set is being cached somewhere i开发者_开发问答n the container..Can someone tell me what parameter i need to take care of.

help will be appreciated.

thanks.


AngerClown, thanks for your replies. You got me to the real pain point of the problem.

The real problem was lying on database side. Somehow because of some primary key indexing issues some process has acquired the lock on the table and at the same time my autocommit from query browser was set to false. Because of this when i tried to fetch the data in same transaction changes got reflected but not in other transaction.

Without bothering much about it, I just recreated the table. And now it is working fine.

Thanks a lot. -Santosh.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号