I’m using Hibernate v4.1.4.final.jar using Java 1.7 to connect to Oracle 10g server. And this is a standalone java program.
Unfortunately, my query takes more than 30 minutes to run. I want to know where I can configure connection time out & read time out so that while running this standalone program, it will not time out and throw error?
Thanks!
There are a few options that you can try:
hibernate.connection.<propertyname>DataSourceinstead of plainConnectionand control timeout through that.The closest property that I can find for Oracle driver is
oracle.jdbc.ReadTimeoutproperty. So in your hibernate configuration, the whole name will behibernate.connection.oracle.jdbc.ReadTimeout..hope this works for you.