web server - Borland Technical Publications

web server - Borland Technical Publications web server - Borland Technical Publications

techpubs.borland.com
from techpubs.borland.com More from this publisher
12.11.2014 Views

Building and running the BES examples Building and running the BES examples Note Note Many of the BES examples have their own readme.html files located in: /examples To build a BES example: 1 Open a command line window. 2 Set the current directory to an example directory. The “Hello World” example located at /examples/j2ee/hello is a good place to start. 3 On the command line, enter “ant”. The example should build automatically. The server does not have to be running to build the example. However, deployment and undeployment require that the server be operational. Executing an example requires that the Partition be running. Deploying the example 1 Make sure that a server is running. 2 On the command line, enter ant deploy. This will deploy the example to the Hub, Configuration, and Partition set in the \examples\deploy.properties file. If you wish to deploy to a different combination of Hub/Configuration/Partition, you can either edit the deploy.properties file to change the settings, or use -D options on the command line to override the deploy.properties settings. For example, to use a Hub named “myhub”, use the command: ant -Dhub.name=myhub deploy This will override the default Hub name in deploy.properties with the value myhub. Running the example 1 Make sure that the Partition is running. 2 On the command line, enter ant execute. The precise response depends on the particular example. Undeploying the example 1 Make sure that a server is running. 2 On the command line, enter undeploy. Troubleshooting 1 Make sure that the /bin directory is on your path and precedes the path to any alternative Ant installations. 2 Before calling the ant execute command, make sure that the server and the Partition are running. Chapter 28: BES Ant tasks and running BES examples 291

Building and running the BES examples 3 The \examples\deploy.properties contains default settings for the Hub, Configuration, Partition, and Management Port. These default properties include: ■ ■ ■ ■ ■ ■ hub.name=your_machine_name cfg.name=j2ee partition.name=standard realm.name=ServerRealm server.user.name=admin server.user.pwd=admin where your_machine_name is the machine name designated at installation. You can reset these values as needed or specify them on the Ant command line using the -D option. 292 BES Developer’s Guide

Building and running the BES examples<br />

Building and running the BES examples<br />

Note<br />

Note<br />

Many of the BES examples have their own readme.html files located in:<br />

/examples<br />

To build a BES example:<br />

1 Open a command line window.<br />

2 Set the current directory to an example directory. The “Hello World” example located<br />

at /examples/j2ee/hello is a good place to start.<br />

3 On the command line, enter “ant”.<br />

The example should build automatically.<br />

The <strong>server</strong> does not have to be running to build the example. However, deployment<br />

and undeployment require that the <strong>server</strong> be operational. Executing an example<br />

requires that the Partition be running.<br />

Deploying the example<br />

1 Make sure that a <strong>server</strong> is running.<br />

2 On the command line, enter ant deploy.<br />

This will deploy the example to the Hub, Configuration, and Partition set in the<br />

\examples\deploy.properties file.<br />

If you wish to deploy to a different combination of Hub/Configuration/Partition, you can<br />

either edit the deploy.properties file to change the settings, or use -D options on the<br />

command line to override the deploy.properties settings.<br />

For example, to use a Hub named “myhub”, use the command:<br />

ant -Dhub.name=myhub deploy<br />

This will override the default Hub name in deploy.properties with the value myhub.<br />

Running the example<br />

1 Make sure that the Partition is running.<br />

2 On the command line, enter ant execute.<br />

The precise response depends on the particular example.<br />

Undeploying the example<br />

1 Make sure that a <strong>server</strong> is running.<br />

2 On the command line, enter undeploy.<br />

Troubleshooting<br />

1 Make sure that the /bin directory is on your path and precedes the<br />

path to any alternative Ant installations.<br />

2 Before calling the ant execute command, make sure that the <strong>server</strong> and the Partition<br />

are running.<br />

Chapter 28: BES Ant tasks and running BES examples 291

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!