+ All Categories
Home > Documents > Administration Guide GlassFish

Administration Guide GlassFish

Date post: 24-Nov-2015
Category:
Upload: khemnath-chauhan
View: 159 times
Download: 8 times
Share this document with a friend
Description:
This documents guide through the use of glass fish app server
Popular Tags:
386
GlassFish Server Open Source Edition Administration Guide Release 4.0 May 2013 GlassFish Server Open Source Edition 4.0 Administration Guide provides instructions for configuring and administering GlassFish Server Open Source Edition.
Transcript
  • GlassFish Server Open Source EditionAdministration Guide

    Release 4.0

    May 2013GlassFish Server Open Source Edition 4.0 Administration Guide provides instructions for configuring and administering GlassFish Server Open Source Edition.

  • GlassFish Server Open Source Edition Administration Guide, Release 4.0

    Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

    The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

    If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

    U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065.

    This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

    Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

    Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

    This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

  • iii

    Contents

    Preface ............................................................................................................................................................... xxi

    1 Overview of GlassFish Server AdministrationDefault Settings and Locations.............................................................................................................. 1-1Configuration Tasks................................................................................................................................. 1-2

    Initial Configuration Tasks ............................................................................................................... 1-2How Dotted Names Work for Configuration ................................................................................ 1-4Configuration Files ............................................................................................................................ 1-5Impact of Configuration Changes ................................................................................................... 1-6

    Administration Tools ............................................................................................................................... 1-9Administration Console .................................................................................................................... 1-9asadmin Utility................................................................................................................................. 1-10REST Interfaces................................................................................................................................ 1-10Update Tool...................................................................................................................................... 1-10OSGi Module Management Subsystem....................................................................................... 1-11keytool Utility................................................................................................................................. 1-16Java Monitoring and Management Console (JConsole) ............................................................ 1-16

    Instructions for Administering GlassFish Server ........................................................................... 1-16

    Part I Runtime Administration

    2 General AdministrationUsing the asadmin Utility........................................................................................................................ 2-1

    Path to the asadmin Utility................................................................................................................ 2-1asadmin Utility Syntax....................................................................................................................... 2-2To Run an asadmin Utility Subcommand in Single Mode ........................................................... 2-3To Display Help Information for the asadmin Utility or a Subcommand ................................. 2-4To Start a Multimode Session........................................................................................................... 2-4To End a Multimode Session............................................................................................................ 2-5To Run a Set of asadmin Subcommands From a File .................................................................... 2-6To Run asadmin Subcommands in --detach Mode...................................................................... 2-7

    Administering System Properties ......................................................................................................... 2-8To Create System Properties............................................................................................................. 2-8To List System Properties ................................................................................................................. 2-9To Delete a System Property ............................................................................................................ 2-9

  • iv

    Administering Resources..................................................................................................................... 2-10To Add Resources From an XML File .......................................................................................... 2-10

    Listing Various System Elements....................................................................................................... 2-10To Display the GlassFish Server Version..................................................................................... 2-11To List Applications........................................................................................................................ 2-11To List Containers ........................................................................................................................... 2-11To List Modules............................................................................................................................... 2-12To List Subcommands .................................................................................................................... 2-13To List Timers .................................................................................................................................. 2-13To Show Component Status .......................................................................................................... 2-14

    Using REST Interfaces to Administer GlassFish Server ............................................................... 2-14Using REST URLs to Administer GlassFish Server ................................................................... 2-15Using REST Resource Methods to Administer GlassFish Server............................................. 2-18Resources for asadmin Subcommands That Perform Non-CRUD Operations...................... 2-27Securing GlassFish Server REST Interfaces ................................................................................. 2-28Formats for Resource Representation of Configuration Objects.............................................. 2-29Formats for Resource Representation of Monitoring Objects .................................................. 2-37Formats for Resource Representation of Log File Details ......................................................... 2-45Supported Content Types in Requests to REST Resources....................................................... 2-49

    3 Administering DomainsAbout Administering Domains ............................................................................................................. 3-1

    GlassFish Server Instances ................................................................................................................ 3-1Domains for Administering GlassFish Server ............................................................................... 3-2Domain Administration Server (DAS)............................................................................................ 3-2

    Creating, Logging In To, and Deleting a Domain.............................................................................. 3-3To Create a Domain ........................................................................................................................... 3-3To Create a Domain From a Custom Template ............................................................................. 3-4To List Domains ................................................................................................................................. 3-7To Log In to a Domain....................................................................................................................... 3-7To Delete a Domain ........................................................................................................................... 3-9

    Starting and Stopping a Domain........................................................................................................... 3-9To Start a Domain .............................................................................................................................. 3-9To Stop a Domain............................................................................................................................ 3-10To Restart a Domain ....................................................................................................................... 3-11

    Configuring a DAS or a GlassFish Server Instance for Automatic Restart ............................... 3-11To Configure a DAS or an Instance for Automatic Restart on Windows............................... 3-12To Configure a DAS or an Instance for Automatic Restart on Linux...................................... 3-13To Configure a DAS or an Instance for Automatic Restart on Oracle Solaris........................ 3-14To Prevent Service Shutdown When a User Logs Out on Windows ...................................... 3-15

    Backing Up and Restoring a Domain ................................................................................................ 3-16To Back Up a Domain..................................................................................................................... 3-16To Restore a Domain ...................................................................................................................... 3-16To List Domain Backups ................................................................................................................ 3-17

    Re-Creating the Domain Administration Server (DAS)................................................................ 3-18To Migrate the DAS ........................................................................................................................ 3-18

    Additional Domain Tasks.................................................................................................................... 3-19

  • vTo Display Domain Uptime........................................................................................................... 3-19To Switch a Domain to Another Supported Java Version ........................................................ 3-20To Change the Administration Port of a Domain ...................................................................... 3-20

    4 Administering the Virtual Machine for the Java PlatformAdministering JVM Options ................................................................................................................. 4-1

    To Create JVM Options ..................................................................................................................... 4-1To List JVM Options .......................................................................................................................... 4-2To Delete JVM Options ..................................................................................................................... 4-3To Generate a JVM Report ................................................................................................................ 4-3

    Administering the Profiler ..................................................................................................................... 4-4To Create a Profiler ............................................................................................................................ 4-4To Delete a Profiler ............................................................................................................................ 4-5

    5 Administering Thread PoolsAbout Thread Pools ................................................................................................................................. 5-1Configuring Thread Pools ...................................................................................................................... 5-1

    To Create a Thread Pool.................................................................................................................... 5-1To List Thread Pools .......................................................................................................................... 5-2To Update a Thread Pool .................................................................................................................. 5-3To Delete a Thread Pool .................................................................................................................... 5-3

    6 Administering Web ApplicationsInvoking a Servlet by Alternate Means ............................................................................................... 6-1Changing Log Output for a Servlet ...................................................................................................... 6-2Defining Global Features for Web Applications .............................................................................. 6-2

    To Use the default-web.xml File .................................................................................................... 6-3Redirecting a URL .................................................................................................................................... 6-3Administering mod_jk.............................................................................................................................. 6-3

    To Enable mod_jk................................................................................................................................ 6-3To Load Balance Using mod_jk and GlassFish Server .................................................................. 6-5To Enable SSL Between the mod_jk Load Balancer and the Browser......................................... 6-6To Enable SSL Between the mod_jk Load Balancer and GlassFish Server................................. 6-7

    Administering mod_proxy_ajp ............................................................................................................... 6-8To Enable mod_proxy_ajp ................................................................................................................. 6-8To Load Balance Using mod_proxy_ajp and GlassFish Server.................................................... 6-9

    7 Administering the Logging ServiceAbout Logging .......................................................................................................................................... 7-1

    Log Files............................................................................................................................................... 7-1Logger Namespaces........................................................................................................................... 7-4Logging Targets.................................................................................................................................. 7-5Logging Properties............................................................................................................................. 7-5

    Configuring the Logging Service .......................................................................................................... 7-6Changing the Name and Location of Logging Service Files........................................................ 7-6

  • vi

    Setting Log Levels .............................................................................................................................. 7-8Setting the Log File Format............................................................................................................ 7-11Setting Log File Rotation................................................................................................................ 7-14Adding a Custom Logging Handler ............................................................................................ 7-17

    Viewing Log Records............................................................................................................................ 7-18To Collect Log Files into a ZIP Archive ....................................................................................... 7-18

    Listing Loggers....................................................................................................................................... 7-19To List Loggers ................................................................................................................................ 7-19

    8 Administering the Monitoring ServiceAbout Monitoring .................................................................................................................................... 8-1

    How the Monitoring Tree Structure Works ................................................................................... 8-2About Monitoring for Add-on Components.................................................................................. 8-6Tools for Monitoring GlassFish Server ........................................................................................... 8-6

    Configuring Monitoring ......................................................................................................................... 8-7To Enable Monitoring........................................................................................................................ 8-7To Disable Monitoring....................................................................................................................... 8-8

    Viewing Common Monitoring Data..................................................................................................... 8-9To View Common Monitoring Data ............................................................................................... 8-9Common Monitoring Statistics ..................................................................................................... 8-10

    Viewing Comprehensive Monitoring Data...................................................................................... 8-11Guidelines for Using the list and get Subcommands for Monitoring ................................. 8-11To View Comprehensive Monitoring Data ................................................................................. 8-12Comprehensive Monitoring Statistics.......................................................................................... 8-14

    Configuring JConsole to View GlassFish Server Monitoring Data ............................................ 8-31To Connect JConsole to GlassFish Server.................................................................................... 8-32

    9 Administering Life Cycle ModulesAbout Life Cycle Modules...................................................................................................................... 9-1Configuring Life Cycle Modules .......................................................................................................... 9-2

    To Create a Life Cycle Module......................................................................................................... 9-2To List Life Cycle Modules ............................................................................................................... 9-2To Update a Life Cycle Module ....................................................................................................... 9-3To Delete a Life Cycle Module ......................................................................................................... 9-3

    10 Administering Batch JobsAbout Batch Jobs ................................................................................................................................... 10-1Viewing Batch Jobs ............................................................................................................................... 10-1

    To List Batch Jobs ............................................................................................................................ 10-2To List Batch Job Executions.......................................................................................................... 10-2To List Batch Job Steps ................................................................................................................... 10-3

    Configuring the Batch Runtime ......................................................................................................... 10-3To List the Batch Runtime Configuration.................................................................................... 10-4To Configure the Batch Runtime .................................................................................................. 10-4

  • vii

    11 Extending and Updating GlassFish ServerAbout Add-On Components ............................................................................................................... 11-1Preconfigured Repositories for GlassFish Server ........................................................................... 11-1

    Oracle GlassFish Server Repositories........................................................................................... 11-2GlassFish Server Open Source Edition Repositories.................................................................. 11-4

    Tools for Extending and Updating GlassFish Server ..................................................................... 11-5Update Tool...................................................................................................................................... 11-5The pkg Command.......................................................................................................................... 11-5Administration Console ................................................................................................................. 11-6

    Adding Components............................................................................................................................. 11-6To Install an Add-on Component................................................................................................. 11-6

    Updating Installed Components ........................................................................................................ 11-9To Update an Installed Component ........................................................................................... 11-10To Update All Installed Components in an Image .................................................................. 11-11

    Removing Installed Components .................................................................................................... 11-11To Uninstall an Installed Component ........................................................................................ 11-12To Uninstall and Revert to an Older Version of a Component .............................................. 11-13

    Using Configuration Modularity ..................................................................................................... 11-14To Add the Default Configuration of a Module to domain.xml............................................. 11-14To Remove the Configuration of a Module From domain.xml .............................................. 11-15To Display the Current Active Configuration of a Module.................................................... 11-15

    Upgrading to Oracle GlassFish Server From GlassFish Server Open Source Edition .......... 11-16To Upgrade to GlassFish Server Open Source Edition by Using Update Tool.................... 11-16To Upgrade to GlassFish Server Open Source Edition by Using the pkg Command ......... 11-18

    Extending and Updating GlassFish Server Inside a Closed Network ...................................... 11-19To Install the Pre-Installed Toolkit Image Inside a Closed Network .................................... 11-19To Configure a Local Repository Server Inside a Closed Network....................................... 11-21To Configure a GlassFish Server Installation to Use a Local Repository Server Inside a Closed Network 11-23To Install Updates From a Local Repository............................................................................. 11-25

    Part II Resources and Services Administration

    12 Administering Database ConnectivityAbout Database Connectivity ............................................................................................................. 12-1Setting Up the Database....................................................................................................................... 12-2

    To Install the Database and Database Driver.............................................................................. 12-2To Start the Database ...................................................................................................................... 12-3To Stop the Database ...................................................................................................................... 12-3Java DB Utility Scripts .................................................................................................................... 12-4

    Configuring Access to the Database.................................................................................................. 12-4Administering JDBC Connection Pools ....................................................................................... 12-5Administering JDBC Resources .................................................................................................. 12-12Enabling the jdbc/__default Resource in a Clustered Environment .................................. 12-15Integrating the JDBC Driver ........................................................................................................ 12-15

    Configuration Specifics for JDBC Drivers ..................................................................................... 12-16

  • viii

    IBM DB2 Database Type 2 Driver............................................................................................... 12-17IBM DB2 Database Type 4 Driver............................................................................................... 12-17Java DB/Derby Type 4 Driver..................................................................................................... 12-18MySQL Server Database Type 4 Driver..................................................................................... 12-18Oracle 10 Database Driver ........................................................................................................... 12-19Oracle 11 Database Driver ........................................................................................................... 12-19PostgreSQL Type 4 Driver ........................................................................................................... 12-20DataDirect Type 4 Driver for IBM DB2 Database .................................................................... 12-20DataDirect Type 4 Driver for IBM Informix.............................................................................. 12-21DataDirect Type 4 Driver for Microsoft SQL Server Database .............................................. 12-21DataDirect Type 4 Driver for MySQL Server Database .......................................................... 12-21DataDirect Type 4 Driver for Oracle 11 Database .................................................................... 12-22DataDirect Type 4 Driver for Sybase Database ........................................................................ 12-22Inet Oraxo Driver for Oracle Database ...................................................................................... 12-23Inet Merlia Driver for Microsoft SQL Server Database ........................................................... 12-23Inet Sybelux Driver for Sybase Database................................................................................... 12-24JConnect Type 4 Driver for Sybase ASE 12.5 Database ........................................................... 12-24

    13 Administering EIS ConnectivityAbout EIS Connectivity ....................................................................................................................... 13-1Administering Connector Connection Pools ................................................................................... 13-2

    To Create a Connector Connection Pool...................................................................................... 13-3To List Connector Connection Pools ............................................................................................ 13-4To Connect to (Ping) or Reset (Flush) a Connector Connection Pool...................................... 13-4To Update a Connector Connection Pool .................................................................................... 13-4To Delete a Connector Connection Pool ...................................................................................... 13-5

    Administering Connector Resources................................................................................................. 13-5To Create a Connector Resource................................................................................................... 13-5To List Connector Resources ......................................................................................................... 13-6To Update a Connector Resource ................................................................................................. 13-6To Delete a Connector Resource ................................................................................................... 13-7

    Administering the Resource Adapter Configuration..................................................................... 13-7To Create Configuration Information for a Resource Adapter ................................................ 13-8To List Resource Adapter Configurations................................................................................... 13-8To Update a Resource Adapter Configuration........................................................................... 13-9To Delete a Resource Adapter Configuration............................................................................. 13-9

    Administering Connector Security Maps......................................................................................... 13-9To Create a Connector Security Map ......................................................................................... 13-10To List Connector Security Maps................................................................................................ 13-10To Update a Connector Security Map........................................................................................ 13-11To Delete a Connector Security Map.......................................................................................... 13-11

    Administering Connector Work Security Maps ............................................................................ 13-12To Create a Connector Work Security Map .............................................................................. 13-12To List Connector Work Security Maps..................................................................................... 13-13To Update a Connector Work Security Map............................................................................. 13-13To Delete a Connector Work Security Map............................................................................... 13-14

    Administering Administered Objects............................................................................................. 13-14

  • ix

    To Create an Administered Object ............................................................................................. 13-15To List Administered Objects...................................................................................................... 13-15To Update an Administered Object............................................................................................ 13-16To Delete an Administered Object.............................................................................................. 13-16

    14 Administering Internet ConnectivityAbout Internet Connectivity ............................................................................................................... 14-1

    About HTTP Network Listeners................................................................................................... 14-1About Virtual Servers..................................................................................................................... 14-2

    Administering HTTP Network Listeners ......................................................................................... 14-2To Create an Internet Connection................................................................................................. 14-3Administering HTTP Protocols..................................................................................................... 14-4Administering HTTP Configurations .......................................................................................... 14-5Administering HTTP Transports.................................................................................................. 14-6Administering HTTP Network Listeners .................................................................................... 14-8

    Administering Virtual Servers.......................................................................................................... 14-11To Create a Virtual Server............................................................................................................ 14-12To List Virtual Servers.................................................................................................................. 14-13To Update a Virtual Server .......................................................................................................... 14-13To Delete a Virtual Server............................................................................................................ 14-13To Assign a Default Web Module to a Virtual Server ............................................................. 14-14To Assign a Virtual Server to an Application or Module ....................................................... 14-14To Set JSESSIONIDSSO Cookie Attributes .................................................................................. 14-15

    15 Administering Concurrent ResourcesAbout Concurrent Resources .............................................................................................................. 15-1Default Concurrent Resources............................................................................................................ 15-1Configuring Context Services ............................................................................................................. 15-2

    To Create a Context Service........................................................................................................... 15-2To List Context Services ................................................................................................................. 15-3To Update a Context Service ......................................................................................................... 15-3To Delete a Context Service ........................................................................................................... 15-4

    Configuring Managed Thread Factories........................................................................................... 15-4To Create a Managed Thread Factory.......................................................................................... 15-5To List Managed Thread Factories ............................................................................................... 15-5To Update a Managed Thread Factory ........................................................................................ 15-6To Delete a Managed Thread Factory .......................................................................................... 15-6

    Configuring Managed Executor Services ......................................................................................... 15-7To Create a Managed Executor Service ....................................................................................... 15-7To List Managed Executor Services.............................................................................................. 15-8To Update a Managed Executor Service...................................................................................... 15-8To Delete a Managed Executor Service........................................................................................ 15-9

    Configuring Managed Scheduled Executor Services ..................................................................... 15-9To Create a Managed Scheduled Executor Service.................................................................. 15-10To List Managed Scheduled Executor Services ........................................................................ 15-10To Update a Managed Scheduled Executor Service ................................................................ 15-11

  • xTo Delete a Managed Scheduled Executor Service .................................................................. 15-11

    16 Administering the Object Request Broker (ORB)About the ORB....................................................................................................................................... 16-1Configuring the ORB............................................................................................................................ 16-1Administering IIOP Listeners ............................................................................................................ 16-2

    To Create an IIOP Listener............................................................................................................. 16-2To List IIOP Listeners ..................................................................................................................... 16-2To Update an IIOP Listener ........................................................................................................... 16-3To Delete an IIOP Listener............................................................................................................. 16-3

    17 Administering the JavaMail ServiceAbout JavaMail ...................................................................................................................................... 17-1Administering JavaMail Resources ................................................................................................... 17-1

    To Create a JavaMail Resource...................................................................................................... 17-2To List JavaMail Resources............................................................................................................ 17-2To Update a JavaMail Resource .................................................................................................... 17-3To Delete a JavaMail Resource...................................................................................................... 17-3

    18 Administering the Java Message Service (JMS)About the JMS Service ......................................................................................................................... 18-2

    JMS Service High Availability....................................................................................................... 18-2Updating the JMS Service Configuration ........................................................................................ 18-3

    Setting Message Queue Broker Properties in the JMS Service Configuration ....................... 18-4Administering JMS Hosts.................................................................................................................... 18-4

    About JMS Host Types ................................................................................................................... 18-5Configuring Embedded and Local JMS Hosts............................................................................ 18-5To Create a JMS Host...................................................................................................................... 18-6To List JMS Hosts ............................................................................................................................ 18-7To Update a JMS Host .................................................................................................................... 18-8To Delete a JMS Host ...................................................................................................................... 18-9

    Administering JMS Connection Factories and Destinations ....................................................... 18-9To Create a Connection Factory or Destination Resource ...................................................... 18-10To List JMS Resources .................................................................................................................. 18-11To Delete a Connection Factory or Destination Resource....................................................... 18-11

    Administering JMS Physical Destinations .................................................................................... 18-12To Create a JMS Physical Destination ........................................................................................ 18-12To List JMS Physical Destinations .............................................................................................. 18-13To Purge Messages From a Physical Destination..................................................................... 18-13To Delete a JMS Physical Destination ........................................................................................ 18-14

    Special Situations When Using the JMS Service .......................................................................... 18-14Troubleshooting the JMS Service..................................................................................................... 18-15Using the Generic Resource Adapter for JMS to Integrate Supported External JMS Providers ...... 18-16

    Configuring GenericJMSRA for Supported External JMS Providers .................................... 18-16Using GenericJMSRA with WebLogic JMS ............................................................................... 18-21

  • xi

    Using GenericJMSRA with IBM WebSphere MQ .................................................................... 18-32

    19 Administering the Java Naming and Directory Interface (JNDI) ServiceAbout JNDI............................................................................................................................................. 19-1

    Java EE Naming Environment ...................................................................................................... 19-1How the Naming Environment and the Container Work Together ....................................... 19-2Naming References and Binding Information............................................................................ 19-2

    Administering JNDI Resources.......................................................................................................... 19-3Administering Custom JNDI Resources...................................................................................... 19-3Administering External JNDI Resources ..................................................................................... 19-5

    20 Administering TransactionsAbout Transactions ............................................................................................................................... 20-1

    Transaction Resource Managers ................................................................................................... 20-2Transaction Scope ........................................................................................................................... 20-3

    Configuring the Transaction Service ................................................................................................. 20-3Managing the Transaction Service for Rollbacks ........................................................................... 20-5

    To Stop the Transaction Service .................................................................................................... 20-5To Roll Back a Transaction............................................................................................................. 20-6To Restart the Transaction Service ............................................................................................... 20-6Determining Local Transaction Completion at Shutdown....................................................... 20-7

    Recovering Transactions ...................................................................................................................... 20-7Automatic Transaction Recovery.................................................................................................. 20-7To Manually Recover Transactions .............................................................................................. 20-8Distributed Transaction Recovery ................................................................................................ 20-9Recovery Workarounds and Limitations .................................................................................... 20-9

    Transaction Logging............................................................................................................................ 20-10To Store Transaction Logs in a Database................................................................................... 20-11

    Part III Appendixes

    A Subcommands for the asadmin UtilityGeneral Administration Subcommands ............................................................................................. A-2Batch Jobs Subcommands...................................................................................................................... A-4Concurrent Resources Subcommands................................................................................................. A-4Connectivity Subcommands ................................................................................................................. A-5Domain Subcommands .......................................................................................................................... A-7Internet Connectivity Subcommands.................................................................................................. A-8JavaMail Subcommands ...................................................................................................................... A-10JMS Subcommands............................................................................................................................... A-10JNDI Subcommands ............................................................................................................................. A-11JVM Subcommands .............................................................................................................................. A-12Life Cycle Module Subcommands..................................................................................................... A-12Logging and Monitoring Subcommands.......................................................................................... A-12ORB Subcommands .............................................................................................................................. A-13Thread Pool Subcommands ................................................................................................................ A-14

  • xii

    Transaction Service Subcommands ................................................................................................... A-14

  • xiii

  • xiv

    List of Examples11 Determining if the DAS Requires Restart................................................................................ 1-712 Determining if an Instance Requires Restart .......................................................................... 1-713 Listing Apache Felix Gogo Remote Shell Commands ....................................................... 1-1314 Running a Remote Shell Command...................................................................................... 1-1315 Determining the Services That an OSGi Bundle Provides................................................. 1-1321 Running an asadmin Utility Subcommand in Single Mode.................................................. 2-322 Specifying an asadmin Utility Option With a Subcommand in Single Mode .................... 2-323 Specifying an asadmin Utility Option and a Subcommand Option in Single Mode......... 2-424 Displaying Help Information for the asadmin Utility ........................................................... 2-425 Displaying Help Information for an asadmin Utility Subcommand ................................... 2-426 Starting a Multimode Session With asadmin Utility Options............................................... 2-527 Starting a Multimode Session by Using the multimode Subcommand............................... 2-528 Running a Subcommand in a Multimode Session ................................................................. 2-529 Running a Set of asadmin Subcommands From a File........................................................... 2-6210 Using the --detach Option in Single Mode............................................................................ 2-7211 Using the --detach Option in Multimode .............................................................................. 2-7212 Listing Jobs................................................................................................................................... 2-7213 Attaching to a Subcommand and Checking Its Status ......................................................... 2-8214 Configuring Managed Jobs........................................................................................................ 2-8215 Creating a System Property....................................................................................................... 2-9216 Listing System Properties .......................................................................................................... 2-9217 Deleting a System Property ....................................................................................................... 2-9218 Adding Resources .................................................................................................................... 2-10219 Displaying Version Information ............................................................................................ 2-11220 Listing Applications ................................................................................................................ 2-11221 Listing Containers.................................................................................................................... 2-12222 Listing Modules........................................................................................................................ 2-12223 Listing Subcommands............................................................................................................. 2-13224 Listing Timers........................................................................................................................... 2-14225 Showing Status of a Component ........................................................................................... 2-14226 Determining the Methods and Method Parameters That an Object in the Tree Supports ......

    2-19227 Retrieving Data for an Object in the Tree............................................................................. 2-20228 Adding an Object to the Tree ................................................................................................. 2-22229 Updating an Object in the Tree .............................................................................................. 2-24230 Deleting an Object From the Tree.......................................................................................... 2-2631 Creating a Domain...................................................................................................................... 3-332 Listing Domains .......................................................................................................................... 3-733 Logging In To a Domain on a Remote Machine..................................................................... 3-834 Logging In to a Domain on the Default Port of Localhost.................................................... 3-835 Deleting a Domain ...................................................................................................................... 3-936 Starting a Domain .................................................................................................................... 3-1037 Stopping a Domain (or Server) .............................................................................................. 3-1038 Restarting a Domain (or Server) ............................................................................................ 3-1139 Restarting a Domain in a Browser......................................................................................... 3-11310 Creating a Service to Restart a DAS Automatically on Windows .................................... 3-12311 Querying the Service to Restart a DAS Automatically on Windows............................... 3-13312 Creating a Service to Restart a DAS Automatically on Linux........................................... 3-13313 Creating a Service to Restart a Domain Automatically on Oracle Solaris....................... 3-14314 Backing Up the Default Domain............................................................................................ 3-16315 Restoring the Default Domain ............................................................................................... 3-17316 Listing Backups of the Default Domain................................................................................ 3-17317 Displaying the DAS Uptime................................................................................................... 3-19318 Changing the Administration Port of a Domain................................................................. 3-22

  • xv

    41 Creating JVM Options................................................................................................................ 4-242 Listing JVM Options................................................................................................................... 4-243 Deleting a JVM Option............................................................................................................... 4-344 Deleting Multiple JVM Options................................................................................................ 4-345 Generating a JVM Report........................................................................................................... 4-446 Creating a Profiler....................................................................................................................... 4-547 Deleting a Profiler ....................................................................................................................... 4-551 Creating a Thread Pool .............................................................................................................. 5-252 Listing Thread Pools................................................................................................................... 5-253 Updating a Thread Pool............................................................................................................. 5-354 Deleting a Thread Pool............................................................................................................... 5-361 Invoking a Servlet With a URL ................................................................................................. 6-262 Invoking a Servlet From Within a JSP File .............................................................................. 6-263 Redirecting a URL....................................................................................................................... 6-364 httpd.conf File for mod_jk ........................................................................................................ 6-465 workers.properties File for mod_jk ....................................................................................... 6-566 httpd.conf File for Load Balancing......................................................................................... 6-667 workers.properties File for Load Balancing ........................................................................ 6-668 http-ssl.conf File for mod_jk Security .................................................................................. 6-771 Changing the Name and Location of a Cluster's Log File .................................................... 7-772 Setting the java.util.logging.config.file System Property ......................................... 7-873 Listing Logger Levels for Modules .......................................................................................... 7-974 Listing Log Levels for an Instance............................................................................................ 7-975 Changing the Global Log Level for All Module Loggers .................................................. 7-1076 Setting the Log Level for a Module Logger ......................................................................... 7-1177 Setting Log Levels for Multiple Loggers .............................................................................. 7-1178 Setting the Log File Format using set-log-file-format ................................................. 7-1279 Setting the Log File Format using set-log-attributes ................................................... 7-12710 Excluding Fields in Log Records ........................................................................................... 7-13711 Setting Multiline Mode ........................................................................................................... 7-13712 Changing the Rotation Size .................................................................................................... 7-14713 Changing the Rotation Interval ............................................................................................. 7-15714 Changing the Limit Number of Retained Files ................................................................... 7-16715 Rotating Log Files Manually .................................................................................................. 7-16716 Adding a New Log Handler................................................................................................... 7-18717 Creating a ZIP Archive............................................................................................................ 7-18718 Listing Loggers......................................................................................................................... 7-1981 Enabling the Monitoring Service Dynamically ...................................................................... 8-782 Enabling Monitoring for Modules Dynamically .................................................................... 8-883 Enabling Monitoring for Modules by Using the set Subcommand ................................... 8-884 Disabling the Monitoring Service Dynamically ..................................................................... 8-885 Disabling Monitoring for Modules Dynamically................................................................... 8-986 Disabling Monitoring by Using the set Subcommand......................................................... 8-987 Viewing Common Monitoring Data ........................................................................................ 8-988 Viewing Attributes for a Specific Type................................................................................. 8-1289 Viewing Monitorable Applications ....................................................................................... 8-13810 Viewing Attributes for an Application ................................................................................. 8-13811 Viewing a Specific Attribute................................................................................................... 8-1491 Creating a Life Cycle Module ................................................................................................... 9-292 Listing Life Cycle Modules........................................................................................................ 9-293 Updating a Life Cycle Module.................................................................................................. 9-394 Deleting a Life Cycle Module.................................................................................................... 9-4101 Listing Batch Jobs..................................................................................................................... 10-2102 Listing Batch Job Executions .................................................................................................. 10-2103 Listing Batch Job Steps ............................................................................................................ 10-3

  • xvi

    104 Listing the Batch Runtime Configuration ............................................................................ 10-4105 Configuring the Batch Runtime............................................................................................. 10-5111 Adding Module Configuration to domain.xml.................................................................. 11-15112 Removing Module Configuration From domain.xml ....................................................... 11-15113 Displaying the Current Active Configuration of a Module............................................. 11-15114 Starting a Local Repository Daemon................................................................................... 11-23115 Configuring the pkg Command to Use a Local Repository ............................................. 11-24121 Starting a Database .................................................................................................................. 12-3122 Stopping a Database ................................................................................................................ 12-3123 Creating a JDBC Connection Pool ......................................................................................... 12-6124 Listing JDBC Connection Pools ............................................................................................. 12-6125 Contacting a Connection Pool................................................................................................ 12-7126 Resetting (Flushing) a Connection Pool ............................................................................... 12-7127 Deleting a JDBC Connection Pool ......................................................................................... 12-8128 Creating a JDBC Resource .................................................................................................... 12-13129 Listing JDBC Resources......................................................................................................... 12-141210 Updating a JDBC Resource................................................................................................... 12-141211 Deleting a JDBC Resource..................................................................................................... 12-14131 Creating a Connector Connection Pool ................................................................................ 13-3132 Listing Connector Connection Pools..................................................................................... 13-4133 Deleting a Connector Connection Pool................................................................................. 13-5134 Creating a Connector Resource.............................................................................................. 13-6135 Listing Connector Resources.................................................................................................. 13-6136 Deleting a Connector Resource.............................................................................................. 13-7137 Creating a Resource Adapter Configuration ....................................................................... 13-8138 Listing Configurations for a Resource Adapter .................................................................. 13-8139 Deleting a Resource Adapter Configuration ....................................................................... 13-91310 Creating a Connector Security Map .................................................................................... 13-101311 Listing All Connector Security Maps for a Connector Connection Pool ....................... 13-101312 Listing Principals for a Specific Security Map for a Connector Connection Pool ........ 13-111313 Listing Principals of All Connector Security Maps for a Connector Connection Pool 13-111314 Updating a Connector Security Map .................................................................................. 13-111315 Deleting a Connector Security Map .................................................................................... 13-121316 Creating Connector Work Security Maps .......................................................................... 13-131317 Listing the Connector Work Security Maps....................................................................... 13-131318 Updating a Connector Work Security Map ....................................................................... 13-141319 Deleting a Connector Work Security Map ......................................................................... 13-141320 Creating an Administered Object ........................................................................................ 13-151321 Listing Administered Objects............................................................................................... 13-151322 Deleting an Administered Object ........................................................................................ 13-16141 Creating an HTTP Protocol .................................................................................................... 14-4142 Listing the Protocols ................................................................................................................ 14-4143 Deleting a Protocol................................................................................................................... 14-5144 Creating an HTTP Configuration .......................................................................................... 14-5145 Deleting an HTTP Configuration .......................................................................................... 14-6146 Creating a Transport................................................................................................................ 14-7147 Listing HTTP Transports ........................................................................................................ 14-7148 Deleting a Transport................................................................................................................ 14-7149 Creating an HTTP Listener..................................................................................................... 14-81410 Creating a Network Listener .................................................................................................. 14-81411 Listing HTTP Listeners ........................................................................................................... 14-91412 Updating an HTTP Network Listener .................................................................................. 14-91413 Deleting an HTTP Listener ................................................................................................... 14-101414 Configuring an HTTP Listener for SSL............................................................................... 14-101415 Deleting SSL From an HTTP Listener................................................................................. 14-11

  • xvii

    1416 Creating a Virtual Server ...................................................................................................... 14-131417 Listing Virtual Servers........................................................................................................... 14-131418 Deleting a Virtual Server ...................................................................................................... 14-14151 Creating a Context Service ..................................................................................................... 15-3152 Listing Context Services.......................................................................................................... 15-3153 Deleting a Context Service...................................................................................................... 15-4154 Creating a Managed Thread Factory .................................................................................... 15-5155 Listing Managed Thread Factories........................................................................................ 15-5156 Deleting a Managed Thread Factory..................................................................................... 15-7157 Creating a Managed Executor Service .................................................................................. 15-8158 Listing Managed Executor Services ...................................................................................... 15-8159 Deleting a Managed Executor Service .................................................................................. 15-91510 Creating a Managed Scheduled Executor Service............................................................. 15-101511 Listing Managed Scheduled Executor Services................................................................. 15-111512 Deleting a Managed Scheduled Executor Service............................................................. 15-12161 Creating an IIOP Listener ....................................................................................................... 16-2162 Listing IIOP Listeners.............................................................................................................. 16-2163 Updating an IIOP Listener...................................................................................................... 16-3164 Deleting an IIOP Listener ....................................................................................................... 16-3171 Creating a JavaMail Resource ................................................................................................ 17-2172 Listing JavaMail Resources..................................................................................................... 17-3173 Updating a JavaMail Resource............................................................................................... 17-3174 Deleting a JavaMail Resource ................................................................................................ 17-4181 Creating a JMS Host ................................................................................................................ 18-7182 Listing JMS Hosts..................................................................................................................... 18-7183 Updating a JMS Host............................................................................................................... 18-8184 Deleting a JMS Host................................................................................................................. 18-9185 Creating a JMS Connection Factory .................................................................................... 18-10186 Creating a JMS Destination .................................................................................................. 18-11187 Listing All JMS Resources..................................................................................................... 18-11188 Listing a JMS Resources of a Specific Type........................................................................ 18-11189 Deleting a JMS Resource ....................................................................................................... 18-121810 Creating a JMS Physical Destination................................................................................... 18-131811 Listing JMS Physical Destinations ....................................................................................... 18-131812 Flushing Messages From a JMS Physical Destination ...................................................... 18-141813 Deleting a Physical Destination ........................................................................................... 18-14191 Creating a Custom Resource .................................................................................................. 19-3192 Listing Custom Resources ...................................................................................................... 19-4193 Updating a Custom JNDI Resource ...................................................................................... 19-4194 Deleting a Custom Resource .................................................................................................. 19-4195 Registering an External JNDI Resource................................................................................ 19-5196 Listing JNDI Resources ........................................................................................................... 19-6197 Listing JNDI Entries................................................................................................................. 19-6198 Updating an External JNDI Resource ................................................................................... 19-6199 Deleting an External JNDI Resource ..................................................................................... 19-7201 Stopping the Transaction Service .......................................................................................... 20-5202 Rolling Back a Transaction ..................................................................................................... 20-6203 Restarting the Transaction Service ........................................................................................ 20-6204 Manually Recovering Transactions....................................................................................... 20-8

  • xviii

  • xix

    List of Figures21 Web Page for the REST Resource for Managing a Domain............................................... 2-1722 Web Page for the REST Resource That Provides Class Loader Statistics ........................ 2-45

  • xx

    List of Tables

    11 Default Administration Values................................................................................................ 1-112 Default Locations ....................................................................................................................... 1-221 REST Resource Methods for Administering Monitoring and Configuration Data ...... 2-1861 URL Fields for Servlets Within an Application ..................................................................... 6-181 HTTP Listener Common Monitoring Statistics .................................................................. 8-1082 JVM Common Monitoring Statistics .................................................................................... 8-1083 Web Module Common Monitoring Statistics ..................................................................... 8-1184 Example Resources Level Dotted Names............................................................................ 8-1285 EJB Cache Monitoring Statistics............................................................................................ 8-1586 EJB Container Monitoring Statistics..................................................................................... 8-1587 EJB Method Monitoring Statistics......................................................................................... 8-1688 EJB Pool Monitoring Statistics............................................................................................... 8-1689 Timer Monitoring Statistics ................................................................................................... 8-16810 HTTP Service Virtual Server Monitoring Statistics ........................................................... 8-17811 Jersey Statistics ........................................................................................................................ 8-18812 Connector Connection Pool Monitoring Statistics (JMS) .................................................. 8-18813 Connector Work Management Monitoring Statistics (JMS) ............................................. 8-19814 JVM Monitoring Statistics for Java SE Class Loading ....................................................... 8-20815 JVM Monitoring Statistics for Java SE - Threads................................................................ 8-20816 JVM Monitoring Statistics for Java SE Compilation .......................................................... 8-21817 JVM Monitoring Statistics for Java SE Garbage Collectors............................................... 8-21818 JVM Monitoring Statistics for Java SE Memory ................................................................. 8-21819 JVM Statistics for the Java SE Operating System ............................................................... 8-22820 JVM Monitoring Statistics for Java SE Runtime ................................................................. 8-22821 Network Keep Alive Statistics .............................................................................................. 8-23822 Network Connection Queue Statistics ................................................................................. 8-23823 Network File Cache Statistics................................................................................................ 8-24824 Network Thread Pool Statistics ............................................................................................ 8-24825 ORB Monitoring Statistics (Connection Manager)............................................................. 8-25826 General Resource Monitoring Statistics (Connection Pool).............................................. 8-26827 Application Specific Resource Monitoring Statistics (Connection Pool) ........................ 8-27828 EJB Security Monitoring Statistics ........................................................................................ 8-27829 Web Security Monitoring Statistics ...................................................................................... 8-27830 Realm Security Monitoring Statistics ................................................................................... 8-28831 Thread Pool Monitoring Statistics ........................................................................................ 8-28832 JVM Monitoring Statistics for Java SE - Thread Info ......................................................... 8-28833 Transaction Service Monitoring Statistics ........................................................................... 8-29834 Web Module Servlet Statistics............................................................................................... 8-30835 Web JSP Monitoring Statistics............................................................................................... 8-30836 Web Request Monitoring Statistics ...................................................................................... 8-30837 Web Servlet Monitoring Statistics ........................................................................................ 8-31838 Web Session Monitoring Statistics........................................................................................ 8-31111 Oracle GlassFish Server Preconfigured Repositories ........................................................ 11-2112 GlassFish Server Open Source Edition Preconfigured Repositories ............................... 11-4141 Default Ports for Listeners ..................................................................................................... 14-3191 JNDI Lookup Names and Their Associated References.................................................... 19-2

  • xxi

    Preface

    GlassFish Server Open Source Edition 4.0 Administration Guide provides instructions for configuring and administering GlassFish Server Open Source Edition.

    This preface contains information about and conventions for the entire GlassFish Server Open Source Edition (GlassFish Server) documentation set.

    GlassFish Server 4.0 is developed through the GlassFish project open-source community at http://glassfish.java.net/. The GlassFish project provides a structured process for developing the GlassFish Server platform that makes the new features of the Java EE platform available faster, while maintaining the most important feature of Java EE: compatibility. It enables Java developers to access the GlassFish Server source code and to contribute to the development of the GlassFish Server. The GlassFish project is designed to encourage communication between Oracle engineers and the community.

    The following topics are addressed here:

    GlassFish Server Documentation Set

    Related Documentation

    Typographic Conventions

    Symbol Conventions

    Default Paths and File Names

    Documentation, Support, and Training

    Searching Oracle Product Documentation

    Documentation Accessibility

    GlassFish Server Documentation SetThe GlassFish Server documentation set describes deployment planning and system installation. For an introduction to GlassFish Server, refer to the books in the order in which they are listed in the following table.

    Book Title Description

    Release Notes Provides late-breaking information about the software and the documentation and includes a comprehensive, table-based summary of the supported hardware, operating system, Java Development Kit (JDK), and database drivers.

    Quick Start Guide Explains how to get started with the GlassFish Server product.

  • xxii

    Installation Guide Explains how to install the software and its components.

    Upgrade Guide Explains how to upgrade to the latest version of GlassFish Server. This guide also describes differences between adjacent product releases and configuration options that can result in incompatibility with the product specifications.

    Deployment Planning Gui


Recommended