Deploying Applications to the Production Server

 < Day Day Up > 

After you create the required resources and the EAR files, deploy the application on WebLogic Server by

  • Using the Administration Console

  • Using the weblogic.Deployer command-line utility

SHOP TALK : USING CLUSTERING FOR MAXIMUM AVAILABILITY

Most applications today require multiple servers to handle the load for better performance and a fail-over feature to enable around-the-clock access to the application. This can be achieved by using clustering technology.

A cluster is a group of servers started in a coordinated manner. Servers in a cluster keep track of one another's state. It is transparent to the client which server in the cluster processes a request. For an application to have the load balancing and fail-over features, you must target the application to a cluster instead of to a single server.

To start servers in a cluster, first you need to create a cluster via the Administration Console. Click the cluster folder in the pane on the left, and then click the Configure a New Cluster link on the right.

On the General tab, specify a logical name for the cluster and the cluster address (the <IP address>:<port> of all the servers you want to include in this cluster), with as the delimiter .

On the Multicast tab, specify the multicast address and the multicast port. These two values are unique for a cluster.

On the Servers tab, select the servers you want to move from the Available list to the Chosen list. This list should match the server list specified in the cluster address.

After the cluster is created, restart the servers. You'll notice a line stating "Starting Cluster Service" in each server log file.

After the servers are started in a cluster, you must deploy the application to the cluster through the Administration Console. Click the application name under Deployments in the pane on the left. On the right, click the Targets tab. The clusters that have been created are listed under the Clusters section. Select the cluster, and then click Apply to deploy the application to a cluster. You have the option to deploy to all servers in the cluster or to a selected set of servers.

Depending on the type of application, you should specify certain elements in the application's deployment descriptor.


Using the Administration Console

Follow these steps to deploy applications from the Administration Console:

  1. Start the Administration Console and click the Deployments folder.

  2. Open the Applications folder (see Figure 15.9).

    Figure 15.9. The Applications folder.

    graphics/15fig09.jpg

  3. On the right, click the Deploy a New Application link, as shown in Figure 15.10.

    Figure 15.10. Deploying a new application.

    graphics/15fig10.jpg

  4. Click the Upload Your Files link (see Figure 15.11).

    Figure 15.11. Uploading the files.

    graphics/15fig11.jpg

  5. Choose the EAR file by browsing through the directories or typing the absolute path to the file.

  6. Click the Upload button, as shown in Figure 15.12.

    Figure 15.12. Choosing a file to upload.

    graphics/15fig12.jpg

  7. Select the filename and click Continue, as shown in Figure 15.13.

    Figure 15.13. Deploying the file.

    graphics/15fig13.jpg

  8. By default, the name of the archive file is used as the application name. Change the name of the application, if you want to substitute a more meaningful name (such as RoomServiceApplication instead of RSWebApp), and click Deploy (see Figure 15.14).

    Figure 15.14. Deploying the file.

    graphics/15fig14.gif

Using the Command-Line Utility

This Java-based deployment tool, weblogic.Deployer , can be used to initiate deployment from a command line. You could use this tool when writing scripts to automate the deployment process. The following code shows the syntax:

 java weblogic.Deployer [  options  ] [  actions  ] [  file(s)  ] 

Use the following parameters in this command:

  • options is used to specify information such as the URL of the admin server, username, password, and so forth.

  • actions is used to specify what to do with the file, such as deploy or undeploy .

The following example demonstrates the use of this tool to deploy an EAR file:

 java weblogic.Deployer -adminurl http://localhost:7001     -name Rsapp -source RoomService.ear -targets server1 -deploy 
 < 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