Sun GlassFish Enterprise Server 2.1 Administration Guide
Sun Microsystems, Inc Network Circle Santa Clara, CA
 090122@21808
 Contents
 Java Business Integration
Jdbc Resources
 IBM Informix Type 4 Driver CloudScape 5.1 Type 4 Driver
Accessing Remote Servers
Configuring JMS Provider Properties
Foreign JMS Providers
 Configuring Security
Web and EJB Containers
 127
 Virtual Servers 149 Http Listeners 150
141
149
153
 161
What is the ORB? 162 Iiop Listeners
158
163
 215
About Management Rules 215 Configuring Management Rules 216
Tuning the JVM Settings 219
219
 231
Asadmin Utility
Profiler and SSL Commands
244
Page
 Figures
Page
 Tables
JVM Statistics for Java SE Runtime 189
 List and Status Commands 238
Remote Commands Required Options 234
Server Lifecycle Commands 237
Deployment Commands 239
 Examples
Page
 Sun GlassFish Enterprise Server Documentation Set
Preface
Table P-1Books in the Enterprise Server Documentation Set
 Default Paths and File Names
Table P-2Default Paths and File Names
 Typographic Conventions
Symbol Conventions
Symbol Conventions
Table P-3Typographic Conventions
 Third-Party Web Site References
Documentation, Support, and Training
Sun Welcomes Your Comments
 Enterprise Server Overview
Enterprise Server Overview
Enterprise Server Overview and Concepts
This section contains the following topics
 For example
Tools for Administration
Admin Console
Http//hostnameport
 To list the commands available within asadmin
Command-line Interface asadmin Utility
JConsole
 Enterprise Server Concepts
Domain Administration Server DAS
Domain
 1Features Available for Each Profile
Usage Profiles
 Cluster
Features Available for Each Profile
Node Agent
 Server Instance
1Enterprise Server Instance
 Ports in the Enterprise Server
2Enterprise Server Listeners that Use Ports
 Creating a Domain
Basic Enterprise Server Commands
Http//hostname5000
 Listing Domains
Deleting a Domain
Starting the Domain
 Stopping the Domain
Starting the Default Domain on Windows
Stopping the Default Domain on Windows
Restarting the Domain
 Creating a Node Agent
Starting a Cluster
Stopping a Cluster
Starting a Node Agent
 Stopping an Instance
Stopping a Node Agent
Starting an Instance
Restarting an Instance
 Recreating the Domain Administration Server
To migrate the DAS
 Change
Page
 JBI Environment
Service Engines
Java Business Integration
JBI Components
 Binding Components
JBI Component Loggers
 Service Assemblies
 Shared Libraries
JBI Descriptors
 Jdbc Resources
Jdbc Resources
 Jdbc Connection Pools
How Jdbc Resources and Connection Pools Work Together
 Setting Up Database Access
 Working with Jdbc Connection Pools
Creating a Jdbc Connection Pool
 Click OK
 Change connection validation settings
Editing a Jdbc Connection Pool
 By calling the con.getAutoCommit and con.getMetaData methods
 Editing Jdbc Connection Pool Advanced Attributes
 Creation Retry Attempts is greater than
 Configurations for Specific Jdbc Drivers
Configurations for Specific Jdbc Drivers
 Java DB Type 4 Driver
DataSource Classname Specify one of the following
 Sun GlassFish Jdbc Driver for DB2 Databases
DataSource Classname com.sun.sql.jdbcx.db2.DB2DataSource
 Sun GlassFish Jdbc Driver for Microsoft SQL Server Databases
 DeferPrepares Set to false
IBM DB2 8.1 Type 2 Driver
DataSource Classname com.ibm.db2.jcc.DB2SimpleDataSource
DataSource ClassnameSpecify one of the following
 Inet Oraxo Jdbc Driver for Oracle 8.1.7 and 9.x Databases
MySQL Type 4 Driver
Com.mysql.jdbc.jdbc2.optional.MysqlDataSource
 DataSource Classname com.inet.tds.TdsDataSource
Inet Merlia Jdbc Driver for Microsoft SQL Server Databases
DataSource Classname com.inet.ora.OraDataSource
Jdbcinetoralocalhost1521payrolldb
 Inet Sybelux Jdbc Driver for Sybase Databases
DataSource Classname com.inet.syb.SybDataSource
 Jdbcoraclethin@localhost1521customerdb
OCI Oracle Type 2 Driver for Oracle 8.1.7 Databases
Jdbcoracleoci@localhost1521customerdb
 CloudScape 5.1 Type 4 Driver
IBM Informix Type 4 Driver
DataSource Classname com.ibm.db2.jcc.DB2DataSource
Page
 Configuring Java Message Service Resources
JMS Resources
 Relationship Between JMS Resources and Connector Resources
 JMS Destination Resources
JMS Connection Factories
JMS Physical Destinations
 Configuring JMS Provider Properties
 Accessing Remote Servers
Foreign JMS Providers
 Configuring the Generic Resource Adapter
Resource Adapter Properties
 False
 Foreign JMS Providers
 ManagedConnectionFactory Properties
 Administered Object Resource Properties
Activation Spec Properties
 Configuring Java Message Service Resources
 Message causes a runtime exception
 Configuring JavaMail Resources
Creating a JavaMail Session
 Creating a JavaMail Session
 Java EE Naming Services
Jndi Resources
 Naming References and Binding Information
 Using External Jndi Repositories and Resources
Using Custom Resources
1JNDI Lookups and Their Associated References
 Using External Jndi Repositories and Resources
 Connector Resources
An Overview of Connectors
 To Create a Connector Connection Pool
Managing Connector Connection Pools
Specify this name when creating a connector resource
 To Edit a Connector Connection Pool
Create-connector-connection-pool
 Same transaction level as that specified in resource
 To Edit Connector Connection Pool Advanced Attributes
 Pool. Default value is false
 To Edit Security Maps for Connector Connection Pools
To Delete a Connector Connection Pool
To create security maps for connector connection pools
To Edit Connection Pool Properties
 To Create a Connector Resource
Managing Connector Resources
To Set Up EIS Access
Delete-connector-connection-pool
 To Delete a Connector Resource
To Edit a Connector Resource
Create-connector-resource
 To Configure the Connector Service
Managing Administered Object Resources
Delete-connector-resource
 To Create an Administered Object Resource
 Create-admin-object
To Edit an Administered Object Resource
To Delete an Administered Object Resource
Delete-admin-object
 Web and EJB Containers
SIP Servlet Container
 Editing SIP Container General Attributes
Editing the Properties of the SIP Container
Editing SIP Container Session Properties
 EJB Container
Web Container
Editing SIP Container Session Manager Properties
Page
 Configuring Security
Understanding Application and System Security
 Tools for Managing Security
 Asadmin create-password-alias --user admin alias-name
Managing Security of Passwords
Encrypting a Password in the domain.xml File
Asadmin create-password-alias --user admin jms-password
 Restart the Enterprise Server for the relevant domain
Protecting Files with Encoded Passwords
Changing the Master Password
Restart the Enterprise Server
 Changing the Admin Password
Working with the Master Password and Keystores
 Authenticating Entities
About Authentication and Authorization
1Enterprise Server Authentication Methods
 Specifying Jacc Providers
Authorizing Users
Verifying Single Sign-On
 Configuring Message Security
Understanding Users, Groups, Roles, and Realms
 Users
Groups
 Roles
Realms
 To Configure a Jdbc Realm for a Web, EJB Application
Create a Jdbc realm
 About Digital Certificates
Introduction to Certificates and SSL
Following topics are discussed in this section
 About Secure Sockets Layer
About Certificate Chains
 Using Name-based Virtual Hosts
About Ciphers
 About Firewalls
About Certificate Files
 Using the keytool Utility
Using Java Secure Socket Extension Jsse Tools
Changing the Location of Certificate Files
 Display certificate information from a keystore of type JKS
Delete a certificate from a keystore of type JKS
 Generating a Certificate Using thekeytool Utility
 Deleting a Certificate Using thekeytool Utility
Certificate was added to keystore Saving cacerts.jks
 Storepass password
Using Network Security Services NSS Tools
Keytool -delete
 Display available certificates
Using the certutil Utility
Verify the certificates generated in the previous bullet
Certutil -L -d $CERTDBDIR
 Delete a certificate from an NSS certificate database
Move a certificate from an NSS database to JKS format
 Delete a PKCS11 module from an NSS store
Modutil -list -dbdir $admin.domain.dir/$admin.domain/config
Add a new PKCS11 module or token
List available token modules in an NSS store
 Using Hardware Crypto Accelerator With Enterprise Server
About Configuring Hardware Crypto Accelerators
 Standard output will look similar to the following
Configuring PKCS#11 Tokens
Modutil -list -dbdir Asnssdb
 Managing Keys And Certificates
This section describes the following topics
 Listing Keys and Certificates
