Looks like your settings are ok. But do not trust this feature too mutch. I prefer no workarounds in pools and to dissable all of this kind of "features". BTW it is verry trivial to implement a pool and to do it right way. You need to validate connection before the first operation in transaction only and you can do it yourself (implement some trivial static method to get connection from ThreadLocal, validate and put it to threadLocal if no connection exists in current thread, unset threadlocal after transaction/request/action )
> Connections only time out late at night or over the weekend when the web > app in question is not being used. > > Normally, the web app is used heavily during the day until about 9pm and > then no more until the next day. > > I want to take advantage of pooling with Hibernate when the app is being > used heavily, but i do not want it to drop the connection afterwards > when it is idle. > > I simply would like some good docs for how to properly set up DBCP with > Hibernate and the validation query. Such docs do not seem to exist on > the Hibernate site and various mailing list postings seem to contain > contradictory information about how to do this. > > > thanks, > > -dave > > > > > Juozas Baliuka wrote: > > Why do you need pooling if connections are time out. Close connection after > > transaction and open a new one before transaction without any kind of > > pooling. It must be very trivial to implement this kind of DataSource, a few > > lines of code. > > > > > >>Ok, I am trying to get DBCP connection pooling working reliably (and not > >>dropping connections)...so far i am not having much success. After a > >>period of several hours of non-use, Hibernate will generate the familiar > >>ioExcpetion when the connections are timed out. > >> > >>With that in mind, can someone give me a definitive list of DBCP params > >>that are required to be set to get this working, along with some > >>reasonable values??? > >> > >>Right now, i'm using: > >> > >>"hibernate.dbcp.maxActive" > >>"hibernate.dbcp.maxIdle" > >>"hibernate.dbcp.maxWait" > >>"hibernate.dbcp.testOnBorrow" -> true > >>"hibernate.dbcp.testOnReturn" -> true > >>"hibernate.dbcp.validationQuery" > >> > >>Do i need to set any others???? Are there any other tricks to getting > >>DBCP working with Hibernate that i need to know? > >> > >>I have tried using C3P0 and also fooled around with this > >>autoreconnect=true URL, but i have given up on both of these options and > >>would like to get DBCP configured "the right way". > >> > >> > >>I would *really* appreciate some guidance with this -- i will be happy > >>to summarize what i learn and submit it for a FAQ or something if that > >>will help so others will have this well-documented online somewhere. > >> > >> > >>Many thanks, > >> > >> -dave > >> > >> > >> > >> > >> > >> > >>------------------------------------------------------- > >>This sf.net email is sponsored by:ThinkGeek > >>Welcome to geek heaven. > >>http://thinkgeek.com/sf > >>_______________________________________________ > >>hibernate-devel mailing list > >>[EMAIL PROTECTED] > >>https://lists.sourceforge.net/lists/listinfo/hibernate-devel > > > > > > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel