The deployment tool provided with the server plug-in wraps PowerBuilder NVOs as standard EJB session beans and generates target-specific deployment descriptors to bind JNDI names and JDBC data source resource references automatically.
Deploying PowerBuilder components
Open the PowerBuilder Application Server Component project in the Project painter.
Select Edit | Properties from the menu, or click Properties on the PainterBar.
On the Server Host page in the Properties dialog, verify that the properties you specified in the Application Server Profiles dialog are correct. See “Creating an application server profile”.
You
can override the host name and port number that the server uses for
its deployment listener by changing the iiopListeners property
in %PB_SERVER_HOME%\config\pb-server-<targetServerName>.xml. If you
change this property, re-run the configure command.
In the Standard Options group on the Components page, verify that you have selected Stateless Session Bean if you want the component to be stateless.
If your scripts reference DataWindow objects dynamically, on the Libraries page, select the Include Unreferenced Objects in Consolidated PBD to make the DataWindow definitions available to the component.
On the Advanced page, optionally specify the names and values of custom EJB properties.
Click OK to apply your changes.
Select Design | Deploy Project from the menu or click the Deploy button on the PainterBar.
Validating deployment
To validate that your NVOs deployed successfully, you can run the test program pb-server-test. pb-server-test must communicate directly with the application server, not with a proxy server.
Verify that the application server with the server plug-in is running.
Use the PowerBuilder IDE to define a component called “MyComp” (case sensitive) in a package called “pbtest.”
Add a few business methods to the component; perhaps methods that access the database.
To generate basic performance metrics, create a method called “perftest”; for example, as in the following pseudocode:
integer perftest(integer a, integer b) { return a+b; }
In pb-server-<targetServerName>.xml (for example, pb-server-weblogic.xml), verify that these properties are set correctly:
<property name="test.username" value="weblogic”/> <property name="test.password" value="weblogic"/>
If you change the XML configuration file, re-run configure—see “Configuring the server plug-in”.
For WebSphere only, use the IBM JVM, instead of the Sun JVM:
Set JAVA_HOME to %WAS_HOME%\java.
Add %JAVA_HOME%\bin to the path.
Deploy the package to your application server.
Change to %PB_SERVER_HOME%\bin, and run:
pb-server-test
The test program tries to call all the methods in your component, using fake parameter values; for example, 1, 2, “S1,” “S2.” If you created a “perftest” method, the test program calls it repeatedly. If the program runs successfully, you see something similar to the following:
Looking up home interface using JNDI name: pbtest/MyComp Obtaining EJB meta data... Resolving home interface class... Home interface type is: ejb.components.pbtest.MyCompHome Narrowing home interface... Looking up home create() method... Calling home create method... Remote interface type is: ejb.components.pbtest.MyComp Business method signatures: perftest(integer, integer) mymethod(java.lang.String, java.lang.String) Calling business methods: perftest(1, 2) -> 3 ... checking application server remote call performance #remote calls/sec = 1189 #remote calls/sec = 1641 #remote calls/sec = 1650 #remote calls/sec = 1739 #remote calls/sec = 1749 #remote calls/sec = 1748 #remote calls/sec = 1748 #remote calls/sec = 1749 #remote calls/sec = 1768 #remote calls/sec = 1768 mymethod(S1, S2) -> S1S2 Test passed.
If you see an error such as
LoadLibrary
Failed: pbjag100.dll
, verify that the PowerBuilder
directory that contains pbvmXXX.dll is in the system
PATH.
Source code for the test program is located in %DJC_HOME%\src\java\com\sybase\pb\server\PbServerTest.java.