Exit Print View

Sun GlassFish Enterprise Server v3 Administration Guide

  This Document Entire Library
Print View

Document Information

Preface

1.  Overview of Enterprise Server Administration

Default Settings and Locations

Configuration Tasks

Administration Tools

Instructions for Administering Enterprise Server

Part I Runtime Administration

2.  General Administration

3.  Administering Domains

4.  Administering the Virtual Machine for the Java Platform

Administering JVM Options

To Create JVM Options

To List JVM Options

To Delete JVM Options

To Generate a JVM Report

Administering the Profiler

To Create a Profiler

To Delete a Profiler

5.  Administering Thread Pools

6.  Administering Web Applications

7.  Administering the Logging Service

8.  Administering the Monitoring Service

9.  Administering Life Cycle Modules

10.  Extending Enterprise Server

Part II Security Administration

11.  Administering System Security

12.  Administering User Security

13.  Administering Message Security

Part III Resources and Services Administration

14.  Administering Database Connectivity

15.  Administering EIS Connectivity

16.  Administering Internet Connectivity

17.  Administering the Object Request Broker (ORB)

18.  Administering the JavaMail Service

19.  Administering the Java Message Service (JMS)

20.  Administering the Java Naming and Directory Interface (JNDI) Service

21.  Administering Transactions

Part IV Appendixes

A.  Subcommands for the asadmin Utility

Index

Administering JVM Options

The Java Virtual Machine is an interpretive computing engine responsible for running the byte codes in a compiled Java program. The virtual machine translates the Java byte codes into the native instructions of the host machine. Enterprise Server, being a Java process, requires a virtual machine to run and support the Java applications running on it. JVM settings are part of an Enterprise Server configuration.

The following topics are addressed here:

To Create JVM Options

Use the create-jvm-options subcommand in remote mode to create JVM options in the Java configuration or the profiler elements of the domain.xml file. If JVM options are created for a profiler, these options are used to record the settings that initiate the profiler.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Create JVM options by using the create-jvm-options(1) subcommand.

    To create more than one JVM option, use a colon (:) to separate the options. If the JVM option itself contains a colon (:), use the backslash (\) to offset the colon delimiter.

    Information about properties for the subcommand is included in this help page.

  3. To apply your changes, restart Enterprise Server. See To Restart a Domain.

Creating JVM Options

This example sets multiple Java system properties.

asadmin> create-jvm-options -Dunixlocation=/root/example:
-Dvariable=\$HOME:
-Dwindowslocation=d\\:\\\sun\\\appserver:
-Doption1=-value1
created 4 option(s)
Command create-jvm-options executed successfully.
See Also

You can also view the full syntax and options of the subcommand by typing asadmin help create-jvm-options at the command line.

To List JVM Options

Use the list-jvm-options subcommand in remote mode to list the existing JVM options.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. List JVM options by using the list-jvm-options(1) subcommand.

Listing JVM Options

This example lists all JVM options.

asadmin> list-jvm-options
-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf
-XX: LogVMOutput
-XX: UnlockDiagnosticVMOptions
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.
config.serverbeans.AppserverConfigEnvironmentFactory
-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks
-XX:NewRatio=2
-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks
-client
-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.ja
vaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext${path.se
parator}${com.sun.aas.derbyRoot}/lib
-Xmx512m
-XX:LogFile=${com.sun.aas.instanceRoot}/logs/jvm.log
-Djava.endorsed.dirs=${com.sun.aas.installRoot}/lib/endorsed
Command list-jvm-options executed successfully.
See Also

You can also view the full syntax and options of the subcommand by typing asadmin help list-jvm-options at the command line.

To Delete JVM Options

Use the delete-jvm-options subcommand in remote mode to delete JVM options from the Java configuration or profiler elements of the domain.xml file.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. List JVM options by using the list-jvm-options(1) subcommand.

  3. If necessary, notify users that the JVM option is being deleted.

  4. Delete JVM options by using the delete-jvm-options(1) subcommand.

    To remove more than one JVM option, use a colon (:) to separate the options. If the JVM option itself contains a colon, use the backslash (\) to offset the colon delimiter.

  5. To apply your changes, restart Enterprise Server. See To Restart a Domain.

Deleting a JVM Option

This example removes a single JVM option.

asadmin> delete-jvm-options -Dopt1=A
deleted 1 option(s)
Command delete-jvm-options executed successfully.
Deleting Multiple JVM Options

This example removes multiple JVM options.

asadmin> delete-jvm-options -Doption1=-value1:-Dvariable=\$HOME
deleted 2 option(s)
Command delete-jvm-options executed successfully.
See Also

You can also view the full syntax and options of the subcommand by typing asadmin help delete-jvm-options at the command line.

To Generate a JVM Report

Use the generate-jvm-report subcommand in remote mode to generate a JVM report showing the threads (dump of a stack trace), classes, memory, and loggers for a specified domain administration server (DAS). You can generate the following types of reports: summary (default), class, thread, log.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Generate the report by using the generate-jvm-report(1) subcommand.

Generating a JVM Report

This example displays summary information about the threads, classes, and memory.

asadmin> generate-jvm-report --type summary 
Operating System Information:
Name of the Operating System: Windows XP
Binary Architecture name of the Operating System: x86, Version: 5.1
Number of processors available on the Operating System: 2
System load on the available processors for the last minute: NOT_AVAILABLE. 
(Sum of running and queued runnable entities per minute).
.
,
.
user.home = C:\Documents and Settings\Jennifer
user.language = en
user.name = Jennifer
user.timezone = America/New_York
user.variant =
variable = \$HOME
web.home = C:\Preview\v3_Preview_release\distributions\web\target\
glassfish\modules\web
Command generate-jvm-report executed successfully.
See Also

You can also view the full syntax and options of the subcommand by typing asadmin help generate-jvm-report at the command line.