-
1. Re: Connection pool problem:No ManagedConnections available
maikyal Jan 24, 2006 3:22 PM (in response to preddy)Be sure you close connections after using them. And when you close a connection, be sure you send the appropriate event to the server registered listeners.
-
2. Re: Connection pool problem:No ManagedConnections available
preddy Jan 25, 2006 2:03 AM (in response to preddy)Thanks maikyal..
I am using following code to close the connection after using it. But how to send the event to the server listeners.
finally {
try {
if(connection != null)
connection.close();
} catch(Exception exception) {
}
Thanks -
3. Re: Connection pool problem:No ManagedConnections available
haribabu_nunna Jan 25, 2006 9:50 PM (in response to preddy)Hai,
I can say some solution where in helps u to monitor the no of connections getting opened used and closed.....
First u go to JMX-console and look for Datasources and click on the link names by ur datasource name....... Then u can see all the details...
To prevent from getting this exception I ask u to check ur code properly and look where ever ur using the database acces make it avaialble thru one class and use singleton pattern for it..
Thus i solved my problem..........
If u need more clarrification plz do let me know.....
Thanks & Regards,
Hari Babu Nunna.. -
4. Re: Connection pool problem:No ManagedConnections available
maikyal Jan 31, 2006 2:05 PM (in response to preddy)Hai again,
As haribabu_nunna said, use singleton pattern is a good (design) solution. But seems that the root cause of you problem is that the server doesn't know when you close connections.
When the server creates a new connection calls ManagedConnection.addEventListener(EventListner) method. It means that the server has registered a listener for the connection.
Whe you close the ManagedConnection, somewhere in you code, you must send the "connection close event" to this listener throw the reference recived before.
I can't tell you the correct way to do that, but I use to send this event in the ManagedConnection.Clean() method.
I hope this can help you. -
5. Re: Connection pool problem:No ManagedConnections available
adrian.brock Feb 1, 2006 7:27 AM (in response to preddy)The comments about firing connection close from cleanup() are rubbish.
The rest is an FAQ. -
6. Re: Connection pool problem:No ManagedConnections available
maikyal Feb 1, 2006 10:00 AM (in response to preddy)Hello Adrian,
I think you don't understand me. I'm sorry about my english.
I'm not talking about closing connecions from cleanup(). I'm talking about sending close evets to the listeners from that method. In any case I can be wrong and comments like "are rubbish" doesn't help me. -
7. Re: Connection pool problem:No ManagedConnections available
adrian.brock Feb 1, 2006 10:16 AM (in response to preddy)"maikyal" wrote:
doesn't help me.
This is not your thread it is preddy's.
Preddy is using the JBoss JDBC RAR
which does fire connection closed in the correct place.
i.e. in response tojava.sql.Connection.close()
cleanup() is only invoked when the connection manager returns the connection
to the pool.
It cannot do this until the handle has informed it that the connection is no longer
being used by firing the close event.
All this is in the spec.
Hence your comments are rubbish/garbage i.e. off-topic and misleading. -
8. Re: Connection pool problem:No ManagedConnections available
maikyal Feb 1, 2006 10:27 AM (in response to preddy)ups
-
9. Re: Connection pool problem:No ManagedConnections available
maikyal Feb 1, 2006 10:30 AM (in response to preddy)"maikyal" wrote:
ups!!! -
10. Re: Connection pool problem:No ManagedConnections available
kockaser Sep 21, 2006 8:07 AM (in response to preddy)"adrian@jboss.org" wrote:
"maikyal" wrote:
doesn't help me.
This is not your thread it is preddy's.
Preddy is using the JBoss JDBC RAR
which does fire connection closed in the correct place.
i.e. in response tojava.sql.Connection.close()
cleanup() is only invoked when the connection manager returns the connection
to the pool.
It cannot do this until the handle has informed it that the connection is no longer
being used by firing the close event.
All this is in the spec.
Hence your comments are rubbish/garbage i.e. off-topic and misleading.
I was looking for solution of the similar problem and here we are ?.
It is unbelievable how big human arrogance can be, a Adrian?
I believe that the Chief Scientist can and must do better than in the above answers or we are all rubbish/garbage.
Thx
P.S.
Do we really need to come here to be offended?