Let me restate this question (bringing into the conversation the client connection as well):
I have an application server using a GlassFish 3.1.2 to connect a web application used by many clients over the internet to access a Java method. This Java method communicates with a stored procedure in a database server running Oracle 11.2 using a JNDI connection pool in GlassFish.
The stored procedure polls the database to determine when a process completes and then returns results to the calling Java method. This process may take some time to complete (minutes to hours).
I'm worried that some (perhaps default) setting within GlassFish will kill either the client-to-application-server connection, or the java-method-JDBC connection, before the stored procedure completes.
What are the issues that could effect this and how to access their settings to change them to something appropriate for this scenario? Any downside to doing so?
I'm using the database stored procedure to poll the database to avoid wasting resources sending traffic from the application server to the database server and back again. Although I suppose having the Java method (instead of the stored procedure) poll the database, while less efficient, would prevent anything closing this connection.
Likewise, having the client's web application poll the database would keep both connections alive, but would make things even more inefficient by using more resources.
Any comments appreciated. Thanks in advance, GKK