Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Start Geronimo by running the following command:
    <geronimo_home>/bin/geronimo start
  • The provided database creation script requires setting the GERONIMO_HOME environment variable. On the same window you start Geronimo run the following command:
    set GERONIMO_HOME=<geronimo_home>
  • Change directory to the directory containing the database creation scripts.
    cd <daytrader_home>/bin/dbscripts/derby
  • Open createDerbyDB script and verify/modify the Derby version to match the one being used by Geronimo ( e.g. <geronimo_home>/repository/org/apache/derby/derby/10.1.3.1 ). Once you verified the versions match run the script.
    createDerbyDB
    You sould see a scree similar to the one illustrated below.
    No Format
    bgColor#000000
    borderStylesolid
    D:\daytrader-1.2\bin\dbscripts\derby>createDerbyDB.bat
    "Invoking IJ command line tool to create the database and tables...please wait"
    ij version 10.1
    ij> ij> ERROR 42Y55: 'DROP TABLE' cannot be performed on 'HOLDINGEJB' because it does not exist.
    ij> ERROR 42Y55: 'DROP TABLE' cannot be performed on 'ACCOUNTPROFILEEJB' because it does not exist.
    ij> ERROR 42Y55: 'DROP TABLE' cannot be performed on 'QUOTEEJB' because it does not exist.
    ij> ERROR 42Y55: 'DROP TABLE' cannot be performed on 'KEYGENEJB' because it does not exist.
    ij> ERROR 42Y55: 'DROP TABLE' cannot be performed on 'ACCOUNTEJB' because it does not exist.
    ij> ERROR 42Y55: 'DROP TABLE' cannot be performed on 'ORDEREJB' because it does not exist.
    ij> 0 rows inserted/updated/deleted
    ij> 0 rows inserted/updated/deleted
    ij> 0 rows inserted/updated/deleted
    ij> 0 rows inserted/updated/deleted
    ij> 0 rows inserted/updated/deleted
    ij> 0 rows inserted/updated/deleted
    ij> 0 rows inserted/updated/deleted
    ij> 0 rows inserted/updated/deleted
    ij> 0 rows inserted/updated/deleted
    ij> 0 rows inserted/updated/deleted
    ij> 0 rows inserted/updated/deleted
    ij> 0 rows inserted/updated/deleted
    ij> 0 rows inserted/updated/deleted
    ij> 0 rows inserted/updated/deleted
    ij> 0 rows inserted/updated/deleted
    ij> 0 rows inserted/updated/deleted
    ij> 0 rows inserted/updated/deleted
    ij> ij> Table creation complete
    
  • You can verify the database was created by pointing your browser to the Geronimo Administration Console and clicking on DB Manager.
  • The last step in this configuration is to update the deployment plan. Edit the daytrader-1.2-beta-plan.xml deployment plan located in the <daytrader_home>\plans directory and replace ge-activemq-rar/1.2-beta/rar with ge-activemq-rar/1.2/rar.cd

You are now ready to deploy the application.

Deploying Daytrader

So far we have retrieved the source file, built, configured, created a database and updated the deployment plan. Now it is time to install the Daytrader application in Geronimo.

There are basically two ways to deploy an application in Geronimo, either using the Geronimo Administration Console or the command line based deployer tool. For this example we will be using the command line based option.

From the <geronimo_home>/bin directory run the following command:

deploy --user system --password manager deploy <daytrader_home>\modules\ear\target\daytrader-ear-1.2-SNAPSHOT.ear <daytrader_home>\plans\daytrader-1.2-beta-plan.xml

The first deploy is the script that calls the deployer tool, then we pass the user name and password. The second deploy is the actual command option for deploying the daytrader-ear-1.2-SNAPSHOT.ear EAR using the daytrader-1.2-beta-plan.xml deployment plan specifically. In your own application you could call this plan geronimo-application.xml and place it in the META-INF directory within you EAR file and you will not need to expressely specify the deployment plan from the command line.

You should see a deployment confirmation screen similar to the one shown below.

No Format
bgColor#000000
borderStylesolid

D:\geronimo-tomcat-j2ee-1.2\

...

bin>deploy --user system --password manager deploy

...

 \daytrader-1.2\modules\ear\target\daytrader-ear-1.2-SNAPSHOT.ear

...

 \daytrader-1.2\plans\daytrader-1.2-beta-plan.xml

...


Using GERONIMO_BASE:   D:\geronimo-tomcat-j2ee-1.2

...


Using GERONIMO_HOME:   D:\geronimo-tomcat-j2ee-1.2

...


Using GERONIMO_TMPDIR: D:\geronimo-tomcat-j2ee-1.2\var\temp

...


Using JRE_HOME:        C:\Java\jdk1.5.0_06\jre

...


    Deployed geronimo/daytrader/1.2-SNAPSHOT/car

...


      `-> web.war @ http://localhost:8080/daytrader

...


      `-> dt-ejb.jar

...


      `-> geronimo/daytrader-wsapp-client/1.2-SNAPSHOT/car

...


      `-> geronimo/daytrader-streamer-client/1.2-SNAPSHOT/car

...


      `->

...

 TradeDataSource
      `-> TradeJMS

Daytrader is now ready for testing.

Running Daytrader.

  • Access the application pointing your browser to http://localhost:8080/daytrader
  • Click on the Configuration tab.
  • Since we already created the database we can now proceed to populating data, click on (Re)-populate DayTrader Database to generate the sample data.