Results 1 to 1 of 1
- 10-28-2011, 03:04 PM #1Member
- Join Date
- Oct 2011
- Rep Power
A datasource solution for querys to validate the connection isn't close?
I have a problem with a application. When users don't use the database in hours, and one of them enter to the application, and do an operation that try to connect to the BD, this is closed. The application is waiting for a long time, and don't do anything, and 15 minutes after, throw an exception that indicates that the connection is closed. Then, upon this exception is throwed, the application works fine again. Until anyone enters and the connection is close again.
I'm searching a solution for execute periodic querys to my BD and maintain this connection opened. I think that in the datasource I can specify something like this, but can't find the correct solution.
In my XML I have something like this:
validationQuery="insert into temp_test (id) values (seq_temp_test.nextval)"
When I stand up the Liferay, the datasource is readed ok. I want to execute the insert for validate that it works fine, but don't works like I want... This insert only is executed when I use the BD. Each time that I use a connection this validationQuery make the insert. But I don't want this. I need that this query works each 30 seconds, always, with users using the application or not.
Anyone knows what I need to put into my datasource xml for execute a periodic query for mantain the BD connection opened?
Thanks a lot!
- By Stephen Douglas in forum New To JavaReplies: 13Last Post: 04-09-2010, 12:15 PM
- By Prashant.surwade in forum Advanced JavaReplies: 17Last Post: 12-18-2009, 08:53 AM
- By santhosh_el in forum NetworkingReplies: 0Last Post: 10-03-2009, 08:55 AM
- By Prashant.surwade in forum Advanced JavaReplies: 1Last Post: 08-28-2009, 12:46 PM
- By kwesiaryee in forum New To JavaReplies: 0Last Post: 09-17-2008, 02:36 PM