• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

connections

 
Peter Guillebaud
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Peter Guillebaud
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Bosun!
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Mike, yes the database has accepted 2 DSNs, no more broken pipes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic