Section 23.3. Deploying the EAR


23.3. Deploying the EAR

Deploying means getting your file(s) into the right place and dealing with the Web server to get your application up and running. For EJBs this includes the automatic construction of various components by the server. It's not as daunting as it soundsat least not any more.

23.3.1. JBoss

One of the great things about JBoss is its dynamic or "hot" deployment. The only work involved in deploying your application, if you have the EAR file built properly, is to copy the EAR file to the deployment directory. JBoss does all the rest.

Here is a listing of a very simple shell script that does what is needed, followed by an invocation of that shell script to install our BudgetPro example EAR file.

 $ cat ejbinstall cp $* /usr/local/jboss-3.2.3/server/default/deploy $ ejbinstall budgetpro.ear $ 

Of course, this assumes that execute permission has been given to the script and it is located in the search path. Furthermore, it assumes that JBoss (version 3.2.3) was installed in /usr/local.

23.3.2. Geronimo

Geronimo will be undergoing lots of change between the time that we write this and the time that you read this. Be sure to check the Geronimo Web site[1] for the latest information.

[1] http://geronimo.apache.org/

Geronimo deployment is done as a separate executable step and is not folded into the server. This separation of functions keeps the server smaller and quicker on startup. The deployer has the smarts for reading in all the XML configuration information for your bean, building all the needed classes, and serializing it to package it up.

To deploy our EAR, we execute the following command from the Geronimo home directory:

 $ java -jar bin/deployer.jar --install --module budgetpro.ear 

Although not available in the early releases, Geronimo may add a "hot deploy" feature where the EAR file can just be put into a deploy directory and the rest will happen automatically. Even so, what will be happening behind the scenes is this same deploy step.



    Java Application Development with Linux
    Java Application Development on Linux
    ISBN: 013143697X
    EAN: 2147483647
    Year: 2004
    Pages: 292

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net