Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Class to hold DB Connections
Class to hold DB Connections [message #758187] Tue, 22 November 2011 09:43
Manoj  is currently offline Manoj Friend
Messages: 3
Registered: July 2009
Junior Member
Hi,
When my RCP application starts, in the Activator.start(BundleContext context) , I instantiate a DB Connection Pool that vends out DB connections. I also define a public getDBConnection() in Activator. Later, when I need access to DB Connection, I simply call Activator.getDefault.getConnection() and I get the connection. I close the connections in Activator.stop(..) method.

So, my question is:
Is it a good idea to keep DB connections in Activator (subclass of AbstractUIPlugin)?

What are the best practises about holding connection factories, whether for a DB or other resources?

Will the connection run in the UI thread? i.e., if the DB process takes a long time, will the application appear to be unresponsive during that time?

Please can you provide concrete solutions (with code example if possible) since I am quite new to RCP.

Regards,
Manoj
Previous Topic:Error "make:****" while trying to build a project which uses GNU scientific library
Next Topic:Eclipse java galileo win 32
Goto Forum:
  


Current Time: Thu Apr 25 01:20:25 GMT 2024

Powered by FUDForum. Page generated in 0.06648 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top