Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What happens to a DB connection when service is stopped?

Status
Not open for further replies.

jacaley

Programmer
Feb 18, 2002
4
US
Greetings

I have a program that creates and pools threads. Inside each thread is a DB (interbase) object that is Active. When the program is called and there is a thread inactive in the pool the process uses that thread. My question is what happens to the object if the firebird service is shut down and then restarted. Is the object any good? I have found that it doesn't seem to bother the program and continues to work without a flaw. (Obviously if the service is not restarted the program won't work) But that doesn't
seem like it should - anybody run into this before?

Thanks
John
 
I would guess that the threads with a lost connection will probably get stuck trying to access the DB. I'd expect you'd either eventually run out of threads or the app. would be using a limited number.

Pooling threads is interesting, what does your app do?

lou
 
The application returns images of cancelled checks/deposits over the web. A large number of users can be accessing the program at any given time. The program listens for a connection, once a connection is made a new thread is created (unless there is a idle one) and a new DB connection is created, the image is fetched and then closes the socket connection. The threads are pooled and reused until the app is stopped. The actual connection and return of the requested image takes about 1-2 seconds.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top