Sun GlassFish Enterprise Server v3 Prelude

Enterprise Server Quick Start Guide

Sun GlassFish Enterprise Server v3 Prelude provides the following:

This document provides the following topics:

How This Quick Start Guide Works

The Sun GlassFish Enterprise Server v3 Prelude Quick Start Guide enables you to quickly learn the basics about key Enterprise Server features.

This document provides basic instructions for installing, running, and removing Enterprise Server software. Step-by-step procedures introduce you to product features and allow you to learn about and use them immediately.

The instructions and examples in this document use the forward slash character (/) as path separators in all file and command names. Be sure to use the correct character for the system that Enterprise Server is installed on. For example:

This document provides fundamental information only. For links to comprehensive information about Enterprise Server or other entities mentioned in this document, see For More Information. When this guide is updated, the most recent version is available in the Enterprise Server v3 Prelude documentation collection.

Obtaining Enterprise Server v3 Prelude Software

To read additional details about this release before you begin, review the Sun GlassFish Enterprise Server v3 Prelude Release Notes. The Release Notes provide recent information, limitations, and tips for installing and working with Sun GlassFish Enterprise Server v3 Prelude software.

To use this guide to explore the Enterprise Server features, Enterprise Server v3 Prelude software must be installed on your system. You have these options:

Installing And Updating Enterprise Server v3 Prelude Software

This section provides instructions for installing and updating Enterprise Server software.


Tip - If Enterprise Server v3 Prelude software is already installed and updated, you can skip this section and go to Starting and Stopping the Default Domain.


Performing an Enterprise Server Installation

This section provides instructions for installing Enterprise Server v3 Prelude software.

To Install Enterprise Server Software
  1. Select a directory to install Enterprise Server.
    • Use the default directory.

      If you do not specify an installation directory, the software will be installed in the following directories:

      • UNIX systems or Linux systemsuser-home-directory /glassfishv3-prelude

      • Windows systemsC:\Program Files\glassfishv3-prelude

      • MacOS X systems/Applications/glassfishv3-prelude

    • Set up a directory for installing Enterprise Server.

    Throughout this document, the directory you choose for installing is referred to as as-install.

  2. Download the latest.zip file to the installation directory.

    This platform-independent ZIP file can be used on Windows, Linux, AIX, Mac OS, and SolarisTM platforms.

  3. Use the cd command to change to the installation directory.

    cd as-install

  4. Unzip the bundle.

    unzip gfv3-prelude.zip

    The v3 Prelude distribution is installed into a new glassfishv3-prelude directory under your current installation directory.

  5. To explore Enterprise Server features, go to Starting and Stopping the Default Domain.

Updating Enterprise Server Software

Update Tool is a graphical utility that provides these functions:

Update Tool is manually enabled following installation, to ensure explicit agreement of automated updates.

See the Update Center wiki for more information about this tool.

If you have already installed Enterprise Server and enabled Update Tool, skip this section and go to Starting and Stopping the Default Domain.

To Update an Existing Enterprise Server Installation

This task explains how to enable and start Update Tool. If Update Tool is already enabled, skip this section and go to Starting and Stopping the Default Domain.

  1. Use the updatetool command to start Update Tool.
    
    as-install/bin/updatetool

    Note - If you have not executed this command before, you are prompted to install the required components by pressing any key and following the onscreen instructions to complete the installation.

    Type the updatetool command again to open Update Tool:

    as-install/bin/updatetool

  2. Explore the Update Tool interface.
    • To view components that are installed:
      1. From the navigation tree, click Installed Components under GlassFish v3 Prelude.
      2. In the list of components, click the name of any component to view a description of the component in the Description pane.
    • To view add-on components that you can install:
      1. From the navigation tree, click Available Add-ons under GlassFish v3 Prelude.
      2. In the list of components, click the name of any component to view a description of the component in the Description pane.
  3. From the navigation tree, click Available Updates.

    Components with available updates are listed.

    If no components are listed, your Enterprise Server v3 Prelude installation is current.

  4. Select the components that you want to update and click Update.
  5. Accept license agreements that are presented.
  6. To apply the updates, restart Update Tool.
  7. To close Update Tool, select File → Quit.

Starting and Stopping the Default Domain

By default, when you install Enterprise Server, a default domain named domain1 is created.

To Start the Default Domain

Before You Begin

Enterprise Server software must be installed before you start the domain.

To Stop the Default Domain

Starting and Stopping the Database Server

A database server is not started by default when you start the Enterprise Server domain. If you have applications that need a database back end, you must start and stop the database server manually.

To Start the Sun GlassFish Java DB Server

The instructions in this procedure describe how to start the Java DB server that is bundled with Enterprise Server, but they apply for the most part to any database you want to use.

Before You Begin

At least one Enterprise Server domain must be started before you start the database server.

To Stop the Java DB Server

Starting the Administration Console

The Enterprise Server Administration Console provides a browser interface for configuring, administering, and monitoring the Enterprise Server and your domains.

To Launch the Administration Console

Before You Begin

At least one Enterprise Server domain must be started before you launch the Administration Console.

  1. To open the Administration Console, type the URL in a browser window.

    The default URL for the Administration Console is:

    http://localhost:4848
    
  2. Log in to the Administration Console.

    By default, the user name is anonymous and the Password field is left blank (no password).

See Also

Refer to the Administration Console online help for further instructions.

Deploying and Undeploying Applications

