0 Replies Latest reply on Nov 16, 2015 7:57 PM by Prem Radhakrishnan

    Hibernate query from Flex - Connection timed out or closed

    Prem Radhakrishnan

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

        }