Highlighted

Hibernate query from Flex - Connection timed out or closed

Explorer ,
Nov 16, 2015

Copy link to clipboard

Copied

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 screenshotCapture.PNG

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);

  }

Views

626

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Hibernate query from Flex - Connection timed out or closed

Explorer ,
Nov 16, 2015

Copy link to clipboard

Copied

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 screenshotCapture.PNG

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);

  }

Views

627

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 16, 2015 0
Explorer ,
Dec 29, 2017

Copy link to clipboard

Copied

any solution found ?????

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 29, 2017 0
Engaged ,
Dec 30, 2017

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 30, 2017 0