BEA Logo BEA WebLogic Java Adapter for Mainframe Release Release Number 4.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   WebLogic Java Adapter for Mainframe Doc Home   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Deploying Applications

 

Deployment is the process of taking previously developed servlets and/or EJBs and installing them into a specific operational environment. In this case, the operational environment is your WebLogic system. This section describes how to deploy your own applications using the BEA WebLogic Java Adapter for Mainframe (JAM) software.

This section discusses the following topics:

 


Deploying Servlets

Please refer to the BEA WebLogic Server documentation for detailed instructions on deploying servlets.

The following steps provide an example of deploying a servlet by modifying the weblogics.properties file.

Perform the following steps to deploy a servlet:

  1. Place a class file for the servlet and all other classes that it depends on into the servlet classpath. Be sure to include the class files for the DataView's that are used by the servlet.

  2. Add a registration line to your weblogics.properties file. This line will specify both the URL that will be used to access the servlet, and the full package and name of the servlet class. For example, assuming your server is named www.webstore.com, the properties line weblogic.httpd.register.widgets=webstore.WidgetServlet will cause the class webstore.WidgetServlet to serve requests to the URL http://www.webstore.com/widgets.

    weblogic.httpd.register.urlname=mypackage.MyServlet

    This registration line causes the WebLogic Server to use the servlet class "mypackage.MyServlet" to serve all HTTP requests for a page at the URL name (on your host).

  3. Add any corresponding remote service entries into the jcrmgw.cfg file. For example, if your servlet invokes a service named widgetQuote, then you would need something like the following in your configuration:

    *JC_REMOTE_SERVICES
    widgetQuote RDOM="myMainframe"
    RNAME="WIDQUOTE"

  4. Restart the WebLogic Server.

There are other servlet deployment options, including hot-deploying a servlet into a running WebLogic server. Please refer to the WebLogic Server documentation for more details.

 


Deploying Enterprise Java Beans

Please refer to the BEA WebLogic Server documentation for detailed instructions on deploying EJBs. The WebLogic samples provide examples of build scripts for UNIZ and NT platforms.

Perform the following steps to deploy an EJB:

  1. Create a jar file containing the class files for the EJB and any other classes needed by your EJB. This jar file must be constructed following the normal Java requirements for class jar files.

  2. Rename the deployment XML files to the standard names (ejb-jar.xml and weblogic-ejb-jar.xml) and place them into the jar file. They must be placed into a subdirectory within the jar file named `META-INF'

  3. Use the weblogic ejb compiler (weblogic.ejbc) to build the container classes for you EJB. The command will look something like:

          java weblogic.ejbc input.jar output.jar

  4. Edit your weblogic.properties file to add the output jar file to the EJB deployment list:

          weblogic.ejb.deploy=c:\my\path\output.jar

  5. Add any corresponding local or remote service entries into the jcrmgw.cfg file. For example, if your EJB invokes a service named "widgetQuote", then you would need something like the following in your configuration:

    *JC_REMOTE_SERVICES
    widgetQuote RDOM="myMainframe"
    RNAME="WIDQUOTE"

  6. Restart BEA WebLogic Server.

EJBs may also be placed into jar files before being deployed, and may be hot-deployed into a running WebLogic Server. Please refer to the Weblogic Server documentation for more details.

If you wish to deploy more than one EJB in the same jar file, the deployment XML files must be combined. Refer to the WebLogic Server documentation.

Give special attention to classpath setting if you are also deploying a servlet that accesses this EJB or the same DataView subclass. You may need to place all common classes on your WEBLOGICCLASSPATH rather than on your servlet classpath.