Wiki Markup |
---|
{scrollbar} |
Anchor
...
After decompressing the given file, the Order directory is will be created.
Configuring
Configuration of the application consists of creating the database and defining the connection pool to access itJMS resources and accessing them via defferent sorts of enviroments.
Creating JMS Specific Resources
Modify Property Files
Note |
---|
This build script depends on XDoclet version 1.2.3 and Geronimo 1.1. |
Building
Deploying
...
All JMS specific resource information can be found in the config/jms-resource-plan.xml file. Please follow given to deployment after logged in to the Geronimo console.
- Select Deploy New link from the Console Navigation in the left.
- Load the <geronimo_home>/repository/geronimo/ge-activemq-rar/1.1/ge-activemq-rar-1.1.rar file to the Archive field.
- Load the Order/config/jms-resource-plan.xml file to the Plan input field.
- Press Install button. Make sure Start app after install is selected when this deployment happens
- After you get the successful installation message, verify the deployment traversing JMS resources link. It will display the connection factory and two JMS queues.
Modify Property Files
This application has two different property files in the config folder namely build.properties and order_mgmt.properties. Build process of the application is entirely depends on the build.propeties while application will use order_mgmt.properties to load application related properties.
Set the correct paths to the xdoclet.home and geronimo.home directories to work application build process correctly.
Note |
---|
This build script depends on XDoclet version 1.2.3 and Geronimo 1.1. |
order_mgmt.properties file given is shared among four defferent application components. If you deploy one of these application components out side of application server, make sure to change the relevant network property in the above mentioned property file.
Building
Use a command prompt to navigate into the Order directory and just give ant command to build. It will create the Order.ear, recvclient.jar and sendclient.jar under the Order/releases folder. Also note it will create a lib folder and copy list of jar files refered by the remote client applications. Now you are ready to deploy order processing application in to the Geronimo Application server.
Deploying
Deploying Order processing sample application is pretty same as the deployment of JMS resources.
- Travel Deploy New from the Console Navigation.
- Load Order.ear from Order/releases folder in to the Archive input box.
- Press Install button to deploy application in the server.
Testing of the Sample Application
Anchor | ||||
---|---|---|---|---|
|
Core business functionality of the order processing application is shared among the three different client applications.
Order Placement Web Application
To test the sample web application open a browser and type http://localhost:8080/Order. It will forward you in to the Order Management Welcome page. Then user has to fill the necessary information for the order placement and submit it.
Consignment Placement Remote Application
This application will send consignment requests to the consignment queue. It will take consignment file as a command line argument. Sample consignment has been given with the appication archive as Order/config/sample-consignment.xml. First travel to the Order/releases from a command prompt and give the following command.
java -jar sendclient.jar <home>/Order/config/sample-consignment.xml
Consignment Listener Remote Application
Listener application to the consignment queue. It will download the consignment requests in the local repository. As in the above mentioned application first travel to the Order/releases from a command prompt. After that issue following command to start listening on the consignment queue.
java -jar recvclient.jar
Note |
---|
Always consider lib folder inside of releases are a part of this client application.Check your Operating Sytem's security configuration when you are connecting from a remote machine. |
Summary
Anchor | ||||
---|---|---|---|---|
|
This article has demontrated how to use JMS features in Apache Geronimo with the ActiveMQ JMS server.It provides a hypothical example which extensively used JMS features to application processing.
Following are some of the highlights.
- Apache Geronimo is a J2EE 1.4 Certified application server and it provides all the necessary features support asynchronous mode of communication.
- Define JMS connection factories and related queues.
- Message Driven Beans are the components are listener application components provides by J2EE container. This article has shown how to define them effective manner.
- Sending and recieving data to a defined queue as a remote client to the application server
...
Order Placement Web Application
Order Placement Remote Application
Note |
---|
Always consider lib folder inside of releases are a part of this client application.Check your Operating Sytem's security configuration when you are connecting from a remote machine. |
...