Standard output will be similar to the following
 Configuration for the SCA 1000 hardware accelerator
Configuring J2SE 5.0 PKCS#11 Providers
Working With Private Keys and Certificates
 Property name=mytoken value=&InstallDir/mypkcs11.cfg
Name=HW1000 Library=/opt/SUNWconn/crypto/lib/libpkcs11.so
 126
 Configuring Message Security
Overview of Message Security
 Understanding Message Security in the Enterprise Server
System Administrator
Assigning Message Security Responsibilities
 Application Developer
Application Deployer
About Username Tokens
 About Encryption
About Digital Signatures
About Message Protection Policies
 Glossary of Message Security Terminology
Response Policy
 Securing a Web Service
 Configuring Application-Specific Web Services Security
Configuring the Enterprise Server for Message Security
Securing the Sample Application
 Actions of Request and Response Policy Configurations
 Configuring a JCE Provider
Configuring Other Security Facilities
After You Finish
 Save and close the file
Security.provider.1=sun.security.provider.Sun
 Message Security Setup
Enabling Providers for Message Security
 To specify the default server provider
Configuring the Message Security Provider
To specify the default client provider
 Creating a Message Security Provider
Enabling Message Security for Application Clients
 Further Information
Response-policy
 What is the Diagnostic Framework?
Configuring the Diagnostic Service
Diagnostic Service Framework
 Generating a Diagnostic Report
 Transactions
What is a Transaction?
About Transactions
 What is a Transaction? on Configuring Transactions on
Transactions in Java EE Technology
 This section explains how to configure transaction settings
Admin Console Tasks for Transactions
Configuring Transactions
Workarounds for Specific Databases
 To set a transaction timeout value
Set any needed properties
 To set the location of the transaction logs
 Default value is
To set the keypoint interval
 Configuring the Http Service
Virtual Servers
 Http Listeners
 Configuring the Http Service 151
 152
 Managing Web Services
Overview of Web Services
 Web Services Standards
Java EE Web Service Standards
 Deploying and Testing Web Services
Deploying Web Services
 Testing Web Services
Using Web Services Registries
Viewing Deployed Web Services
Web Services Security
 Publishing a Web Service to a Registry
Adding a Registry
 Monitoring Web Services
Transforming Messages with Xslt Filters
 Viewing Web Service Statistics
Monitoring Web Service Messages
 160
 Configuring the Object Request Broker
An Overview of the Object Request Broker
 Managing Iiop Listeners
Configuring the ORB
What is the ORB?
Iiop Listeners
 Thread Pools
 Working with Thread Pools
 About Logging
Configuring Logging
Log Records
 Logger Namespace Hierarchy
1Enterprise Server Logger Namespaces
 Enterprise Server Logger Namespaces
JTS
 Configuring General Logging Settings
Configuring Logging
Configuring Log Levels
 171000.000
Viewing Server Logs
Details
 ThreadID=13
 About Monitoring
Monitoring Components and Services
Monitoring in the Enterprise Server
 Applications Tree
Overview of Monitoring
About the Tree Structure of Monitorable Objects
Following sections describe these sub-trees
 Http Service Tree
 JMS Service Tree
Connector Service Tree
Resources Tree
 Thread Pool Tree
About Statistics for Monitored Components and Services
ORB Tree
Orb Connection-managers Connection-manager-1
 EJB Container Statistics
1EJB Statistics
 2EJB Method Statistics
3EJB Session Store Statistics
 EJB Session Store Statistics
 4EJB Pool Statistics
5EJB Cache Statistics
 Web Container Statistics
6Timer Statistics
7Web Container Servlet Statistics
 Http Service Statistics
8Web Container Web Module Statistics
 9HTTP Service Statistics Developer Profile
Jdbc Connection Pools Statistics
 10JDBC Connection Pool Statistics
 JMS/Connector Service Statistics
11Connector Connection Pool Statistics
 Statistics for Connection Managers in an ORB
12Connector Work Management Statistics
13Connection Manager in an ORB Statistics
 Thread Pools Statistics
Transaction Service Statistics
15Transaction Service Statistics
14Thread Pool Statistics
 JVM Statistics
15 Transaction Service Statistics
Java Virtual Machine JVM Statistics
17JVM Statistics for Java SE- Class Loading
 19JVM Statistics for Java SE- Garbage Collection
18JVM Statistics for Java SE- Compilation
20JVM Statistics for Java SE- Memory
 21JVM Statistics for Java SE Operating System
