DRAFT
Eclipse GlassFish Server
GlassFish Server Documentation Set
Related Documentation
Typographic Conventions
Symbol Conventions
Default Paths and File Names
Development Tasks and Tools
Installing and Preparing the Server for Development
High Availability Features
Development Tools
The asadmin Command
asadmin
The Administration Console
The Migration Tool
The NetBeans IDE
Debugging Tools
Profiling Tools
Sample Applications
The Class Loader Hierarchy
Delegation
Using the Java Optional Package Mechanism
Using the Endorsed Standards Override Mechanism
Class Loader Universes
Application-Specific Class Loading
Circumventing Class Loader Isolation
Using the Common Class Loader
Sharing Libraries Across a Cluster
Packaging the Client JAR for One Application in Another Application
To Package the Client JAR for One Application in Another Application
Enabling Debugging
To Set the Server to Automatically Start Up in Debug Mode
JPDA Options
Generating a Stack Trace for Debugging
Application Client Debugging
Open Message Queue Debugging
Enabling Verbose Mode
Class Loader Debugging
GlassFish Server Logging
The NetBeans Profiler
The HPROF Profiler
The JProbe Profiler
Developing Applications and Application Components
Security Goals
GlassFish Server Specific Security Features
Container Security
Declarative Security
Programmatic Security
Roles, Principals, and Principal to Role Mapping
Realm Configuration
Supported Realms
How to Configure a Realm
How to Set a Realm for an Application or Module
Creating a Custom Realm
Java EE Security API Support
JACC Support
Pluggable Audit Module Support
Configuring an Audit Module
The AuditModule Class
AuditModule
The server.policy File
server.policy
Default Permissions
System Properties
Changing Permissions for an Application
Enabling and Disabling the Security Manager
Configuring Message Security for Web Services
Message Security Providers
Message Security Responsibilities
Application-Specific Message Protection
Understanding and Running the Sample Application
Programmatic Login Using the ProgrammaticLogin Class
Programmatic Login Precautions
Granting Programmatic Login Permission
The ProgrammaticLogin Class
ProgrammaticLogin
User Authentication for Single Sign-on
Adding Authentication Mechanisms to the Servlet Container
The GlassFish Server and JSR-375
The GlassFish Server and JSR 196
Writing a Server Authentication Module
Sample Server Authentication Module
Compiling and Installing a Server Authentication Module
Configuring a Server Authentication Module
Binding a Server Authentication Module to Your Application
Creating Portable Web Service Artifacts
Deploying a Web Service
The Web Service URI, WSDL File, and Test Page
The Databinding Provider
GlassFish Java EE Service Engine
Using the jbi.xml File
jbi.xml
Overview of Oracle TopLink
Using Oracle TopLink in GlassFish Server
Specifying the Database for an Application
Specifying the Persistence Provider for an Application
Primary Key Generation Defaults
Automatic Schema Generation
Annotations
Generation Options
Restrictions and Optimizations
Oracle Database Enhancements
Extended Persistence Context
Using @OrderBy with a Shared Session Cache
Using BLOB or CLOB Types with the Inet Oraxo JDBC Driver
Database Case Sensitivity
Sybase Finder Limitation
MySQL Database Restrictions
Using Servlets
Caching Servlet Results
About the Servlet Engine
Using JavaServer Pages
JSP Tag Libraries and Standard Portable Tags
JSP Caching
Options for Compiling JSP Files
Creating and Managing Sessions
Configuring Sessions
Session Managers
Using Comet
Introduction to Comet
Grizzly Comet
Bayeux Protocol
Advanced Web Application Features
Internationalization Issues
Virtual Server Properties
Class Loader Delegation
Using the default-web.xml File
default-web.xml
Configuring Logging and Monitoring in the Web Container
Configuring Idempotent URL Requests
Header Management
Configuring Valves and Catalina Listeners
Alternate Document Roots
Using a context.xml File
Enabling WebDav
Using SSI
Using CGI
Value Added Features
Read-Only Beans
The pass-by-reference Element
pass-by-reference
Pooling and Caching
Priority Based Scheduling of Remote Bean Invocations
Immediate Flushing
EJB Timer Service
To Deploy an EJB Timer to a Cluster
Using Session Beans
About the Session Bean Containers
Stateful Session Bean Failover
Session Bean Restrictions and Optimizations
Using Read-Only Beans
Read-Only Bean Characteristics and Life Cycle
Read-Only Bean Good Practices
Refreshing Read-Only Beans
Deploying Read-Only Beans
Using Message-Driven Beans
Message-Driven Bean Configuration
Message-Driven Bean Restrictions and Optimizations
GlassFish Server Support for CMP
CMP Mapping
Mapping Capabilities
The Mapping Deployment Descriptor File
Mapping Considerations
Automatic Schema Generation for CMP
Supported Data Types for CMP
Generation Options for CMP
Schema Capture
Automatic Database Schema Capture
Using the capture-schema Utility
capture-schema
Configuring the CMP Resource
Performance-Related Features
Version Column Consistency Checking
Relationship Prefetching
Default Fetch Group Flags
Configuring Queries for 1.1 Finders
About JDOQL Queries
Query Filter Expression
Query Parameters
Query Variables
JDOQL Examples
CMP Restrictions and Optimizations
Disabling ORDER BY Validation
Setting the Heap Size on DB2
Eager Loading of Field State
Restrictions on Remote Interfaces
PostgreSQL Case Insensitivity
No Support for lock-when-loaded on Sybase
lock-when-loaded
Date and Time Fields
Set RECURSIVE_TRIGGERS to false on MSSQL
RECURSIVE_TRIGGERS
false
Introducing the Application Client Container
ACC Security
ACC Naming
Application Client Annotation
Java Web Start
Application Client JAR File
Developing Clients Using the ACC
To Access an EJB Component From an Application Client
To Access a JMS Resource From an Application Client
Using Java Web Start
Using the Embeddable ACC
Running an Application Client Using the appclient Script
appclient
Using the package-appclient Script
package-appclient
The client.policy File
client.policy
Using RMI/IIOP Over SSL
Connecting to a Remote EJB Module Through a Firewall
Specifying a Splash Screen
Setting Login Retries
Using Libraries with Application Clients
Developing Clients Without the ACC
To access an EJB component from a stand-alone client
To access an EJB component from a server-side module
To access a JMS resource from a stand-alone client
Connector Support in the GlassFish Server
Connector Architecture for JMS and JDBC
Connector Configuration
Advanced Connector Configuration Options
Thread Associations
Security Maps
Work Security Maps
Overriding Configuration Properties
Testing a Connector Connection Pool
Flushing a Connector Connection Pool
Handling Invalid Connections
Setting the Shutdown Timeout
Specifying the Class Loading Policy
Using Last Agent Optimization of Transactions
Disabling Pooling for a Connection
Using Application-Scoped Connectors
Inbound Communication Support
Outbound Communication Support
Configuring a Message Driven Bean to Use a Resource Adapter
Server Life Cycle Events
The LifecycleListener Interface
The LifecycleEvent Class
LifecycleEvent
The Server Lifecycle Event Context
Deploying a Lifecycle Module
Considerations for Lifecycle Modules
Overview of OSGi Application and GlassFish Server
Benefits of Using OSGi in Enterprise Java Applications
Developing OSGi Application Bundles for GlassFish Server
Developing Plain OSGi Bundles
Developing Web Application Bundles
Developing EJB Application Bundles
Deploying OSGi Bundles in GlassFish Server
Using Services and APIs
Statements
Using an Initialization Statement
Setting a Statement Timeout
Statement Leak Detection and Leaked Statement Reclamation
Statement Caching
Statement Tracing
Connections
Transparent Pool Reconfiguration
Disabling Pooling
Associating Connections with Threads
Custom Connection Validation
Sharing Connections
Marking Bad Connections
Connection Wrapping
Wrapping Connections
Obtaining a Physical Connection From a Wrapped Connection
Using the Connection.unwrap() Method
Connection.unwrap()
Allowing Non-Component Callers
Using Application-Scoped Resources
Disabling Stored Procedure Creation on Sybase
Handling Transactions with Databases
Using JDBC Transaction Isolation Levels
Using Non-Transactional Connections
Handling Transactions with Enterprise Beans
Flat Transactions
Global and Local Transactions
Commit Options
Bean-Level Container-Managed Transaction Timeouts
Handling Transactions with the Java Message Service
Transactions and Non-Persistent Messages
Using the ConfigurableTransactionSupport Interface
The Transaction Manager, the Transaction Synchronization Registry, and UserTransaction
UserTransaction
Accessing the Naming Context
Portable Global JNDI Names
GlassFish Server V2 Vendor-Specific Global JNDI Names
Disabling GlassFish Server V2 JNDI Names
Accessing EJB Components Using the CosNaming Naming Context
CosNaming
Accessing EJB Components in a Remote GlassFish Server
Naming Environment for Lifecycle Modules
Configuring Resources
External JNDI Resources
Custom Resources
Built-in Factories for Custom Resources
Using a Custom jndi.properties File
jndi.properties
Mapping References
Using Application-Scoped JMS Resources
Load-Balanced Message Inflow
Authentication With ConnectionFactory
ConnectionFactory
Delivering SOAP Messages Using the JMS API
To Send SOAP Messages Using the JMS API
To Receive SOAP Messages Using the JMS API
Introducing JavaMail
Creating a JavaMail Session
JavaMail Session Properties
Looking Up a JavaMail Session
Sending and Reading Messages Using JavaMail
To Send a Message Using JavaMail
To Read a Message Using JavaMail
Using Application-Scoped JavaMail Resources