...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1" xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1" xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1" xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"> <sys:environment> <sys:moduleId> <sys:groupId>org.apache.geronimo.samples</sys:groupId> <sys:artifactId>MyPhonebookWeb</sys:artifactId> <sys:version>1.0</sys:version> <sys:type>car</sys:type> </sys:moduleId> </sys:environment> <context-root>/myphonebook</context-root> </web-app> |
Deployment Plan for the application
geronimo-application.xml tells the application that there is a database pool that needs to be deployed as well. The db pool is defined in PhoneBookPool.xml and the driver that is needs in order to be deployed is the tranql-connector-ra-1.3.rar file--these two files will reside on the top level layer of the resultant EAR file.
...
- Select DB Manager link from the Console Navigation in the left.
- Give the database name as PhoneBookDB and click Create button.
- Select PhoneBookDB to the Use DB field.
- Open PhoneBookDB.sql in the myphonebook/myphonebook-ear/src/main/resources directory from a text editor.
- Paste the content PhoneBookDB.sql to the SQL Commands text area and press Run SQL button.
Building
Use a command prompt to navigate into the myphonebook directory and just give mvn clean install site command to build. It will create the myphonebook-ear-2.0-SNAPSHOT.ear under the myphonebook folder. Now, you are ready to deploy myphonebook application in the Geronimo Application server.
Deploying the Application
Deploying sample application is pretty straight forward as we are going to use the Geronimo Console.
...