Welcome!

PowerBuilder Authors: Yeshim Deniz, Chris Pollach, Jayaram Krishnaswamy, Kevin Benedict, Avi Rosenthal

Related Topics: PowerBuilder, Java, Open Source

PowerBuilder: Article

Deploying PowerBuilder Components to JBoss

A walkthrough

The PowerBuilder Application Server Plugin (PASP) is a new product offering from Sybase. It's currently in beta as part of the EAServer 6.0 beta; however, when released it will be distributed as a separate product. The PASP allows PowerBuilder developers to deploy PowerBuilder components to third-party application servers (JBoss, WebSphere, WebLogic, etc.), much the same as they can with EAServer today. This is of particular importance in companies that have already standardized on a non-EAServer application server.

Another important feature of the new product is the proxy server. When PowerBuilder components are deployed to third-party application servers, they are given an EJB wrapper, the same way that they are wrapped when they're deployed to EAServer. That wrapper allows other components and other clients to access the components as if they were EJBs. A PowerBuilder client that wants to interact with an EJB must do so by configuring a local JVM and using the EJBConnection class to communicate with the component. PowerBuilder clients talking to EAServer don't have to do so to talk to PowerBuilder components because EAServer allows the PowerBuilder clients to talk directly to the PB components. The proxy server allows PowerBuilder clients to do the same thing with PowerBuilder deployed.

The method used to configure each application server that you want to deploy to is highly dependant on the target application server. As a result, we are doing a series of articles on setting up each different application server. This particular article looks at deploying a sample component that provides simple database access to JBoss.

Note: This article was originally written late in the beta for the product, therefore the actual implementation is subject to change before the product is officially released, and some of this information may become dated.

Install JBoss
If you don't already have it, JBoss can be downloaded from www.jboss.com/products/jbossas/downloads.

Note the location where you have installed it because you'll use that information during the configuration step. For this particular walkthrough, I've installed JBoss in the following location:

C:\Program Files\jboss-4.0.3

Install PASP
By default, the PASP is installed in the following directory:

C:\Program Files\Sybase\EAServer6\pb-server

There are three subdirectories of that directory that are of the most interest with regard to configuring and troubleshooting the PASP. The "bin" subdirectory contains a number of batch files that are used to configure the PASP. The "config" subdirectory contains a number of XML files that contain the actual configuration details for the server. Finally, the "logs" subdirectory contains the log files for the server (and, if used, the proxy server) that are useful for troubleshooting.

Set Environmental Variables
PATH
The system path needs to be updated to include the lib directory underneath the PASP installation directory. For example:

c:\Program Files\Sybase\EAServer6\pb-server\lib

It also needs to include the directory where the PB runtime files are located. For example:

C:\Program Files\Sybase\Shared\PowerBuilder

CLASSPATH
The system environmental CLASSPATH parameter has to be updated to include the pbserver.jar file. For example:

C:\Program Files\Sybase\PBServer\lib\pb-server.jar

JAGUAR
Create this environmental variable and set it to the directory where the PASP is installed. For example:

C:\Program Files\Sybase\EAServer6\pb-server

JAGSSL
Create this environmental variable and set it to TRUE.

PB_SERVER_HOME
This environmental variable is optional. It does make running a number of the batch files used for configuring and administering the server easier to use. If this variable is used, it should also point to the installation directory for the PASP.

C:\Program Files\Sybase\EAServer6\pb-server

Set the Admin Password
The first step to setting up PASP is to run the setup-admin-password.bat batch file in the bin directory of the PASP home. Do that from a command prompt in the bin subdirectory, because the batch file will prompt you for password information when it runs (see Figure 1). Note that the password must be at least six (6) characters long and include at least one (1) numeric character. That information is not provided as part of the prompt, and a failure to provide a password that meets that criteria does not return specific error information indicating what the problem is.

Edit the Configuration XML File
There is one configuration file (pb-server.xml) that is used to configure the plug-in as well as a separate configuration XML file for each of the different application servers in the config subdirectory. The one for JBoss is called pb-server-jboss.xml. We will need to modify both of those to indicate the host name that the server is operating on.

PB-SERVER.XML
In this configuration file, we are going to edit the iiopListeners entry so that the PASP knows which host name and port to listen on for deployment requests. Since I'm running the server locally and accessing it locally, I'm going to use "localhost" for the host name.

<property name="iiopListeners" value="iiop://localhost:9000"/>

PB-SERVER-JBOSS.XML
The initial change is to indicate the host name for the java.naming.provider.url. As above, I'm going to use "localhost" for the host name, so I'm modifying the following entry in the pb-server-jboss.xml file:

<property name="ejb-client:java.naming.provider.url" value="jnp://localhost:1099"/>

More Stories By Bruce Armstrong

Bruce Armstrong is a development lead with Integrated Data Services (www.get-integrated.com). A charter member of TeamSybase, he has been using PowerBuilder since version 1.0.B. He was a contributing author to SYS-CON's PowerBuilder 4.0 Secrets of the Masters and the editor of SAMs' PowerBuilder 9: Advanced Client/Server Development.

Comments (4) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
SYS-CON India News Desk 02/24/06 02:50:27 PM EST

The PowerBuilder Application Server Plugin (PASP) is a new product offering from Sybase. It's currently in beta as part of the EAServer 6.0 beta; however, when released it will be distributed as a separate product. The PASP allows PowerBuilder developers to deploy PowerBuilder components to third-party application servers (JBoss, WebSphere, WebLogic, etc.), much the same as they can with EAServer today. This is of particular importance in companies that have already standardized on a non-EAServer application server.

news desk 02/23/06 10:14:40 PM EST

The PowerBuilder Application Server Plugin (PASP) is a new product offering from Sybase. It's currently in beta as part of the EAServer 6.0 beta; however, when released it will be distributed as a separate product. The PASP allows PowerBuilder developers to deploy PowerBuilder components to third-party application servers (JBoss, WebSphere, WebLogic, etc.), much the same as they can with EAServer today. This is of particular importance in companies that have already standardized on a non-EAServer application server.

news desk 02/23/06 09:36:32 PM EST

The PowerBuilder Application Server Plugin (PASP) is a new product offering from Sybase. It's currently in beta as part of the EAServer 6.0 beta; however, when released it will be distributed as a separate product. The PASP allows PowerBuilder developers to deploy PowerBuilder components to third-party application servers (JBoss, WebSphere, WebLogic, etc.), much the same as they can with EAServer today. This is of particular importance in companies that have already standardized on a non-EAServer application server.

news desk 02/23/06 08:55:48 PM EST

The PowerBuilder Application Server Plugin (PASP) is a new product offering from Sybase. It's currently in beta as part of the EAServer 6.0 beta; however, when released it will be distributed as a separate product. The PASP allows PowerBuilder developers to deploy PowerBuilder components to third-party application servers (JBoss, WebSphere, WebLogic, etc.), much the same as they can with EAServer today. This is of particular importance in companies that have already standardized on a non-EAServer application server.