aspose file tools
The moose likes Applets and the fly likes Too Many Connections Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Applets
Reply Bookmark "Too Many Connections Exception" Watch "Too Many Connections Exception" New topic
Author

Too Many Connections Exception

palukuri nag
Greenhorn

Joined: Oct 31, 2002
Posts: 12
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

Joined: Dec 12, 2001
Posts: 150
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

Joined: Oct 31, 2002
Posts: 12
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

Joined: Nov 26, 1999
Posts: 72

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 agree. Here's the link: http://aspose.com/file-tools
 
subject: Too Many Connections Exception
 
Similar Threads
db connection
EJB opening too many connections to DB
Connection Problem
Perf Problems w/ SQL Server 7.0
Io exception: The Network Adapter could not establish the connection