Preparing Applications for a Production Environment

 <  Day Day Up  >  

There are two ways to deploy an application on the production server:

  • As an Enterprise Application Archive (EAR) or a Java Archive (JAR) file, depending on whether you're deploying an entire application or a specific project

  • As an exploded directory

WEB APPLICATION DEPLOYMENT

If you create a Web application using Workshop, you cannot deploy the project separately as a Web Application Archive (WAR) file; it can be deployed only as part of an entire application within an EAR file.


Deploying As an Archived Format

To generate an EAR file, select Build, Build EAR from the menu. Figure 15.1 shows the resulting output. This option does not enable you to choose what you want to build.

Figure 15.1. Building an EAR file.

graphics/15fig01.gif

When you select this option, a wlw-manifest.xml file is created in the application's META-INF directory. This file lists the resources that need to be created for the application to run successfully. In the development and testing life cycle, WebLogic Server creates these resources automatically when you use Workshop. These resources are specific to Web services.

Another way to create an EAR file is by using the wlwBuild.cmd command-line tool located in the BEA_HOME\weblogic81\workshop directory:

 wlwBuild -p <  project-name  > -od <  output-dir  >     -of <  output-file  > -scp <  server-classpath  >         - f <  build-properties-file  > <  application-file  >.work 

This command has the following parameters:

  • project-name specifies the name of the project that should be built. If this information is not supplied, the entire application is built.

  • output-dir specifies the directory where the output EAR file should be placed. If this option is not specified, the file is placed in the application's root directory.

  • output-file specifies the name of the file that should be produced.

  • server-classpath specifies the server classpath to be used. If it's not specified, it defaults to the classpath of the application's selected server.

  • build-properties-file specifies the property file containing the preceding options. Full names of options must be used.

  • application-file .work indicates that the application configuration parameters from the specified .work file should be used.

This tool gives you the flexibility to specify which projects you want to build into a JAR file instead of simply building everything. The following code demonstrates how this tool is used:

 wlwBuild -p RoomServiceAppWeb -od c:\casino -of RoomService RoomServiceApp.work 

Deploying As an Exploded Directory Format

Deploying as an exploded directory format instead of an archive allows your changes to take place immediately. Some examples of properties you might want to change are cache settings, visitor entitlements , and campaigns in a portal application.

 <  Day Day Up  >  


BEA WebLogic Workshop 8.1 Kick Start
BEA WebLogic Workshop 8.1 Kick Start: Simplifying Java Web Applications and J2EE
ISBN: 0672326221
EAN: 2147483647
Year: 2004
Pages: 138

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