Live editing

To test or debug a component, you can use a feature of PowerBuilder called live editing, which allows you to build the project automatically from the User Object painter. When live editing is enabled, PowerBuilder builds the project for an application server component each time you save the corresponding user object. The generator does not deploy PBDs to the application server, but instead tells the application server how to access the PBLs that contain the required object definitions.

Configuring a server for live editing

To configure an application server for live editing:

  1. Open %PB_SERVER_HOME%\config\pb-server-<targetServerName>.xml, and set the ejbDeployIfUnchanged property to false.

  2. Re-run configure.

Enabling live editing for an NVO

To enable live editing for an NVO:

  1. Create a project that includes the user object for which you want to generate an application server component.

    You can use an existing PBL that allows for deployment to an application server, or alternately, you can create a new project and use it only for testing.

  2. Optionally modify the live editing library list for the project.

    When you are testing a component with a server that resides on a remote machine, you must tell the server where to find the PBLs. To do this, modify the library list on the Advanced page of the Properties dialog in the Project painter.

    The library list you specify must contain fully qualified paths that use Universal Naming Convention (UNC) names. UNC names take the form: \\servername\sharename\path\file.

    By default, the live editing library list is based on the application library list. You need not modify the live editing library list if your server is local.

  3. In the User Object painter, on the General page in the Properties view, specify the project that will generate the component.

    The project name you specify must meet these requirements:

Generating the component in the painter

To generate an application server component from the User Object painter, select File | Save. PowerBuilder builds the component just as it would at deployment time, except that it does not generate PBDs for the component.

If the project build results in errors, PowerBuilder displays the error messages in the Output window.

If instance pooling is enabled for the user object, the generator disables pooling for the current build. Pooling is not supported with live editing because PowerBuilder cannot save the user object if the PBL that contains the user object is locked by the application server.