[JDBC] Keeping Connection object for a long time
- From: Arnaud <pas@xxxxxxxxxx>
- Date: Wed, 06 Jul 2005 13:00:12 +0200
Hi !
I've got an app where users can query a remote database (Derby or MySQL) through a JDBC Driver whith this kind of code : Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
Connection connection = DriverManager.getConnection(dsURL);
Statement .....
My problem is that I would like to hold the Connection object all along the application session (which may last a few hours) whithout disturbing other users of the database not connecting with my program. In other words, does the fact to keep the same Connection object for multiple queries allong 2 or 3 hours present any deadlock issues or be source of conflicts with external users accessing the database tables ?
All the examples I have read for now close the connection right after the processing.
TIA for advises,
-- Arnaud .
- Follow-Ups:
- Re: [JDBC] Keeping Connection object for a long time
- From: Daniel Dittmar
- Re: [JDBC] Keeping Connection object for a long time
- Prev by Date: in-memory database for polling
- Next by Date: Re: [JDBC] Keeping Connection object for a long time
- Previous by thread: in-memory database for polling
- Next by thread: Re: [JDBC] Keeping Connection object for a long time
- Index(es):
Relevant Pages
|
|