Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Time out waiting for a free available connection
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
jcstritt  
View profile  
 More options Nov 5 2012, 10:19 am
From: jcstritt <jcstr...@gmail.com>
Date: Mon, 5 Nov 2012 07:19:18 -0800 (PST)
Local: Mon, Nov 5 2012 10:19 am
Subject: [2.0.4-java] Time out waiting for a free available connection

Hi. I use Play 2.0.4 with Java and JPA for ORM. I have a "doLogin" method
in Application controller. But after 5 calls
(with db.default.partitionCount=1, db.default.maxConnectionsPerPartition=5
db.default.minConnectionsPerPartition=5), i have the message "Time out
waiting for a free available connection". It seems dans JPA.em() (and the
db connection) is not closed after each request, but a new one start on
each. What can I do with this code :
  @Transactional(readOnly=true)
  public static Result doLogin(String name, String psw) {
    Result httpResult;
    try {
      // we delegate JPA operations on a subclass
      wrk = new WorkerDb(JPA.em());
      User user = wrk.loadUser(name, psw);
      if (user != null) {
        httpResult = ok("Ok");
      } else {
        httpResult = badRequest(name + " unknow or bad psw !");
        logout()
      }
    } catch (Exception e) {
      httpResult = badRequest("DB problem: " + e.getMessage());
      logout();
    }
    return httpResult;
  }

The error message :
[error] o.h.u.JDBCExceptionReporter - Timed out waiting for a free
available connection.

Thank's for your help.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jcstritt  
View profile  
 More options Nov 5 2012, 11:17 am
From: jcstritt <jcstr...@gmail.com>
Date: Mon, 5 Nov 2012 08:17:06 -0800 (PST)
Local: Mon, Nov 5 2012 11:17 am
Subject: Re: [2.0.4-java] Time out waiting for a free available connection

I have the answer : if i add
 } finally {
      JPA.em().getTransaction().commit();
 }
All works finally fine.

Le lundi 5 novembre 2012 16:19:18 UTC+1, jcstritt a écrit :


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »