Skip to main content
Known Participant
November 17, 2015
Question

Hibernate query from Flex - Connection timed out or closed

  • November 17, 2015
  • 1 reply
  • 881 views

I have a flex application that is calling multiple ColdFusion services, this has been working for a long time but now all of a sudden it stopped working and I have no idea what is causing it.

Basically, I am sending 15 function calls to different services through the flex gateway. The first one executes and all the other ones send this error message

"java.sql.SQLException: This connection either has timed out or has been closed and has returned to its pool. You must re-acquire the connection. "  See attached Charles screenshot

The coldfusion application is a very simple ORM application running some simple single parameter hibernate queries like below

remote Wayeo_Service.cfc.city_clerks[] function searchByID39(string q ) {

  var hqlString = "";

  var whereClause = "";

  var params = {};

  hqlString = hqlString & "FROM city_clerks";

  if (len(arguments.q) gt 0){

  whereClause  = ListAppend(whereClause, " ID39_City LIKE '%#arguments.q#%'");

  }

  if (len(whereClause) gt 0){

  hqlString = hqlString & " WHERE " & whereClause;

  }

  hqlString = hqlString & " ORDER BY CityClerkID asc";

  return ormExecuteQuery(hqlString, false, params);

  }

This topic has been closed for replies.

1 reply

Inspiring
December 29, 2017

any solution found ?????

Inspiring
December 31, 2017

Been quite some time since I looked at a Flex issue, but have you tried checking "Maintain database connections" in the ColdFusion administrator DSN?  You don't mention the CF version on the back end, but there was a Hotfix that addressed this for CF 2011 and CF 2016.  Please see this thread: https://tracker.adobe.com/#/view/cf-4108519