The process of configuring and enabling an application to run within the Enterprise Server framework is referred to as deployment.


Note - In the v3 Prelude release, applications can be packaged for deployment in web archive (WAR) format only.


This section explains how to deploy, list, and undeploy applications.

Obtaining a Sample Application

The procedures in this section use the hello.war application.

To Obtain a Sample Application
  1. To download a copy of the hello.war sample, go to https://glassfish.dev.java.net/downloads/quickstart/hello.war .
  2. Click Yes to save the hello.war file.
  3. Save the hello.war file in the directory of your choice. This document refers to this directory as sample-dir.

Deploying an Application from the Command Line

You can deploy applications from the command line by using the asadmin deploy command.

To Deploy the Sample Application From the Command Line
Before You Begin

The sample application must be available before you start this task. To download the sample, see Obtaining a Sample Application. At least one Enterprise Server domain must be started before you deploy the sample application.

  1. Use the asadmin deploy command.

    The general form for the command is:

    as-install/bin/asadmin deploy war-name

    To deploy the hello.war sample, the command is:

    
    as-install/bin/asadmin deploy sample-dir/hello.war
  2. Access the hello application by typing the following URL in a browser window:
    http://localhost:8080/hello

    The application's start page is displayed, and you are prompted to type your name.

    Hi, my name is Duke. What's yours?
  3. Type your name and click Submit.

    The application displays a customized response, giving you a personal Hello.

See Also

See deploy(1) for more information about the deploy command.

See Sun GlassFish Enterprise Server v3 Prelude Application Deployment Guide for more information about deploying applications from the command line.

To List Deployed Applications From the Command Line
To Undeploy the Sample Application From the Command Line
See Also

See undeploy(1) for more information about the undeploy command.

Deploying an Application by Using the Administration Console

You can deploy applications from the graphical Administration Console.

To Deploy the Sample Application From the Administration Console
Before You Begin

The sample application must be available before you start this task. To download the sample, see Obtaining a Sample Application. At least one Enterprise Server domain must be started before you deploy the sample application.

  1. Open the Administration Console by typing the following URL in a browser window:
    http://localhost:4848
  2. Click the Applications node in the tree on the left.

    The node expands to display the Web Applications subnode.

  3. Click the Web Applications subnode.

    The Web Applications page is displayed.

  4. Click Deploy.

    The Deploy Enterprise Applications/Modules page is displayed.

  5. Select Packaged File to be Uploaded to the Server, and click Browse.
  6. Navigate to the location in which you saved the hello.war sample, and then click Open.

    You are returned to the Deploy Enterprise Applications/Modules page.

  7. Specify a description in the Description field, for example:

    hello

  8. Accept the other default settings, and click OK.

    You are returned to the Web Applications page.

  9. Run the sample application.
    • Click the Launch link on the Web Applications page.
    • Type the following URL in a browser window:
      http://localhost:8080/hello/
      
See Also

Refer to the Administration Console online help for further instructions.

To View Deployed Applications in the Administration Console
  1. Open the Administration Console by typing the following URL in a browser window:
    http://localhost:4848
  2. Click the Applications node in the tree on the left.

    The node expands to display the Web Applications subnode.

  3. Click the Web Applications subnode.

    The list of deployed web applications is displayed in the Deployed Web Applications table on the Web Applications page.

To Undeploy the Sample Application From the Administration Console
  1. Open the Administration Console by typing the following URL in a browser window:
    http://localhost:4848
  2. Click the Applications node in the tree on the left.

    The node expands to display the Web Applications subnode.

  3. Click the Web Applications subnode.

    The Web Applications page is displayed.

  4. Select the check box next to the applications you want to undeploy.
  5. Remove or disable the application.
    • To remove the application, click Undeploy.
    • To disable the application, click Disable.

Deploying an Application Automatically

To use automatic deployment, you can deploy applications by placing the applications in the as-install/domains/domain-name/autodeploy directory.

To Deploy the Sample Application Automatically
Before You Begin

The sample application must be available before you start this task. To download the sample, see Obtaining a Sample Application .

  1. Create a directory named as-install/domains/domain-name /autodeploy

    domain-name is the name of the domain for which you want to configure automatic deployment. For this example, use the default domain1 domain:

    as-install/domains/domain1/autodeploy
    
  2. Copy the application WAR file to the as-install/domains/ domain-name/autodeploy directory.

    cp sample-dir/hello.war as-install/domains/domain-name /autodeploy

    Enterprise Server automatically discovers and starts the application.

To Undeploy the Sample Application
  1. Use the cd command to change to the domain's autodeploy directory.

    cd as-install/domains/domain-name /autodeploy

  2. Use the rm command to delete the application.

    rm hello.war

Removing Enterprise Server v3 Prelude Software

Uninstall the Enterprise Server Software after you have completed using this guide, if you no longer want to use the software.

To Remove Enterprise Server Software

Before You Begin

Stop all Enterprise Server processes that are running.

  1. Delete the as-install directory, including all subdirectories.
  2. Examine the contents of your directories to verify that the Enterprise Server v3 Prelude software is removed.

For More Information

This section provides links to commonly used resources in the following areas:

Many other add-on components for Enterprise Server v3 Prelude are available through Update Tool.

Communities

Development Tools

Scripting

Product Documentation

Tutorials

User Forum


Company Info   |   Contact   |   Copyright 2008 Sun Microsystems