• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Too Many Connections Exception

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 72
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
I don't always make ads but when I do they're tiny
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic