Visual Paradigm Logo
     Build Quality Applications Faster, Better and Cheaper
 
Home | Products | Download | Documentation | Support | Resources | Partners | Quick Tour | Shop | Company |  
 
   Visual Paradigm Discussion Forum
  Login   [ Register ] Email: Password: Log me on automatically I lost my password  
Recent Topics
Advanced Search
Reseting Database connection  
Forum Index -> DB Visual ARCHITECT (DB-VA)
Author Message
Anonymous

I noticed if the database is not access for a while, the connection is dropped by the DbVA generated ORM manager and any DB call results in a "Cannot open connection" - What is the best way to re-initialize the connection?
Many thanks,

Joe Rudi
 
Jick


Joined: 2005/04/29
Messages: 2880

Offline

Dear Joe,

Please check if the following options that could be set from the Connection Pool Options dialog box useful or not:

Idle test period - Test connections in the connection pool for every n seconds
Timeout - If connection idle for n seconds, discard this connection

(please take a look at the attachment)

If there are any questions, please feel free to let me know.

Best Regards,
Jick

Visual Paradigm International Ltd.
http://www.visual-paradigm.com

Build Quality Applications Faster, Better and Cheaper
 
Anonymous

There's no attachment. Not sure how this would help. Is the connection suppose to automatically be refreshed if it is dropped by the database?

Jick wrote:
Dear Joe,

Please check if the following options that could be set from the Connection Pool Options dialog box useful or not:

Idle test period - Test connections in the connection pool for every n seconds
Timeout - If connection idle for n seconds, discard this connection

(please take a look at the attachment)

If there are any questions, please feel free to let me know.

Best Regards,
Jick 
 
Jick


Joined: 2005/04/29
Messages: 2880

Offline

Dear Joe,

Sorry for missing the attachment. Please read again.

Best Regards,
Jick

Attached Image : No description given (33 kb)


Visual Paradigm International Ltd.
http://www.visual-paradigm.com

Build Quality Applications Faster, Better and Cheaper
 
Anonymous

Jick wrote:
Dear Joe,

Sorry for missing the attachment. Please read again.

Best Regards,
Jick 


How does this help with dropped connection. If the db is idle for a long time, the connection is dropped and any subsequent calls to the ORMmanager results in cannot open exception.
 
Jick


Joined: 2005/04/29
Messages: 2880

Offline

Hi user,

I guess the problem could be caused by the configuration pool. That's why I suggested you to modify the setting (Idle test period, timeout...) to see if it helps.

You may also call PersistentManager.disposePersistentManager(). This will reset all sessions.

Best Regards,
Jick

Visual Paradigm International Ltd.
http://www.visual-paradigm.com

Build Quality Applications Faster, Better and Cheaper
 
Thomas_rde


Joined: 2007/03/16
Messages: 1

Offline

Hi,

could you explain a little bit more how the timeout with 0s and the idle time with 0s has influence to the connections? Are there as much connections created as the max connection value and after that no new connection could be created? SO maybe isn't it better to have a timeout to kill some useless old connections and allow the creation of new connections?

Which connection pool preferences are the best for an extensive use of the database e.g. the creataion of thousands of elements?

Best regards
Thomas
 
Jick


Joined: 2005/04/29
Messages: 2880

Offline

Hello Thomas,

That means never verify connection and never timeout.

Are there as much connections created as the max connection value and after that no new connection could be created? 

Yes, there are as much connection created as the max connection value, and requesting connection will use any idle connection or wait if there are no idle connection.

SO maybe isn't it better to have a timeout to kill some useless old connections and allow the creation of new connections?  

It depends on your db, some db will cause problem if idle for long time.

Which connection pool preferences are the best for an extensive use of the database e.g. the creataion of thousands of elements? 

It would be better to have higher max connection for extensive use, if the db and system is allowed.

Best regards,
Jick

Visual Paradigm International Ltd.
http://www.visual-paradigm.com

Build Quality Applications Faster, Better and Cheaper
 
 
   Forum Index -> DB Visual ARCHITECT (DB-VA)
Go to:   
Powered by JForum 2.1.4 © 2005 - Rafael Steil