File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Glassfish Connection Pooling

 
Wesley Baker
Ranch Hand
Posts: 45
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting an odd error that gets logged every time a certain criteria is met, and I'm not sure what the criteria is and how to stop it. I have to restart Glassfish everytime it happens:



ArtivaProd is the name of the JDBC Connection Pool in Glassfish.

I would blame my code for something like this normally, but the only pooled database connection is being used by the Form Authentication process in Glassfish for login.

I guess my question is, why are the connections not being released/renewed?

I'll be happy to post my configuration, just let me know which parts you want to see.
 
Vinod K Singh
Ranch Hand
Posts: 198
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As the exception clearly says "Unable to get a connection: max pool size exceeded". So this is not a configuration issue but it is related to freeing up resources in the code.
 
Wesley Baker
Ranch Hand
Posts: 45
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right, but what I meant to say was that there is no code. This is happening from the Form Authentication in Glassfish. The one where you set up automated security checks with the JDBC Realm Authentication using j_security_check
 
Vinod K Singh
Ranch Hand
Posts: 198
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see two reasons for the exception-
1. Glassfish authentication code is leaking the connection or
2. The max connection limit of pool is too low, leading to hitting the upper limit when many users try to login at the same time.
 
Wesley Baker
Ranch Hand
Posts: 45
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

1. Glassfish authentication code is leaking the connection


I don't think this is the problem, or else a Google search would show a lot more instances of it than just me. I will check their bug list, though.


2. The max connection limit of pool is too low, leading to hitting the upper limit when many users try to login at the same time.


This could be a possibility. I will try increasing the number and see if that helps.
 
TestConfig testConfig
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I know this thread is old one, I was also getting the
"The max connection limit of pool is too low...". The solution which worked for me was closing
Statements, ResultSet and Connection objects, in the finally block.


Hope this helps some one.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic