Borland  
Search Sitemap Contact
Company Products Downloads Services Support Community   Shop Now!

Borland Enterprise Server
AppServer Edition

All Editions Matrix
Features and Benefits
What's New
Data Sheet (PDF)
Platform Requirements
White Papers
Awards
Documentation
Case Studies
Previous Version

Borland Enterprise Server
Web Edition
VisiBroker Edition

Order Now

Professional Services
Support
Training

News & Press
News Articles
Press Releases

Additional Resources
Community
Newsletter

AppCenter

Newsgroups

Report Software Piracy

jobs@borland.com

Got Training

We Support CORBA


Run J2EE™ Pet Store Application 1.3 with the Borland® Enterprise Server™ 5.0.2

<
Introduction
 
To host the Pet Store Application on a J2EE server you must provide the server-specific deployment meta-data for that server. This document walks you through this with the Borland Enterprise Server as the target server using the accompanying collateral.

 

 Download and Install Borland Enterprise Server
 

If you do not already have Borland Enterprise Server then you can download a fully functional trial copy of Borland Enterprise Server from http://www.borland.com/bes.

Follow the instructions in the Installation Guide.

Set the environment variable BES_HOME to point to the directory into which you installed Borland Enterprise Server. The remainder of this document will refer to this directory as %BES_HOME%.

 

 Download and Install the Borland Pet Store Collateral
 

Download the Borland Pet Store collateral from http://www.borland.com/devsupport/bes/downloads/deployathon/petstore/borland_petstore13.zip.

Extract the zip archive into a directory of your choosing. This will result in the creation of a subdirectory called borland_petstore13 which contains the Pet Store application enterprise archive files (EARs) ready for deployment to Borland Enterprise Server, as well as all necessary instructions for doing so (including this page).

Set the environment variable BORLAND_PETSTORE13 to point to the borland_petstore13 subdirectory which you just created. The remainder of this document will refer to this directory as %BORLAND_PETSTORE13%.

 

 Prepare Borland Enterprise Server Partitions for Pet Store

 

Running Pet Store 1.3 in Borland Enterprise Server requires two separate partitions which must each be correctly configured. To simplify setup for Petstore, it is recommended that you create two new partitions in which you can make all necessary configuration changes for deploying Pet Store.

To create the two new partitions:

  • Start the Borland Enterprise Server
  • Run up the Borland Enterprise Server Console
  • Right-click on Partitions under your server name in the Console, select New Partition in the context menu, and name the resulting new partition "petstore"
  • Again, right-click on Partitions, select New Partition, and name this second new partition "opc"
  • Copy all files from %BORLAND_PETSTORE13%\partition_properties\petstore\* to:
    %BES_HOME%\var\servers\<server_name>\adm\properties\petstore
  • Copy all files from %BORLAND_PETSTORE13%\partition_properties\opc\* to:
    %BES_HOME%;\var\servers\<server_name>\adm\properties\opc
  • Stop the standard partition and start the petstore and opc partitions via the Console
 
 Deploy Datasource Definitions for Pet Store

 

Datasource definitions and JDBC drivers have been provided for both Cloudscape and Oracle databases.

Note: the Cloudscape drivers provided with the accompanying collateral are for Cloudscape version 4.0. If you are running a different version of Cloudscape, you must use the drivers which support that version. If you do not have Cloudscape installed and would like to obtain a copy, it is delivered as part of the J2EE 1.3 SDK. You can download the SDK from: http://java.sun.com/j2ee/download.html#sdk

First deploy the JDBC drivers and restart the server to get them on the partition's classpath:

  • Bring up the Borland Enterprise Server Console, select the Tasks menu, select the Deployment sub-menu, and click on Deploy J2EE modules to a partition.
  • Click on the Add button.
  • In the navigation window, go to the directory where the drivers reside.
    • For Cloudscape, navigate to %BORLAND_PETSTORE13%\datasources\cloudscape
    • For Oracle, navigate to %BORLAND_PETSTORE13%\datasources\oracle
  • Now select the JDBC driver archives to deploy:
    • For Cloudscape, select RmiJdbc.jar and cloudclient.jar
    • For Oracle, select class12_01.zip
  • Click the OK button.
  • For target partition, select petstore.
  • Click the OK button.
  • Repeat this process for the opc partition.

Next, edit the jndi definitions for your database and deploy them to both partitions.

For Cloudscape:

  • Edit %BORLAND_PETSTORE13%\datasources\cloudscape\jndi-definitions.xml.
  • Find the driver-datasource section for serial://datasources/wrapper/CloudscapeDriver.
  • In the url property, make sure that the host name and port (by default, these are specified as localhost:1099) match the host name and port for your Cloudscape server.
  • Make sure that the values specified for user and password are appropriate.
  • Copy the edited file to %BES_HOME%\var\servers\<server_name>\partitions\petstore\jndi-definitions.xml.
  • Copy the edited file to %BES_HOME%\var\servers\<server_name>\partitions\opc\jndi-definitions.xml.

For Oracle:

  • Edit %BORLAND_PETSTORE13%\datasources\oracle\jndi-definitions.xml.
  • Find the driver-datasource section for serial://datasources/OracleCPDS.
  • Make sure that the values specified for user, password, databaseName, serverName, and portNumber are appropriate for connecting to your Oracle database.
  • Copy the edited file to:
    %BES_HOME%\var\servers\<server_name>\partitions\petstore\jndi-definitions.xml.
  • Copy the edited file to:
    %BES_HOME%\var\servers\<server_name>\partitions\opc\jndi-definitions.xml.

 

 Create Message Queues
 

You must create several message queues before deploying the Petstore application modules.

Bring up the Borland Enterprise Server Console and double-click on the /Services element. Note that there is a separate Services entry under each partition; here what we want is the Services entry for the entire server. Make sure that the Sonic MQ Broker service is started; if not, start it now.

Next, from a DOS prompt, invoke the Sonic MQ Admin tool. This will be found in <BES_HOME>\SonicMQ\bin\admin.bat. Enter the following commands:

      > connect broker localhost
      > set queue MailOrderApprovalQueue
      > set queue MailQueue
      > set queue OrderApprovalQueue
      > set queue OrderQueue
      > set queue PurchaseOrderQueue
            

 

 Deploy Pet Store To Borland Enterprise Server
 

A full set of Pet Store application EARs already customized for running in Borland Enterprise Server are provided with the accompanying collateral. However, if you wish, you can go through the process yourself of taking a virgin Pet Store distribution as provided by Sun Microsystems and making the necessary modifications.

Follow the instructions detailed at http://www.borland.com/devsupport/bes/downloads/deployathon/petstore/readme13virgin.html to produce a set of EARs ready for deployment. Then continue with the rest of this section to actually deploy the EAR files.

To deploy the Pet Store EAR files:

  • Bring up the Borland Enterprise Server Console, select the Tasks menu, select the Deployment sub-menu, and click on Deploy J2EE modules to a partition.
  • Click on the Add button.
  • In the navigation window, go to the directory where the EARs reside. (For the pre-customized EAR files, this will be %BORLAND_PETSTORE13%.)
  • Select the following files:
    • petstore.ear
    • petstoreadmin.ear
    • supplier.ear
  • Click the OK button.
  • For target partition, select petstore.
  • Click the OK button.
  • Again, select the Tasks menu, select the Deployment sub-menu, and click on Deploy J2EE modules to a partition.
  • Click on Add.
  • Select the following files:
    • opc.ear
  • For target partition, select opc.
  • Click the OK button.

 

 Access Pet Store
 

Point your browser to the following URL: http://localhost:8080/petstore. Then follow the instructions on that page to enter the Pet Store.

 

 Support
 

The j2eeblueprints interest list is the place to get answers to questions about running the Deployathon with Java 2 SDK, Enterprise Edition 1.3.1.

To join the interest list, send an email to listserv@java.sun.com. Specify:
  subscribe j2eeblueprints-interest <yourlastname> <yourfirstname>
in the body of the email.


Company   Products   Downloads   Services   Support   Community   Worldwide top of page

Copyright © 1994 - 2002 Borland Software Corporation. All rights reserved.  Legal Notices.  Privacy Policy. Site Map   Search   Contact Us

Last Modified Tuesday, 19-Mar-02 08:42:35 PST