Deploying the System

The system was designed using only standard J2EE features and would support deployment configuration where the two web applications could be run in web containers provided by two different vendors, and the messaging system on a third machine running a JMS provider from a third vendor. But to keep things simple, in this section I'll explain how these three systems can be configured, deployed, and run under the same instance of WebLogic server running on a single machine.

Note 

We've been using WebLogic 6.0, which can be downloaded for evaluation from http://www.bea.com.

Compiling the Classes

I recommend that you use the following directory structure:

     User/         banner.jsp         casehistory.jsp         createcase.jsp         index.jsp         login.jsp         newcase.jsp         WEB-INF/                 web.xml                 user.tld                 classes/                         com/                             acme/                                 common/                                        IJMSConstants.java                                        JMSManager.java                                 user/                                      CaseHistoryTag.java                                      CaseResponseTag.java                                      CreateCaseTag.java                                      CreateCaseTagVariableInfo.java                                      IDGenerator.java                                      ResponsePool.java     System/            banner.jsp            index.jsp            listcase.jsp            login.jsp            updatecase.jsp            viewcase.jsp            WEB-INF/                    web.xml                    system.tld                    classes/                            com/                                acme/                                     common/                                            IJMSConstants.java                                            JMSManager.java                                     system/                                            CaseRequest.java                                            ListCaseTag.java                                            RequestPool.java                                            UpdateCaseTag.java                                            ViewCaseTag.java 

Compile all the Java classes explained in the previous sections. Make sure that you have weblogic.jar in your classpath.

Creating Web Archive Files

Before the web applications can be deployed into the WebLogic server, we need to create web application archive (WAR) files. This can be done using the JAR utility that comes with JDK software distribution:

     cd User     jar -cf user.war *     cd ..\System     jar -cf system.war * 

Deploying the Web Applications

For deploying the WAR files, first start the WebLogic server. Open the administration console and click on the Web Application link on the left-hand pane navigation tree. This will display the screen shown below:

click to expand

Click on the Install a new Web Application link in the right-hand pane, then browse to the newly created user.war file from the local file system:

click to expand

Click on the Upload button:

click to expand

Do the same for system.war.

Now expand the Servers node in the left-hand pane, and click on the myserver node. Now click on the Deployment tab displayed on the right-hand pane. Then click on the Web Applications tab under the Deployment tab. Make sure both web applications are in the Chosen list on the right:

click to expand

You should be able to run the applications by visiting the http://localhost:7001/user and /system URLs, as we have seen in earlier screenshots.



Professional JMS
Professional JMS
ISBN: 1861004931
EAN: 2147483647
Year: 2000
Pages: 154

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