AppServerServiceManager.cls
 
Forums / SmartComponent Library - Developer Forum / AppServerServiceManager.cls

AppServerServiceManager.cls

5 posts, 0 answered
  1. Roger Blanchard
    Roger Blanchard avatar
    413 posts
    Registered:
    29 Jun 2018
    19 Oct
    Link to this post
    The GetServiceHandle method appears to be trying to connect even if the pcConnectIfRequired parameter is passed as false. Am I reading this incorrectly?  
     /**
         * Purpose: Returns the handle to a AppServer partition
         * Notes:   When plConnectIfRequired is set to TRUE, the partition will be
         *          connected if required.
         * @param pcServicePartition The name of the partition to return the handle for
         * @param plConnectIfRequired Connect if not already connected
         * @return The HANDLE of the server object
         */
        METHOD PUBLIC HANDLE GetServiceHandle (pcServicePartition AS CHARACTER,
                                               plConnectIfRequired AS LOGICAL ):


            IF pcServicePartition = "":U OR pcServicePartition = ? THEN
                pcServicePartition = THIS-OBJECT:DefaultPartition .


            IF THIS-OBJECT:IsConnected (pcServicePartition) THEN
                RETURN DYNAMIC-FUNCTION ("getServiceHandle":U IN AppSrvUtils, pcServicePartition) .
            ELSE
                RETURN THIS-OBJECT:ConnectService (pcServicePartition) .


        END METHOD.
  2. Mike Fechner
    Mike Fechner avatar
    342 posts
    Registered:
    14 Sep 2016
    19 Oct in reply to Roger Blanchard
    Link to this post
    Seems like it. 

    Is that just an observation - or causing issues? 
  3. Roger Blanchard
    Roger Blanchard avatar
    413 posts
    Registered:
    29 Jun 2018
    19 Oct in reply to Mike Fechner
    Link to this post
    Some of our customers are using a partition for async calls for reporting. When the user attempts to exit the Main Menu we call that method to see if we are connected to that partition and if there are any async requests. If a user is not using this partition this method will try and connect but the partition is not defined in the appsrvtt.d which results in an error.

    We can workaround it...thanks for responding on a Saturday. 
  4. Mike Fechner
    Mike Fechner avatar
    342 posts
    Registered:
    14 Sep 2016
    19 Oct in reply to Roger Blanchard
    Link to this post
    You should be able to workaround that using the IsConnected method.

    We can look into changing the behavior. But at first sight, I'm a bit hesitant as that is a pretty central bit of the framework. 
  5. Roger Blanchard
    Roger Blanchard avatar
    413 posts
    Registered:
    29 Jun 2018
    19 Oct in reply to Mike Fechner
    Link to this post
    No worries. Thank you...we have a workaround. 
5 posts, 0 answered