Sun Glassfish Comm Server
Sun Glassfish Comm Server
Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is described in this document. In particular, and without
limitation, these intellectual property rights may include one or more U.S. patents or pending patent applications in the U.S. and in other countries.
U.S. Government Rights – Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions
of the FAR and its supplements.
This distribution may include materials developed by third parties.
Parts of the product may be derived from Berkeley BSD systems, licensed from the University of California. UNIX is a registered trademark in the U.S. and other
countries, exclusively licensed through X/Open Company, Ltd.
Sun, Sun Microsystems, the Sun logo, the Solaris logo, the Java Coffee Cup logo, docs.sun.com, Java, and Solaris are trademarks or registered trademarks of Sun
Microsystems, Inc. or its subsidiaries in the U.S. and other countries. All SPARC trademarks are used under license and are trademarks or registered trademarks of
SPARC International, Inc. in the U.S. and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc.
The OPEN LOOK and SunTM Graphical User Interface was developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges the pioneering efforts
of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to
the Xerox Graphical User Interface, which license also covers Sun's licensees who implement OPEN LOOK GUIs and otherwise comply with Sun's written license
agreements.
Products covered by and information contained in this publication are controlled by U.S. Export Control laws and may be subject to the export or import laws in
other countries. Nuclear, missile, chemical or biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export
or reexport to countries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to, the denied persons and specially
designated nationals lists is strictly prohibited.
DOCUMENTATION IS PROVIDED “AS IS” AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO
THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.
Copyright 2009 Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, CA 95054 U.S.A. Tous droits réservés.
Sun Microsystems, Inc. détient les droits de propriété intellectuelle relatifs à la technologie incorporée dans le produit qui est décrit dans ce document. En particulier,
et ce sans limitation, ces droits de propriété intellectuelle peuvent inclure un ou plusieurs brevets américains ou des applications de brevet en attente aux Etats-Unis
et dans d'autres pays.
Cette distribution peut comprendre des composants développés par des tierces personnes.
Certaines composants de ce produit peuvent être dérivées du logiciel Berkeley BSD, licenciés par l'Université de Californie. UNIX est une marque déposée aux
Etats-Unis et dans d'autres pays; elle est licenciée exclusivement par X/Open Company, Ltd.
Sun, Sun Microsystems, le logo Sun, le logo Solaris, le logo Java Coffee Cup, docs.sun.com, Java et Solaris sont des marques de fabrique ou des marques déposées de
Sun Microsystems, Inc., ou ses filiales, aux Etats-Unis et dans d'autres pays. Toutes les marques SPARC sont utilisées sous licence et sont des marques de fabrique ou
des marques déposées de SPARC International, Inc. aux Etats-Unis et dans d'autres pays. Les produits portant les marques SPARC sont basés sur une architecture
développée par Sun Microsystems, Inc.
L'interface d'utilisation graphique OPEN LOOK et Sun a été développée par Sun Microsystems, Inc. pour ses utilisateurs et licenciés. Sun reconnaît les efforts de
pionniers de Xerox pour la recherche et le développement du concept des interfaces d'utilisation visuelle ou graphique pour l'industrie de l'informatique. Sun détient
une licence non exclusive de Xerox sur l'interface d'utilisation graphique Xerox, cette licence couvrant également les licenciés de Sun qui mettent en place l'interface
d'utilisation graphique OPEN LOOK et qui, en outre, se conforment aux licences écrites de Sun.
Les produits qui font l'objet de cette publication et les informations qu'il contient sont régis par la legislation américaine en matière de contrôle des exportations et
peuvent être soumis au droit d'autres pays dans le domaine des exportations et importations. Les utilisations finales, ou utilisateurs finaux, pour des armes nucléaires,
des missiles, des armes chimiques ou biologiques ou pour le nucléaire maritime, directement ou indirectement, sont strictement interdites. Les exportations ou
réexportations vers des pays sous embargo des Etats-Unis, ou vers des entités figurant sur les listes d'exclusion d'exportation américaines, y compris, mais de manière
non exclusive, la liste de personnes qui font objet d'un ordre de ne pas participer, d'une façon directe ou indirecte, aux exportations des produits ou des services qui
sont régis par la legislation américaine en matière de contrôle des exportations et la liste de ressortissants spécifiquement designés, sont rigoureusement interdites.
LA DOCUMENTATION EST FOURNIE "EN L'ETAT" ET TOUTES AUTRES CONDITIONS, DECLARATIONS ET GARANTIES EXPRESSES OU TACITES
SONT FORMELLEMENT EXCLUES, DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y COMPRIS NOTAMMENT TOUTE GARANTIE
IMPLICITE RELATIVE A LA QUALITE MARCHANDE, A L'APTITUDE A UNE UTILISATION PARTICULIERE OU A L'ABSENCE DE CONTREFACON.
091026@22749
Contents
Preface .....................................................................................................................................................5
3
Contents
4 Sun GlassFish Communications Server 2.0 Quick Start Guide • September 2009
Preface
This Quick Start Guide provides basic procedures to start the server, deploy an application, and
set up load balancing and failover.
This preface contains information about and conventions for the entire Sun GlassFishTM
Communications Server documentation set.
Documentation Center Communications Server documentation topics organized by task and subject.
Release Notes Late-breaking information about the software and the documentation. Includes a
comprehensive, table-based summary of the supported hardware, operating system, JavaTM
Development Kit (JDKTM), and database drivers.
Quick Start Guide How to get started with the Communications Server product.
Application Deployment Guide Deployment of applications and application components to the Communications Server.
Includes information about deployment descriptors.
Developer’s Guide Creating and implementing Java Platform, Enterprise Edition (Java EE platform) applications
intended to run on the Communications Server that follow the open Java standards model for
Java EE components and APIs. Includes information about developer tools, security,
debugging, and creating lifecycle modules.
Java EE 5 Tutorial Using Java EE 5 platform technologies and APIs to develop Java EE applications.
Java WSIT Tutorial Developing web applications using the Web Service Interoperability Technologies (WSIT).
Describes how, when, and why to use the WSIT technologies and the features and options
that each technology supports.
Administration Guide System administration for the Communications Server, including configuration, monitoring,
security, resource management, and web services management.
5
Preface
High Availability Administration Setting up clusters, working with node agents, and using load balancers.
Guide
Reference Manual Utility commands available with the Communications Server; written in man page style.
Includes the asadmin command line interface.
as-install Represents the base installation directory for SolarisTM and Linux installations, non-root user:
Communications Server.
user’s-home-directory/SUNWappserver
Solaris and Linux installations, root user:
/opt/SUNWappserver
Windows, all installations:
SystemDrive:\Sun\AppServer
6 Sun GlassFish Communications Server 2.0 Quick Start Guide • September 2009
Preface
Typographic Conventions
The following table describes the typographic changes that are used in this book.
AaBbCc123 The names of commands, files, and Edit your .login file.
directories, and onscreen computer
Use ls -a to list all files.
output
machine_name% you have mail.
AaBbCc123 A placeholder to be replaced with a real The command to remove a file is rm filename.
name or value
AaBbCc123 Book titles, new terms, and terms to be Read Chapter 6 in the User's Guide.
emphasized (note that some emphasized
A cache is a copy that is stored locally.
items appear bold online)
Do not save the file.
Symbol Conventions
The following table explains symbols that might be used in this book.
{|} Contains a set of choices for a -d {y|n} The -d option requires that you use
required command option. either the y argument or the n
argument.
- Joins simultaneous multiple Control-A Press the Control key while you press
keystrokes. the A key.
+ Joins consecutive multiple Ctrl+A+N Press the Control key, release it, and
keystrokes. then press the subsequent keys.
7
Preface
→ Indicates menu item File → New → Templates From the File menu, choose New.
selection in a graphical user From the New submenu, choose
interface. Templates.
Note – Sun is not responsible for the availability of third-party web sites mentioned in this
document. Sun does not endorse and is not responsible or liable for any content, advertising,
products, or other materials that are available on or through such sites or resources. Sun will not
be responsible or liable for any actual or alleged damage or loss caused or alleged to be caused by
or in connection with use of or reliance on any such content, goods, or services that are available
on or through such sites or resources.
To share your comments, go to http://docs.sun.com and click Feedback. In the online form,
provide the document title and part number. The part number is a seven-digit or nine-digit
number that can be found on the title page of the book or at the top of the document.
8 Sun GlassFish Communications Server 2.0 Quick Start Guide • September 2009
1
C H A P T E R 1
Welcome to the Quick Start Guide. This guide provides a set of sample procedures that you can
use to get started with the Communications Server.
Before using the procedures in this document you must have already installed the GlassFish
Communications Server software.
Getting Started
This topic provides instructions for the following basic tasks: starting the Domain
Administration Server (DAS), logging into the Admin Console, examining the log files, and
starting the node agent. The steps are presented in the order that you should complete them.
■ “To Start the Domain on Solaris and Linux” on page 10
■ “To Start the Domain on Windows” on page 10
■ “To Log On to the Admin Console” on page 11
■ “To View the Domain Administration Server Log File” on page 13
■ “To Start the Node Agent” on page 14
■ “To Add Cluster Support to a Domain” on page 15
■ “To Start the Bundled Java DB Server” on page 16
9
Getting Started
■ If a PATH variable is not present, click New. In Variable Name, type PATH. In Variable Value,
type the path to the server’s bin directory: as-install\bin. Click OK to commit the change.
10 Sun GlassFish Communications Server 2.0 Quick Start Guide • September 2009
Getting Started
6 Add a new environment variable AS_ADMIN_USER and set it to the Administrative User Name
that you assigned during installation.
7 Click OK to commit the change and close the remaining open windows.
8 Start the Communications Server by clicking the Start Admin Server option within the Programs
menu.
9 When a command prompt window opens to prompt you for the user name and the admin
password, enter the passwords that you provided during installation.
When you are prompted for the user, admin password, and the master password, enter your
user name and the passwords that you provided during installation. The default admin user
name is admin and the password is adminadmin. The default master password is changeit.
Note – If you do not find the Start Admin Server option in your menu, open the Windows
Command Prompt and type the following command: asadmin start-domain domain1
When the startup process has completed, you see an additional message:
Domain domain1 started.
Press any key to continue ...
Each domain has a corresponding profile: cluster, or developer. domain1 is created with the
default profile, which is defined in the AS_ADMIN_PROFILE variable defined in the
asadminenv.conf file. For more information on profiles see the “Usage Profiles” in Sun
GlassFish Communications Server 2.0 Administration Guide. If domain1 was created with
developer profile, when you log in to the Admin Console, you cannot use features such as
clustering and node agents. To use clusters and server instances, use the create-domain
command to create a domain with cluster profile. For information on creating domains, type
asadmin create-domain --help or see create-domain(1).
For further information about using the Admin Console, consult the online help or the Sun
GlassFish Communications Server 2.0 Administration Guide.
Note – If a popup window appears with a message such as Website Certified by an Unknown
Authority, click OK.
This message appears because your browser does not recognize the self-signed certificate that
the Domain Administration Server uses to service the Admin Console over the secure
transmission protocol.
2 When the Log in window appears, enter the admin user name and password.
3 Click Login.
In the left pane, select what you want to manage from the tree provided. In the right pane,
various administrative tasks are listed under the Common Tasks heading.
12 Sun GlassFish Communications Server 2.0 Quick Start Guide • September 2009
Getting Started
1 From the Common Tasks list in the right pane, click Search Log Files to launch a new browser
window for Log Viewer.
2 In the Log Viewer window, select“server”from the Instance Name drop-down list and click
Search.
The Domain Administration Server’s recent log file entries are displayed.
3 Scan the messages and look for any WARNING or SEVERE messages indicating that problems were
encountered during server startup.
You can close Log Viewer at any time. After you create clusters and deploy applications,
examine log files if any of the operations failed. Use Log Viewer to view the log files of any
running Communications Server instance in the domain.
Note – You can use node agents only on domains with the cluster profile . If you are running
only a developer domain, you need to create a domain with cluster profile before you can create
and use node agents. For information on creating domains, type asadmin create-domain
--help or see the create-domain(1) man page.
One node agent is needed on a machine for each administrative domain that the machine
belongs to. A default node agent called hostname may be created during installation. If not,
create a node agent, using the create-node-agent(1) command.
Note – Ensure that the Domain Administration Server is running before you start the node
agent. Check the server.log file of a cluster instance to identify problems related to starting
node agents or cluster instances.
If you have problems while starting a node agent or a cluster on Windows, see the Sun GlassFish
Communications Server 2.0 Release Notes for possible solutions to the problem.
After the node agent has been started once, you can view it in the Admin Console.
14 Sun GlassFish Communications Server 2.0 Quick Start Guide • September 2009
Getting Started
Next Steps In this section you started the Domain Administration Server and confirmed that it is running.
You also logged in to the Admin Console and used the Log Viewer. You started the node agent.
You can stop the Quick Start trail here if you do not wish to continue, or you can go on to the
next section.
1 Log on to the Admin Console. For instructions, see “To Log On to the Admin Console”on page 11.
4 The Add Cluster Support page appears. Review the information on this page and click OK.
5 In the Restart Required Page, click the Stop Instance button to stop the domain.
6 Log in to the machine where the domain is installed and run the following command:
as-install/bin/asadmin list-domains. Verify that the domain was stopped.
1 Make sure that you are logged in as the user that installed the database.
Administration Tools
To enable administrators to manage server instances and clusters running on multiple hosts,
Communications Server provides these tools:
■ The Admin Console, a browser-based graphical user interface (GUI). You can launch the
Admin console by opening http:// hostname:4848 in your browser.
■ Command-line tools, such as the asadmin utility. See Table 1–1 for the complete list of
command-line tools. The asadmin utility is at as-install/bin.
■ Programmatic Java Management Extensions (JMXTM) APIs
These tools connect to a server called the Domain Administration Server, a specially designated
instance that intermediates in all administrative tasks. The Domain Administration Server
(DAS) provides a single secure interface for validating and executing administrative commands
regardless of which interface is used.
16 Sun GlassFish Communications Server 2.0 Quick Start Guide • September 2009
Administration Tools
appclient Launches the Application Client Container and invokes the client
application packaged in the application Java archive (JAR) file.
asant Launches the Jakarta Ant tool, so that you can automate repetitive
development and deployment tasks.
asapt Compiles Java sources with Java EE annotations. The tool automatically
invokes the wsimport command.
capture-schema Extracts schema information from a database and produces a schema file
that the server can use for Container Managed Persistence (CMP).
package-appclient Packages the application client container libraries and JAR files.
schemagen Creates a schema file for each namespace referenced in your Java classes.
wscompile Takes the service definition interface and generates the client stubs or
server-side skeletons for JAX-RPC; or generates a Web Services Description
Language (WSDL) description for the provided interface.
wsgen Reads a web service endpoint class and generates all the required artifacts
for web service deployment and invocation.
xjc Transforms, or binds, a source XML schema to a set of JAXB content classes
in the Java programming language.
Note –
■ To run these command-line tools on Windows, ensure that you have an environment
variable called PATH that points to the as-install/bin/ directory.
■ You can run the asadmin subcommands by prefixing asadmin with every sub command or
by entering the asadmin prompt (type asadmin and hit Return) in the as-install/bin/
directory.
Where to Go Next
The next steps of the Quick Start Guide are available in the following chapters.
■ Chapter 2, “Setting Up a Cluster”
Steps for creating a sample cluster. Skip to the next chapter if you are running a domain with
developer profile.
■ Chapter 3, “Deploying an Application”
Steps for deploying a sample web application. If you are using a domain with cluster
capabilities, you can perform the steps for deploying an enterprise application to a cluster.
Other resources for learning and using Communications Server are available. They include:
■ Product details at as-install/docs/about.html.
■ Sample applications at as-install/samples
■ Sample SIP applications at as-install/samples/sipservlet
■ Sun GlassFish Communications Server 2.0 Release Notes
■ Sun GlassFish Communications Server 2.0 Reference Manual (man pages)
■ Sun GlassFish Communications Server 2.0 Application Deployment Guide
■ The Java EE 5 Tutorial
■ Java BluePrints (http://java.sun.com/blueprints) guidelines for the Enterprise
18 Sun GlassFish Communications Server 2.0 Quick Start Guide • September 2009
2
C H A P T E R 2
Setting Up a Cluster
This chapter describes how to create and set up clusters. A cluster is a group of server instances
(typically on multiple hosts) that share the same configurations, resources, and applications. A
cluster facilitates load balancing across server instances and high availability through failover.
You can create clusters spanning multiple machines and manage them with the help of the node
agent process on each machine.
This chapter assumes that you are running a domain with cluster profile. This chapter has the
following sections:
■ “ Setting Up a Cluster with Converged Load Balancer ” on page 19
■ “Creating a Cluster that Spans Multiple Machines” on page 22
■ “Viewing Ports for Clustered Server Instances” on page 26
Before You Begin It is assumed that you have already started the node agent. When you specify instances during
cluster creation, associate the instance with a running node agent for the machine on which you
want the instance to run. If the node agent is not running, the instance will not start. Node agent
and instance names must be unique across clusters that are created in a domain.
19
Setting Up a Cluster with Converged Load Balancer
1 Log in to the Administration Console at http:// hostname:portnumber if you have not already
done so.
Replace the hostname variable with the name of the system that the Domain Administration
Server is running on. Replace portnumber with the port number of the cluster domain, domain1.
Note – In the General tab on the right hand pane, ensure that the Heartbeat Enabled checkbox is
selected. You need GMS service to be running to be able to use the converged load balancer.
4 On the right pane, click the Instances tab. Click the New button to create two entries to specify
two instances for the cluster.
6 Type instance2. In the Node Agent field, nodeagent1 is selected by default. Click Save.
Instead of steps 4,5, and 6 you can use the following asadmin commands:
■ asadmin create-instance --user admin --passwordfile adminpassword.txt --host
hostname -port 4848 --cluster default-cluster --nodeagent nodeagent1
--systemproperties
"JMX_SYSTEM_CONNECTOR_PORT=8687:IIOP_LISTENER_PORT=3330:IIOP_SSL_LISTENER_PORT=4440:IIOP_SSL_
MUTUALAUTH_PORT=5550:HTTP_LISTENER_PORT=1110:HTTP_SSL_LISTENER_PORT=2220"
instance1
■ asadmin create-instance --user admin --passwordfile adminpassword.txt --host
hostname -port 4848 --cluster default-cluster --nodeagent nodeagent1
--systemproperties
"JMX_SYSTEM_CONNECTOR_PORT=8688:IIOP_LISTENER_PORT=3331:IIOP_SSL_LISTENER_PORT=4441:IIOP_SSL_
MUTUALAUTH_PORT=5551:HTTP_LISTENER_PORT=1111:HTTP_SSL_LISTENER_PORT=2221"
instance2
7 Click Save.
20 Sun GlassFish Communications Server 2.0 Quick Start Guide • September 2009
Setting Up a Cluster with Converged Load Balancer
9 From the Converged Load Balancers node in the Admin Console, choose cluster-lb, and click
the Targets tab. Click the Edit Load Balancer Details link. In the Edit Load Balancer Details page,
click to enable the Automatically Apply Changes option and click Save. By default, this option is
disabled.
You can also use the asadmin set command to set this option to true. For more details, see
Chapter 2, “Configuring Converged Load Balancing,” in Sun GlassFish Communications
Server 2.0 High Availability Administration Guide.
■ Click the General tab and click the Start Cluster button.
■ Start the cluster and its instances by running the following command:
asadmin start-cluster --user admin --passwordfile adminpassword.txt --host
hostname --port 4848 default-cluster
The two instances are started by default when you start the cluster. default-cluster is
associated with a converged load balancer called cluster-lb, which is created by default by the
Communications Server installation. This figure shows default-cluster and two instances
running on this cluster.
Before You Begin You must have already installed Communications Server on both machines.
Note – You need to provide the DAS machine name in the --host option.
6 On the left pane, click the Clusters tab and click New.
22 Sun GlassFish Communications Server 2.0 Quick Start Guide • September 2009
Creating a Cluster that Spans Multiple Machines
9 Type the instance name as instance3 and choose node agent, nodeagent3.
nodeagent3 was created on the machine called sr115 in step 2 of this procedure.
10 Type the instance name as instance4 and choose node agent, nodeagent2.
nodeagent2 was created on the DAS machine called schumi in step 1 of this procedure.
11 Click OK.
The cluster gets created.
12 To create and enable a converged load balancer for this cluster, use the following command:
asadmin create-converged-lb --user admin --passwordfile pass.txt --configfile
clb.xml --autocommit=true --lbenableallinstances=true --target mycluster
mycluster-lb
13 From the Converged Load Balancers node in the Admin Console, choose cluster-lb, and click
the Targets tab. Click the Edit Load Balancer Details link. In the Edit Load Balancer Details page,
click to enable the Automatically Apply Changes option and click Save. By default, this option is
disabled.
You can also use the asadmin set command to set this option to true. For more details, see
Chapter 2, “Configuring Converged Load Balancing,” in Sun GlassFish Communications
Server 2.0 High Availability Administration Guide.
15 In the right pane, select the checkbox next to mycluster and click the Start Cluster button,
The cluster and the two instances start.
The two instances in mycluster are running on different machines and are controlled by
different node agents. You can view the two node agents and see each instance associated with
it.
24 Sun GlassFish Communications Server 2.0 Quick Start Guide • September 2009
Creating a Cluster that Spans Multiple Machines
If you deploy an application on mycluster, the application is accessible from two machines.
To view the port numbers and optionally override the default values, follow these steps:
1 In the left pane, expand Clusters and click default-cluster to display the General Information
page for clusters.
2 Click the Instances tab to display instance1 and instance2, the instances that you created.
26 Sun GlassFish Communications Server 2.0 Quick Start Guide • September 2009
3
C H A P T E R 3
Deploying an Application
This chapter explains how to deploy an application. If you are running a domain with developer
profile, see “Deploying a Sample Web Application” on page 29. If you are running a domain
with cluster profile, see “Deploying the Sample Enterprise Application to a Cluster” on page 31.
2 Start the Java DB database, as explained in the section, “To Start the Bundled Java DB Server”on
page 16.
4 Click Deploy.
5 Select the Local Packaged File or Directory that is Accessible to Application Server option.
27
Deploying a Sample SIP Module
7 Choose CallSetup.sar.
8 If you are running a domain with clustering capabilities, you need to specify a target. In the
Targets section of the page, select server from the Available list, and click Add to move it to the
Selected list
9 Click OK.
The application appears in the Converged SIP Modules list.
10 To verify that it was deployed properly, point your browser to the following location:
http://hostname:HTTPport/CallSetup/
The default HTTP port is 8080.
28 Sun GlassFish Communications Server 2.0 Quick Start Guide • September 2009
Deploying a Sample Web Application
Copying to a domain’s autodeploy directory lets you put a pre-packaged application into use
immediately, with minimal effort.
Tip – On Windows, you can create a shortcut to the autodeploy directory on your desktop, and
then drag and drop the hello.war file onto the shortcut.
When the server has finished deploying the application, it creates a file named
hello.war_deployed in the autodeploy directory. Depending on the speed of your system, the
process can take a few seconds. Until that file appears, a 404-File Not Found error occurs when
you try to visit the application page.
4 Click Deploy.
5 You can use the Hello application bundled with the Communications Server or you upload the
sample you have downloaded from https://glasfish.dev.java.net/downloads/
quickstart/hello.war. Do one of the following:
■ Select the option called Local packaged file or directory that is accessible to Application
Server and click Browse Files. Navigate to the as-install/samples/quickstart directory and
select hello.war.
6 If you have downloaded the Hello application, click Browse in the Packaged File to Upload text
box. Navigate to the directory to which you have downloaded the application.
7 Click OK.
The application appears in the Web Applications list.
8 To verify that it was deployed properly, in the Web Applications page, select the Hello
application and click Launch.
30 Sun GlassFish Communications Server 2.0 Quick Start Guide • September 2009
Deploying the Sample Enterprise Application to a Cluster
2 Click Common Tasks on the left pane to go to the Common Tasks page, if you are not there
already.
3 On the right pane, under Common Tasks, click Deploy Enterprise Application (.ear).
4 Select the radio button to the left of the Local packaged file or directory that is accessible from
the Application Server option and then click the Choose File... button. Navigate to
as-install/samples/quickstart/clusterjsp/clusterjsp.ear.
If you are accessing Communications Server remotely, and if the sample application is
accessible from your client machine choose the Packaged file to be uploaded to the server
option and click Browse.
5 Click the Availability enabled check box to make your application highly available.
It is recommended that you set the heap size to a larger value, if you have available memory in
your system. For example, <jvm-options>-Xmx1000m</jvm-options>
6 In the Targets section of the page, select mycluster from the Available list, and click Add to
move it to the Selected list.
7 Click OK.
The clusterjsp application is now deployed to default-cluster. Before you launch this
application, you need to start the instances in the cluster.
Note – Ensure that you have enabled cookies in your browser before you deploy this application.
clusterjsp is a sample application. Please use with caution in a production environment.
32 Sun GlassFish Communications Server 2.0 Quick Start Guide • September 2009
Deploying the Sample Enterprise Application to a Cluster
4 Add some session data and click the Add to Session button.
5 Repeat this procedure for instance instance3 by typing this URL in your browser:
http://hostname :38081/clusterjsp