twitter
    !! Tell us what you want to Learn / Know !!

Instance / Managed Server


A GlassFish Server instance is a single Virtual Machine for the Java platform (Java Virtual Machine or JVM machine) on a single node in which GlassFish Server is running.  A node defines   the host where the GlassFish Server instance resides. The JVM machine must be compatible with the Java Platform, Enterprise Edition (Java EE).
There are three types of instances in GlassFish v3

Standalone Instance
A standalone instance does not share its configuration with any other instances or clusters. A standalone Instance is created if either of the following conditions is met:
  • No configuration or cluster is specified in the command to create the instance.
  • A configuration that is not referenced by any other instances or clusters is specified in the command tocreate the instance.
When no configuration or cluster is specified, a copy of thedefault-config configuration is created for the instance. The name of this configuration is instance-name-config, where instance-name represents the name of an unclusteredserver instance.

Shared Instance
                    A shared instance shares its configuration with otherinstances or clusters. A shared instance is created if a configuration that is referenced by other instances or clusters isspecified in the command to create the instance.

Clustered Instance
                   A clustered instance inherits its configuration fromthe cluster to which the instance    belongs and shares its configuration with other instances in the cluster. A clustered instance is created if a cluster is specified in the command to create the instance.
                   Any instance that is not part of a cluster is considered an  unclustered  server  instance. Therefore, standalone   instances   and   shared   instances   are  unclustered server instances.


Creating an Instance:

Through asadmin:

create-instance
          The create-instance subcommand creates a GlassFish server instance. This subcommand requires the Distributed Component Object Model (DCOM) remote protocol or secure shell (SSH) to be configured.
           DCOM or SSH is not required if the instance is to reside on a node of type CONFIG that represents the local host. A node of type of CONFIG is not enabled for remote communication over DCOM or SSH.

Syntax:
asadmin>create-instance   --node   NodeName   --port=4848  InstanceName


create-local-instance
             The create-local-instance subcommand creates a GlassFish server instance on the node that represents the host where the subcommand is run. This subcommand does not require the Distributed Component Object Model (DCOM) remote protocol or secure shell (SSH) to be configured.
You must run this subcommand from the host that is represented by the node where the instance is to reside. To contact the domain administration server (DAS), this subcommand requires the name of the host where the DAS is running. If a nondefault port is used for administration, this subcommand also requires the port number. If you are adding the first instance to a node, you must provide this information to the –host option and the –port option of the asadmin utility. For the second and later instances, this information is obtained from the DAS properties of the node.

Through asadmin:

asadmin>create-local-instance   --node   NodeName   --portbase  4848  InstanceName



Through Admin Console:



Click on Standalone Instances and click new.

Starting an Instance:
**Before starting instance make sure the node is in running state.

Through asadmin:
       
 asadmin>start-instance  InstanceName --port  4848


Through Admin Console:


Click on the instance name and click start.



0 comments:

Post a Comment