[jboss-user] [EJB 3.0] - Re: No ManagedConnections available Error

weston.price@jboss.com do-not-reply at jboss.com
Fri Apr 6 10:12:29 EDT 2007


anonymous wrote : 
  | From what I have read, this means that the database connection pool is messing up some how.
  | 

Actually, it simply means that a connection could not be allocated within the specific blocking timeout (30 seconds). There are usually a few possiblities:

1) You are not closing connections
2) You have long running transactions to the DB. As a result, the pool is exhausted and a connection cannot be give out.
3) A mix of the above two conditions.

If your using EJB3/JPA you do not have to explicitly close the connection as JPA does this for you. The next place to look would be at your DB transactions and determine what is taking so long to complete that a connection is tied up for that long. You can always increase the blocking timeout in the *-ds.xml file by adding the following element


  | <blocking-timeout-millis>value</blocking-timeout-millis>
  | 

As mentioned above 30 seconds is the default and this is *usually* a good starting point, most the time it can actually be decreased. One suggestion is to look at your code to see if you are doing long running DB operations that could be broken up into smaller transactions. 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035326#4035326

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035326



More information about the jboss-user mailing list