Starting and stopping proxy servers

The Server Edition of the proxy server starts and stops automatically when you start or stop the application server. To prevent the proxy server from starting automatically, specify the following option when you configure the PowerBuilder Application Server Plug-In:

“-Dproxy.name=none”

See “Configuring the server plug-in”.

The .bat files that start and stop a proxy server are located in the bin subdirectory of the proxy server installation.

StepsStarting a proxy server in the current window

  1. For a proxy server that uses the default name, run:

    run-server.bat ejb-proxy
    

    Or, if you configured the proxy server using a nondefault value for the proxy.name property, run:

    run-server.bat proxy-name
    

    where proxy-name is the name of the proxy server.

    The run-server command prints the location of the server log file. Check the server log for debugging information. The default log is ejb-proxy.log, located in the logs subdirectory of the proxy server installation.

StepsStarting a proxy server in a new window

  1. For a proxy server that uses the default name, run:

    start-server.bat ejb-proxy
    

    Or, if you configured the proxy server using a nondefault value for the proxy.name property, run:

    start-server.bat proxy-name
    

StepsStarting a proxy server in the background

  1. For a proxy server that uses the default name, run:

    start-server.bat -bg ejb-proxy
    

    Or, if you configured the proxy server using a nondefault value for the proxy.name property, run:

    start-server.bat -bg proxy-name
    

StepsStarting a proxy server from a PowerBuilder client

  1. In a PowerBuilder client, you can start a proxy server using the PowerScript Run function. For example, add the following code to an application’s Open event:

    Run(“C:\ejb-proxy\bin\start-server -bg ejb-proxy”, Minimized!)
    

    Sybase recommends that you start the proxy server in the background to impede stopping the proxy server while the client application is running.

StepsStopping a proxy server that is running in a command window

  1. In the window where the proxy server is running, enter Ctrl+C.

StepsStopping a proxy server that is running in the background

  1. Open a command window.

  2. If you did not specify a name when you started the proxy server, enter:

    stop-server.bat -local ejb-proxy
    

    If you did specify a name when you started the proxy server, enter:

    stop-server.bat -local proxy-name
    

StepsStopping a proxy server from a PowerBuilder client

  1. In a PowerBuilder client, you can stop a proxy server using the PowerScript Run function. For example, add the following code to an application’s Close event:

    Run(“C:\ejb-proxy\bin\stop-server -local”, Minimized!)