Following table
22JVM Statistics for Java SE Runtime
 23JVM Statistics for Java SE Thread Info
 Enabling and Disabling Monitoring
24JVM Statistics for Java SE Threads
 To Configure Monitoring Levels Using asadmin
Configuring Monitoring Levels Using the Admin Console
Returns
 To Use the asadmin monitor Command to View Monitoring Data
Viewing Monitoring Data in the Admin Console
Viewing Monitoring Data With the asadmin Tool
Viewing Monitoring Data
 531628032 45940736
 Server.http-service
Command returns the following attributes and data
Asadmin get --user adminuser --monitor server.jvm
Understanding and Specifying Dotted Names
 Examples of the list and get Commands
Server.applications.petstore
 Asadmin list --user admin-user--monitor server
Examples for the list --user admin-user --monitor Command
Examples for the get --user admin-user --monitor Command
Asadmin list --user admin-user--monitor server.applications
 Asadmin get --user admin-user--monitor server.jvm
Attempt to get all attributes from a Java EE application
 Attempt to get a specific attribute from a subsystem
Asadmin get --user admin-user--monitor server.jvm.badname
To Use the PetStore Example
Returns output will be similar to
 Asadmin list -m server.applications.petstore.signon-ejbjar
Server.http-service Server.resources Server.thread-pools
Returns with dotted name removed for space considerations
 Monitoring Components and Services 201
 Expected Output for list and get Commands at All Levels
 Top Level
Applications Level
 Application has been deployed. It is not applicable if a
 Monitoring Components and Services 205
 List -m Server.applications.app1
 28HTTP-Service Level
29Thread-Pools Level
 Resources Level
31Transaction-Service Level
ORB Level
 Level
Using JConsole
JVM Level
 Securing JConsole to Application Server Connection
 Prerequisites for Connecting JConsole to Application Server
Connecting JConsole to Application Server
 Connecting JConsole Securely to Application Server
 Monitoring Components and Services 213
 214
 Configuring Management Rules
About Management Rules
 Configuring Management Rules
 Configuring Management Rules 217
 218
 Java Virtual Machine and Advanced Settings
Tuning the JVM Settings
 Configuring Advanced Settings
 Restarting Automatically on Solaris
Automatically Restarting a Domain or Node Agent
This Appendix contains the following topics
 Restarting Automatically on Solaris
 Creating a Windows Service
Restarting Automatically on the Microsoft Windows Platform
 Start= auto DisplayName= display-name
 Security for Automatic Restarts
Process name=as-service-name Sysproperty key=-Xrs
Jvm-options-Xrs/jvm-options
 226
 Dotted Name Attributes for domain.xml
Top Level Elements
 Top Level Elements
 Elements Not Aliased
Elements Not Aliased
 230
 Asadmin Utility
 Asadmin Utility
 Appendix C The asadmin Utility 233
 Common Options for Remote Commands
Table C-1Remote Commands Required Options
 Multimode Command
Prefix followed by the password name in uppercase letters
 Get, Set, and List Commands
 Server Lifecycle Commands
Table C-2Server Lifecycle Commands
 Table C-2 Server Lifecycle Commands
List and Status Commands
Table C-3List and Status Commands
 Deployment Commands
Table C-4Deployment Commands
 Table C-5Version Commands
Version Commands
Message Queue Administration Commands
Table C-6Message Queue Commands
 Resource Management Commands
Table C-7Resource Management Commands
 Table C-7 Resource Management Commands
 Lifecycle and Audit Module Commands
Configuration Commands
Http and Iiop Listener Commands
Table C-8IIOP Listener Commands
 Table C-9Lifecycle Module Commands
Profiler and SSL Commands
JVM Options and Virtual Server Commands
Table C-10Profiler and SSL Commands
 Table C-11JVM Options and Virtual Server Commands
Threadpool and Auth-Realm Commands
Transaction and Timer Commands
Table C-12Threadpool and Auth-Realm Commands
 Table C-13Transaction Commands
User Management Commands
Registry Commands
Table C-14Transaction Commands
 Database Commands
Rules and Monitoring Commands
Table C-16Rules and Monitoring Commands
 Table C-17Database Commands
Diagnostic and Logging Commands
Web Service Commands
Table C-18Diagnostic and Logging Commands
 Security Service Commands
Table C-20Security Commands
 Password Commands
Table C-21Password Commands
 Custom MBean Commands
Verify Command
Service Command
 Property Command
Table C-25Property Command
 Index
ACC
 JMS
 Logging ORB
 256