permaculture playing cards*
The moose likes Servlets and the fly likes connections Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "connections" Watch "connections" New topic
Author

connections

Peter Guillebaud
Ranch Hand

Joined: Jul 11, 2001
Posts: 57
I have 2 versions of a web app - whenever I start using the second web app, the first one breaks with the error message
[Microsoft][ODBC SQL Server Driver][Named Pipes]Connection broken.
The first web app connects to the database from within its' jsp pages, which is being corrected in the 2nd version by having the database connection started in the init() method of a servlet. While the second one is being developed it would be nice if the first one was working... does anyone know how to fix this problem of the broken connection please?
Many thanks
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
It sounds like your second servlet is trying to reuse the same Database connection which is already in use by the first. You need some kind of connection poling. You can do a search in the JDBC forum. It has been discussed a number of times.
------------------
Bosun
SCJP for the Java� 2 Platform


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Peter Guillebaud
Ranch Hand

Joined: Jul 11, 2001
Posts: 57
thanks Bosun!
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Because you're getting an ODBC error, can I assume you're using the jdbc-odbc bridge?

How about creating a second named pipe (or DSN). If I recall my VB programming days, two DSN's that point to the same db is acceptable.
Peter Guillebaud
Ranch Hand

Joined: Jul 11, 2001
Posts: 57
thanks Mike, yes the database has accepted 2 DSNs, no more broken pipes.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: connections