This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Too Many Connections Exception

 
palukuri nag
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai
I am using Tomcat server as webserver and SQL Server as database server. Both reside at same.
And I am using applets to get data. First time when i am opening in the browser i am getting data perfectly. If i am opening the same page in another page it is showing SQL Excepttion: Too many connections.
What i am doing is in init() method of the applet i am getting connection.
In destroy() method of applet i am making connection = null.
 
Tina Coleman
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your database is set up to not allow more than one connection at a time. Presumably you have a single-user license for SQL Server. You have a couple of options:
1) Buy more SQL Server licenses. (This gets expensive really fast, particularly if you have a large user population who might be using your applet).
2) Rearchitect the app so that something on the server is managing the database connections. Because the applet creates a connection, each instance of the applet will create a separate connection. If the applet communicated with something on the server which managed the connections, the server could create 1 connection or only a few connections and then use them to handle the requests.
 
palukuri nag
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai
thanks for ur reply. but when i am using the same SQL server in jsp i am not getting problem After ur reply. i made 3 connection objects in the same jsp page and tried to retrive data it is worked fine but where is in applet it is showing the error.
 
Ravee Bhat
Ranch Hand
Posts: 72
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
Is that IE 6.0 you are using?

I have a similar problem with it. Even if I remove the .class file, IE loads the applet.
ravee.
[ November 25, 2002: Message edited by: Ravee Bhat ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic