Results 1 to 6 of 6
Thread: Error When Executing Query
- 06-25-2008, 12:32 PM #1
Member
- Join Date
- Jun 2008
- Posts
- 1
- Rep Power
- 0
- 06-25-2008, 12:40 PM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
May be somewhere in your code same connections are open, but not close them properly. Check that how many connections you have when you execute the query.
- 06-25-2008, 02:19 PM #3
Member
- Join Date
- May 2008
- Posts
- 24
- Rep Power
- 0
- 06-26-2008, 03:20 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Yes, use try-catch-finally blocks and in the finally block close all open connections on your application.
- 06-26-2008, 03:29 AM #5
Senior Member
- Join Date
- May 2008
- Location
- Makati, Philippines
- Posts
- 234
- Rep Power
- 6
I have encountered that same problem before. I have around 3000 connections at a time. The solution i did is i used a batch processing.
My program connects to the database every 300 entries and uses only 1 connection at a time. Try searching about batch processing in java. And make sure you close your connections after you used them ^_^Mind only knows what lies near the heart, it alone sees the depth of the soul.
- 06-26-2008, 03:37 AM #6
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Whatever the theory you follows, major thing you have to keep in mind is clear anything have to at the end of the application. But not all, some of them have to clear up on the way to end. That is the major issue you comes up with your application. I'm directing this to our thread starter. :)
Similar Threads
-
[SOLVED] executing java over network
By jmHoekst in forum New To JavaReplies: 6Last Post: 06-30-2008, 05:58 PM -
Problem with executing
By mcal in forum New To JavaReplies: 2Last Post: 02-09-2008, 01:51 PM -
Executing Batch
By zcoarens in forum New To JavaReplies: 0Last Post: 08-14-2007, 09:49 AM -
Executing a jar file
By peiceonly in forum New To JavaReplies: 2Last Post: 04-06-2007, 02:32 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks