JavaTM Adventure Builder Reference application - Version 1.0.4 > Installing the Demo
Java BluePrints

This section describes how to install the JavaTM Adventure Builder Reference application, version 1.0.4 (referred to as adventure builder)

System Requirements

Before installing the adventure builder, you need to download and install the following software:

Note 1 : When downloading J2EE 1.4 SDK , you have the choice to download and install a bundle that comes with J2SE v1.4.2_02. If you choose this approach, you need not download and install J2SE 1.4.2_02 separately.

Note 2 : You also have the choice to download and install J2EE 1.4 SDK without any J2SE version bundled with it. If you choose this approach, ensure that the J2SE version you use is J2SE v1.4.2_02.

NOTE 3 : If you are using this application on an already installed instance of the J2EE 1.4 SDK and you had already deployed the version of adventure builder that is present as part of the samples bundle of the J2EE 1.4 SDK, you have to undeploy all the adventure  builder components completely before performing the instruction listed below. For instruction on uninstalling the Adventure Builder components, see the next section of this document.

Environment Variables

You need to set the PATH environment variable to include the location of your installed J2EE 1.4 SDK (INSTALL_DIR) in order to setup the adventure builder. The scripts that invoke Ant look for the version of ant included with the J2EE 1.4 SDK. Ant 1.5.3 or greater will work but it is recommended to make these settings if you are not familiar with Ant.

Your PATH must include the following directories as the first two elements.

For Unix:
        $JAVA_HOME/bin
        $INSTALL_DIR/bin
 
        For Windows:
     %JAVA_HOME%\bin 
     %INSTALL_DIR%\bin

Also your CLASSPATH must include the following .

        For Unix:
        $INSTALL_DIR/lib/j2ee.jar

        For Windows:
     %INSTALL_DIR%\lib\j2ee.jar

Installing the Java (tm) Adventure Builder Reference application

NOTE : If you are using this application on an already installed instance of the J2EE 1.4 SDK and you had already deployed the version of adventure builder that is present as part of the samples bundle of the J2EE 1.4 SDK, you have to undeploy all the adventure builder components completely before performing the instructions listed below. For instructions on uninstalling the adventure builder components, see the next section of this document.

To install the demo, follow these steps:

  1. Unzip the distribution bundle (adventure-1_0_4.zip) into any directory.

    Unzipping the distribution bundle creates a directory called adventure1.0.4 . The rest of this documentation refers to this directory as <adventure.home>.

  2. Start Derby database and wait till it is up and running.

    If you are using Unix, open a shell prompt and enter these commands:

    cd $INSTALL_DIR/bin
    asadmin start-database

    If you are using Windows, open a command prompt and enter these commands:

    cd %INSTALL_DIR%\bin
    asadmin start-database

  3. Start the J2EE server and wait till it is up and running.

    If you are using Unix, open a shell prompt and enter these commands:

    cd $INSTALL_DIR/bin
    asadmin start-domain domain1
    If you are using Windows, open a command prompt and enter these commands:
    cd %INSTALL_DIR%\bin
    asadmin start-domain domain1
  4. Configure your environment by changing the settings in <adventure.home>/project/setup/setup.properties file
    Property Name Description Examples
    j2ee.server.name Host name of the server where the J2EE 1.4 SDK is installed localhost
    j2ee.server.username Administrator user name that is used in administrating the server admin
    j2ee.server.passwordfile The path to a file containing the admin password for the J2EE SDK. You need to have a password file in the following format:

    AS_ADMIN_PASSWORD=<j2eesdk-admin-password>

    Where you will replace <j2eesdk-admin-password> with the admin password for the J2EE 1.4 SDK.

    /path/to/passwordfile.txt
    j2ee.adminserver.port
    The port number for admin server you at the time is installation of the J2EE 1.4 SDK
    4848
  5. Run the setup script to install and configure database resources.

    If you are using Unix, open a shell prompt and enter these commands:

    cd <adventure.home>
    sh setup.sh
    If you are using Windows, open a command prompt and enter these commands:
    cd <adventure.home>
    setup.bat
  6. Run the setup script to deploy the applications.

    If you are using Unix, open a shell prompt and enter these commands:

    cd <adventure.home>
    sh setup.sh deploy-apps
    If you are using Windows, open a command prompt and enter these commands:
    cd <adventure.home>

    setup.bat deploy-apps

  After installing the adventure builder, you can start using it.

Uninstalling the Demo

First check if you have already deployed versions of adventure builder in your server by entering the following command and ensure that no application with name ConsumerWebsite or OPC or Bank or ActivitySupplier or LodgingSupplier or AirlineSupplier is present :

If you are using Unix, open a shell prompt and enter these commands:

cd $INSTALL_DIR/bin
If you are using Windows, open a command prompt and enter these commands:
cd %INSTALL_DIR%\bin

now run this commands from the bin directory

asadmin list-components
This will display a list of the deployed applications, and if all the applications have been deployed should list:

ConsumerWebsite <j2ee-application>
OPC <j2ee-application>
Bank <j2ee-application>
ActivitySupplier <j2ee-application>
LodgingSupplier <j2ee-application>
AirlineSupplier <j2ee-application>

If any of the above mentioned applications are present in the server, undeploy them using the following command :
asadmin undeploy <application name>

Configuring Adventure Builder to run on a different port

Make sure you have started the J2EE server and setup resources as mentioned in steps 1 through 5 above. All you have to do to run Adventure Builder on a different port is to point the Web service clients to a different endpoint address. The following deployment descriptor files have to be modified:
 <adventure.home>/project/apps/consumerwebsite/web/WEB-INF/sun-web.xml
 <adventure.home>/project/apps/airlinesupplier/airlinesupplier-ejb/src/conf/sun-ejb-jar.xml
 <adventure.home>/project/apps/lodgingsupplier/lodgingsupplier-ejb/src/conf/sun-ejb-jar.xml
 <adventure.home>/project/apps/activitysupplier/activitysupplier-ejb/src/conf/sun-ejb-jar.xml
 <adventure.home>/project/apps/opc/opc-ejb/src/conf/sun-ejb-jar.xml

Open these files and search for the stub property "javax.xml.rpc.service.endpoint.address"  and change the value of this property to the URL where the endpoints are deployed. Now you can build and deploy the apps.


Copyright © 2005 Sun Microsystems, Inc. All Rights Reserved.