C H A P T E R  7

Using the Sun ONE Application Server 7 With the Sun ONE Studio 4 IDE

Once you have successfully installed the IDE and validated the installation by creating a simple J2EE application (as described in ), you can connect the IDE to the Sun ONE Application Server 7. Once connected, you can use the Sun ONE Application Server 7 to deploy applications that you create with the IDE.


System Requirements

You can use the Sun ONE Application Server 7 from the following platforms:

The Microsoft Windows NT SP6 systems platform and the Sun Linux 5.0 and Red Hat Linux 7.2 operating environments are not supported for use with the Sun ONE Application Server 7.


Installing the Application Server

Before you can configure the IDE to use the Sun ONE Application Server 7, the application server must be installed, either locally (on the same system as the IDE) or remotely (on a separate machine). To download the application server, go to http://sun.com/software/products/appsrvr/appsrvr_download.html. Installation information is available from http://docs.sun.com/source/816-7145-10/.

You can select either evaluation or non-evaluation installation. The type you choose affects how you obtain the required plug-in module to connect to the IDE.


Connecting the IDE to the Application Server

Two items are required for the IDE to connect to the Sun ONE Application Server 7 software for the purposes of deployment:

The plug-in consists of a series of JAR and configuration files that are installed in either the IDE's home directory or your IDE user directory. You can install this either from the IDE's Update Center or by the Sun ONE Application Server 7 non-evaluation installer.



Note - The Sun ONE Application Server 7 Plug-in module uses the APIs from J2SE version 1.4.0_02. If the application server is started with other versions of the software (for instance, J2SE v.1.3.1), you cannot install the Sun ONE Application Server 7 Plug-in module.



The administrative client libraries consist of JAR files that support the server's administrator. These files must be available on the same machine as the IDE. These files are installed with the Sun ONE Application Server 7 distribution. If the IDE is on a different machine from the application server, these files can also be installed on the IDE's machine by the Sun ONE Application Server 7 non-evaluation installer.

TABLE 7-1 shows the installation options for the plug-in module and administrative client libraries, given the location of the IDE and application server installations. This chapter describes how to install the plug-in module from the Update Center. See the Sun ONE Application Server 7 tutorial (at http://docs.sun.com/source/816-7146-10/) for other options.

TABLE 7-1 Sun ONE Application Server 7 Plug-in Module Installation Options

Location of IDE and Application Server

Location of Admin Client Files

Installation Steps

On same machine

In application server distribution (on same machine as the IDE)

  • Install plug-in module from the Update Center

On separate machines

In application server distribution (on separate machine from the IDE)

Either of these:

  • Install plug-in module with non-evaluation installer
  • Install application server on client machine


Installing and Configuring the Application Server Plug-in Module in the IDE

Download the Sun ONE Application Server 7 plug-in module from the IDE's Update Center. See Updating Modules With the Update Center for information on how to download Sun ONE Studio 4 modules. In the Update Center wizard, expand the Enterprise Edition Modules node to locate the Sun ONE Application Server 7 plug-in module.

After you have installed the application server's plug-in module, you must make the Sun ONE Application Server 7 the default application server, as follows:

1. `In the Sun ONE Studio 4 IDE, click the Explorer's Runtime tab.

2. Expand the Server Registry node and its Installed Servers subnode.

3. Right-click the Sun ONE Application Server 7 node and choose Properties.

The Properties window appears for this node.

4. Locate the Sun ONE App Server Home property and click its ellipsis button.

A file browser window appears.

5. Use the browser to select the installation directory of the Sun ONE Application Server 7.

For example, c:\Sun\AppServer7

6. Click OK to close the file browser and close the Properties window.

7. Right-click the Sun ONE Application Server 7 node again and choose Add Admin Server from the contextual menu.

The Add Admin Server dialog box appears.

8. Type the host name in the Admin Server Host field.

If the application server is on the same machine as the IDE, type localhost. If the server is remote, type the host name of the remote machine.

9. Type your admin port number in the Admin Server Port field, your server user name in the User Name field, and your server password in the User Password field.

During the installation of the Sun ONE Application Server, the following values were suggested for these fields:

If you did not use these defaults, specify the values that you did use. If you don't know the values to use, consult the Getting Started with Sun ONE Application Server 7 at http://docs.sun.com/source/816-7146-10 for instructions on where to look for this information.

10. Click OK to close the dialog box.

This action creates a node labeled hostname:admin-server-port. This node represents the admin server. When you issue commands with this node, the admin server executes them. This action also creates an instance of the application server and a node that represents it. The node is a subnode of the Admin Server node, labeled server1(hostname:admin-server-port).

11. Expand the Sun ONE Application Server 7 node and its new hostname:admin-server-port subnode.

12. Right-click the server1(hostname:admin-server-port) instance node and choose Set As Default.

You are now able to use the Sun ONE Application Server 7 application to deploy your applications.