Configuring and Starting the GlassFish Application Server


Test Drive This Tutorial: This "mini-tutorial" is planned for NetBeans 6.0 FCS Release. The idea behind this tutorial is to isolate basic set-up instructions that are shared by many tutorials. These instructions can then be maintained in a single space. Other NetBeans tutorials will reference this tutorial in their basic set-up instructions. The user then will get the same set-up instructions throughout their tutorial experience.

Comments on this tutorial are welcome. Either send them to me, Vince Genovese, directly. Or post comments to Vince's Blog.

[Return to Vince's Blog]


Many SOA Pack tutorials require that the GlassFish Application Server provided with NetBeans 6.0 Milestone 10 be properly configured and started. This tutorial provides a procedure for starting and configuring the GlassFish Application Server.

Expected duration: 15 minutes

Tutorial Requirements


Prerequisites

This tutorial assumes that you have some basic knowledge of the following technologies:

  • The NetBeans IDE
  • The GlassFish Application Server

Software Needed for This Tutorial

Before you begin, install the following software on your computer: NetBeans IDE 6.0 Milestone 10 with SOA Pack and GlassFish V2, both of which are included in the Full download option available from NetBeans IDE 6.0 Milestone 10 Download.

top

Overview


Before you can run many of the tutorials provided with NetBeans documentation, the GlassFish Application Server must be configured correctly and running. This tutorial describes how to configure and start the GlassFish Application Server within the NetBeans 6.0 IDE.

In most cases, you will be using the default version of the GlassFish Application Server provided with NetBeans. However, you can configure the NetBeans IDE to use an alternate version of the GlassFish Application Server. This tutorial contains a section that describes configuring an alternate version of the GlassFish Application Server.

Note: In the following procedures, GlassFish Application Server node refers to the node that represents the GlassFish V2 installation of the application server. GlassFish V2 Application Server is equivalent to the Sun Java System Application Server, Version 9.1.

Starting the GlassFish Application Server

This procedure assumes you have either installed the default GlassFish Application Server when you installed NetBeans 6.0, or you have configured an application server, as described in the section Configuring the GlassFish Application Server.

To start the GlassFish Application Server:

  1. In the NetBeans IDE, if the Services window is not visible, choose Window > Services.
  2. In the Services window, expand the Servers node.

    The Servers node should contain a GlassFish Application Server subnode. If a GlassFish Application Server node does not appear, go to the section Configuring the GlassFish Application Server.


    Services Window with GlassFish Application Server
    If a green arrow badge appears on the GlassFish Application Server node, the server is running. You are finished with this tutorial.

    SGreen Badge Indicates Application Server is Running

    If a green arrow badge does not appear, proceed to next step of this procedure to start the application server.
  3. To start the application server, right-click the GlassFish Application Server node and select Start.

    The Output window displays logging information about the application startup. If the Output window is not visible, choose Window > Output > Output

    When the message Application server startup complete. appears in the Output window, the application server is running.

    If you had previously deployed applications to the application server, the Output window will display additional messages as those applications are started by the application server.

Configuring the GlassFish Application Server

The full NetBeans 6.0 download for Milestone 10 includes the GlassFish Application Server. When you install NetBeans 6.0, you also install the GlassFish Application Server.

However, you might want to use a different version of the application server than the one provided with NetBeans 6.0. For example, you might want to download and install a more current version of the GlassFish V2 application server from the GlassFish Community site.

The following procedure shows how to configure the NetBeans 6.0 IDE to use an alternate version of the GlassFish V2 Application Server. It assumes that you have downloaded and installed the alternate version of the application server.

To configure the NetBeans IDE to use an alternate version of the GlassFish V2 Application Server:

  1. In the NetBeans IDE, if the Services window is not visible, choose Services > Runtime.
  2. In the Runtime window, right-click the Servers node and choose Add Server from the pop-up menu.

    The Add Server Instance dialog box opens.
  3. In the Choose Server page, from the Server drop-down list, select GlassFish V2.
  4. (Optional) In the Name field, change the default name for the server.

    The IDE uses this name to identify the server.
  5. Click Next.

    The Platform Folder Location page opens.
  6. In the Platform Location field, use the Browse button to navigate to and select the installation location of the application server.

    If you installed the GlassFish application server in the default location, then use Table 1 as a guide for locating the installation. Otherwise, navigate to the location where you installed GlassFish V2 Application Server.

    Table 1: Default Application Server Installation Directory

    Platform Installing As... SOA Installation Tools Bundle Installation
    Solaris OS 
    Linux
    root /opt/SUNWappserver /opt/SDK
    Solaris OS
    Linux
    user ~/SUNWappserver ~/SDK
    Mac OS X N/A ~/SUNWappserver ~/SDK
    Windows N/A C:\Sun\AppServer C:\Sun\SDK
  7. Select the Register Local Default Domain radio button and click Next.
  8. Enter the user name and password for the domain's administrator.

    If you accepted the default values during the installation, the user name is admin and the password is adminadmin.
  9. Click Finish.

top


[Return to Vince's Blog]