Documentation Home
> Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Developer's Guide
Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Developer's Guide
Book Information
Index
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Preface
Part I Developing and Deploying Applications
Chapter 1 Setting Up a Development Environment
Installing and Preparing the Server for Development
High Availability Features
Tools
The asadmin Command
The Administration Console
The asant Utility
deploytool
Verifier
Migration Tool
Debugging Tools
Profiling Tools
Sample Applications
Chapter 2 Securing Applications
Security Goals
Application Server Specific Security Features
Container Security
Programmatic Security
Declarative Security
Application Level Security
Component Level Security
Realm Configuration
Supported Realms
How to Configure a Realm
How to Set a Realm for an Application or Module
Creating a Custom Realm
JACC Support
Pluggable Audit Module Support
Configuring an Audit Module
The AuditModule Class
The server.policy File
Default Permissions
Changing Permissions for an Application
Configuring Message Security
Message Security Responsibilities
Application Developer
Application Deployer
System Administrator
Application-Specific Message Protection
Using a Signature to Enable Message Protection for All Methods
To enable message protection for all methods using digital signature
Configuring Message Protection For a Specific Method Based on Digital Signatures
To enable message protection for a particular method or set of methods using digital signature
Understanding and Running the Example Application
To Set Up the Sample Application
To Run the Sample Application
Monitoring Message Security
Programmatic Login
Precautions
Granting Programmatic Login Permission
The ProgrammaticLogin Class
User Authentication for Single Sign-on
Defining Roles
Chapter 3 Assembling and Deploying Applications
Overview of Assembly and Deployment
Modules
Applications
J2EE Standard Descriptors
Sun Java System Application Server Descriptors
Naming Standards
Directory Structure
Runtime Environments
Module Runtime Environment
Application Runtime Environment
Classloaders
The Classloader Hierarchy
Classloader Universes
Circumventing Classloader Isolation
Using the System Classloader
Using the Common Classloader
Using the Java Optional Package Mechanism
Packaging the Client JAR for One Application in Another Application
To package the client JAR for one application in another application
Assembling Modules and Applications
deploytool
Apache Ant
The Deployment Descriptor Verifier
Command Line Syntax
Ant Integration
Sample Results Files
Deploying Modules and Applications
Deployment Errors
The Deployment Life Cycle
Dynamic Deployment
Disabling a Deployed Application or Module
To disable an application or module in the Administration Console
Dynamic Reloading
To enable dynamic reloading in the Administration Console
To reload code or deployment descriptor changes
Automatic Deployment
To enable and configure or to disable autodeployment
Tools for Deployment
Apache Ant
The deploytool
JSR 88
The asadmin Command
The Administration Console
To use the Administration Console for deployment
Deployment by Module or Application
Deploying a WAR Module
Deploying an EJB JAR Module
Deploying a Lifecycle Module
Deploying an Application Client
To deploy an application client
To prepare another machine for executing an application client
Deploying a J2EE CA Resource Adapter
Access to Shared Frameworks
asant Assembly and Deployment Tool
asant Tasks for Sun Java System Application Server
sun-appserv-deploy
Subelements
Attributes
Examples
sun-appserv-undeploy
Subelements
Attributes
Examples
sun-appserv-instance
Subelements
Attributes
Examples
sun-appserv-component
Subelements
Attributes
Examples
sun-appserv-admin
Subelements
Attributes
Examples
sun-appserv-jspc
Subelements
Attributes
Example
sun-appserv-update
Subelements
Attributes
Example
Reusable Subelements
server
Subelements
Attributes
Examples
component
Subelements
Attributes
Examples
fileset
Chapter 4 Debugging Applications
Enabling Debugging
To set the server to automatically start up in debug mode
JPDA Options
Generating a Stack Trace for Debugging
The Java Debugger
Using an IDE
To use the NetBeans 3.6 IDE with the Application Server
Sun Java System Message Queue Debugging
Enabling Verbose Mode
Logging
Profiling
The HPROF Profiler
To use HPROF profiling on UNIX
The Optimizeit Profiler
To enable remote profiling with Optimizeit
Part II Developing Applications and Application Components
Chapter 5 Developing Web Applications
Introducing Web Applications
Internationalization Issues
The Server
Servlets
Servlet Request
Servlet Response
Virtual Servers
To assign virtual servers
Default Web Modules
Classloader Delegation
Using the default-web.xml File
To use the default-web.xml file
Configuring Logging in the Web Container
Configuring Idempotent URL Requests
Specifying an Idempotent URL
Characteristics of an Idempotent URL
Configuring HTML Error Pages
Header Management
Redirecting URLs
Using Servlets
Invoking a Servlet with a URL
Servlet Output
Caching Servlet Results
Caching Features
Default Cache Configuration
Caching Example
CacheKeyGenerator Interface
About the Servlet Engine
Instantiating and Removing Servlets
Request Handling
Using JavaServer Pages
JSP Tag Libraries and Standard Portable Tags
JSP Caching
cache
Attributes
Example
flush
Attributes
Examples
Options for Compiling JSP Files
Creating and Managing HTTP Sessions
Configuring Sessions
Sessions, Cookies, and URL Rewriting
Coordinating Session Access
Distributed Sessions and Persistence
Session Managers
The memory Persistence Type
The file Persistence Type
The ha Persistence Type
Sample Session Persistence Applications
Chapter 6 Using Enterprise JavaBeans Technology
Summary of EJB 2.1 Changes
Value Added Features
Read-Only Beans
pass-by-reference
Pooling and Caching
Pooling Parameters
Caching Parameters
Bean-Level Container-Managed Transaction Timeouts
Priority Based Scheduling of Remote Bean Invocations
Immediate Flushing
EJB Timer Service
Using Session Beans
About the Session Bean Containers
Stateless Container
Stateful Container
Stateful Session Bean Failover
Choosing a Persistence Store
Enabling Checkpointing
Server Instance and EJB Container Levels
Application and EJB Module Levels
SFSB Level
Specifying Methods to Be Checkpointed
Restrictions and Optimizations
Optimizing Session Bean Performance
Restricting Transactions
Using Read-Only Beans
Read-Only Bean Characteristics and Life Cycle
Read-Only Bean Good Practices
Refreshing Read-Only Beans
Invoking a Transactional Method
Refreshing Periodically
Refreshing Programmatically
Deploying Read Only Beans
Using Message-Driven Beans
Message-Driven Bean Configuration
Connection Factory and Destination
Message-Driven Bean Pool
Domain-Level Settings
Restrictions and Optimizations
Pool Tuning and Monitoring
onMessage Runtime Exception
Sample Message-Driven Bean XML Files
Sample ejb-jar.xml File
Sample sun-ejb-jar.xml File
Handling Transactions with Enterprise Beans
Flat Transactions
Global and Local Transactions
Commit Options
Administration and Monitoring
Chapter 7 Using Container-Managed Persistence for Entity Beans
Sun Java System Application Server Support
Container-Managed Persistence Mapping
Mapping Capabilities
The Mapping Deployment Descriptor File
Mapping Considerations
Join Tables and Relationships
Automatic Primary Key Generation
Fixed Length CHAR Primary Keys
Managed Fields
BLOB Support
CLOB Support
Automatic Schema Generation
Supported Data Types
Generation Options
Schema Capture
Automatic Database Schema Capture
Using the capture-schema Utility
Configuring the CMP Resource
Configuring Queries for 1.1 Finders
About JDOQL Queries
Query Filter Expression
Query Parameters
Query Variables
JDOQL Examples
Example 1
Example 2
Example 3
Performance-Related Features
Version Column Consistency Checking
To use version consistency
Relationship Prefetching
Read-Only Beans
Restrictions and Optimizations
Eager Loading of Field State
Restrictions on Remote Interfaces
Sybase Finder Limitation
Date and Time Fields as CMP Field Types
No Support for lock-when-loaded on Sybase and DB2
Set RECURSIVE_TRIGGERS to false on MSSQL
Chapter 8 Developing Java Clients
Introducing the Application Client Container
Security
Naming
Developing Clients Using the ACC
To access an EJB component from an application client
To access a JMS resource from an application client
Running an Application Client Using the ACC
Packaging an Application Client Using the ACC
Editing the Configuration File
Editing the appclient Script
Editing the sun-acc.xml File
Setting Security Options
To use the package-appclient script bundled with the Application Server
client.policy
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
Chapter 9 Developing Connectors
Connector 1.5 Support in the Application Server
Connector Architecture for JMS and JDBC
Connector Configuration
Deploying and Configuring a Stand-Alone Connector Module
To deploy and configure a stand-alone connector module
Redeploying a Stand-Alone Connector Module
Deploying and Configuring an Embedded Resource Adapter
Advanced Connector Configuration Options
Thread Pools
Security Maps
Overriding Configuration Properties
Testing a Connection Pool
Handling Invalid Connections
Setting the Shutdown Timeout
Using Last Agent Optimization of Transactions
Inbound Communication Support
Configuring a Message Driven Bean to Use a Resource Adapter
Example Resource Adapter for Inbound Communication
Chapter 10 Developing Lifecycle Listeners
Server Life Cycle Events
The LifecycleListener Interface
The LifecycleEvent Class
The Server Lifecycle Event Context
Deploying a Lifecycle Module
Considerations for Lifecycle Modules
Part III Using Services and APIs
Chapter 11 Using the JDBC API for Database Access
General Steps for Creating a JDBC Resource
Integrating the JDBC Driver
Supported Database Drivers
Making the JDBC Driver JAR Files Accessible
Creating a Connection Pool
Testing a Connection Pool
Creating a JDBC Resource
Creating Applications That Use the JDBC API
Sharing Connections
Obtaining a Physical Connection from a Wrapped Connection
Using Non-Transactional Connections
Using JDBC Transaction Isolation Levels
Configurations for Specific JDBC Drivers
PointBase Type 4 Driver
Sun Java System JDBC Driver for DB2 Databases
Sun Java System JDBC Driver for Oracle 8.1.7 and 9.x Databases
Sun Java System JDBC Driver for Microsoft SQL Server Databases
Sun Java System JDBC Driver for Sybase Databases
IBM DB2 8.1 Type 2 Driver
JConnect Type 4 Driver for Sybase ASE 12.5 Databases
Inet Oraxo JDBC Driver for Oracle 8.1.7 and 9.x Databases
Inet Merlia JDBC Driver for Microsoft SQL Server Databases
Inet Sybelux JDBC Driver for Sybase Databases
Oracle Thin Type 4 Driver for Oracle 8.1.7 and 9.x Databases
OCI Oracle Type 2 Driver for Oracle 8.1.7 and 9.x Databases
IBM Informix Type 4 Driver
MM MySQL Type 4 Driver
CloudScape 5.1 Type 4 Driver
Chapter 12 Using the Transaction Service
Transaction Resource Managers
Transaction Scope
Configuring the Transaction Service
Transaction Logging
Chapter 13 Using the Java Naming and Directory Interface
Accessing the Naming Context
Naming Environment for J2EE Application Components
Accessing EJB Components Using the CosNaming Naming Context
Accessing EJB Components in a Remote Application Server
Naming Environment for Lifecycle Modules
Configuring Resources
External JNDI Resources
Custom Resources
Mapping References
Chapter 14 Using the Java Message Service
The JMS Provider
Message Queue Resource Adapter
Administration of the JMS Service
Configuring the JMS Service
The Default JMS Host
Creating JMS Hosts
Checking Whether the JMS Provider Is Running
Creating Physical Destinations
Creating JMS Resources: Destinations and Connection Factories
Restarting the JMS Client After JMS Configuration
JMS Connection Features
Connection Pooling
Connection Failover
Load-Balanced Message Inflow
Transactions and Non-Persistent Messages
ConnectionFactory Authentication
Message Queue varhome Directory
Delivering SOAP Messages Using the JMS API
To send SOAP messages using the JMS API
To receive SOAP messages using the JMS API
Chapter 15 Using the JavaMail 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
Chapter 16 Using the Java Management Extensions (JMX) API
About AMX
AMX MBeans
Configuration MBeans
Monitoring MBeans
Utility MBeans
J2EE Management MBeans
Other MBeans
MBean Notifications
Access to MBean Attributes
Proxies
Connecting to the Domain Administration Server
Examining AMX Code Samples
Connecting to the DAS
Starting an Application Server
Deploying an Archive
Displaying the AMX MBean Hierarchy
Setting Monitoring States
Accessing AMX MBeans
Accessing and Displaying the Attributes of an AMX MBean
Listing AMX MBean Properties
Querying
Monitoring Attribute Changes
Undeploying Modules
Stopping an Application Server
Running the AMX Samples
Appendix A Deployment Descriptor Files
Sun Java System Application Server Descriptors
The sun-application.xml File
The sun-web.xml File
The sun-ejb-jar.xml File
The sun-cmp-mappings.xml File
The sun-application-client.xml file
The sun-acc.xml File
Alphabetical Listing of All Elements
A
activation-config
Superelements
Subelements
activation-config-property
Superelements
Subelements
activation-config-property-name
Superelements
Subelements
activation-config-property-value
Superelements
Subelements
as-context
Superelements
Subelements
auth-method
Superelements
Subelements
auth-realm
Superelements
Subelements
Attributes
Example
B
bean-cache
Superelements
Subelements
Example
bean-pool
Superelements
Subelements
Example
C
cache
Superelements
Subelements
Attributes
Properties
Cache Class Names
cache-helper
Superelements
Subelements
Attributes
cache-helper-ref
Superelements
Subelements
cache-idle-timeout-in-seconds
Superelements
Subelements
cache-mapping
Superelements
Subelements
call-property
Superelements
Subelements
caller-propagation
Superelements
Subelements
cert-db
Superelements
Subelements
Attributes
check-all-at-commit
Superelements
check-modified-at-commit
Superelements
Subelements
check-version-of-accessed-instances
Superelements
Subelements
checkpoint-at-end-of-method
Superelements
Subelements
checkpointed-methods
Superelements
class-loader
Superelements
Subelements
Attributes
client-container
Superelements
Subelements
Attributes
Properties
client-credential
Superelements
Subelements
Attributes
cmp
Superelements
Subelements
cmp-field-mapping
Superelements
Subelements
cmp-resource
Superelements
Subelements
cmr-field-mapping
Superelements
Subelements
cmr-field-name
Superelements
Subelements
cmt-timeout-in-seconds
Superelements
Subelements
column-name
Superelements
Subelements
column-pair
Superelements
Subelements
commit-option
Superelements
Subelements
confidentiality
Superelements
Subelements
consistency
Superelements
Subelements
constraint-field
Superelements
Subelements
Attributes
constraint-field-value
Superelements
Subelements
Attributes
context-root
Superelements
Subelements
cookie-properties
Superelements
Subelements
Properties
create-tables-at-deploy
Superelements
Subelements
D
database-vendor-name
Superelements
Subelements
default
Superelements
Subelements
default-helper
Superelements
Subelements
Properties
default-resource-principal
Superelements
Subelements
description
Superelements
Subelements
dispatcher
Superelements
Subelements
drop-tables-at-undeploy
Superelements
Subelements
E
ejb
Superelements
Subelements
Attributes
Example
ejb-name
Superelements
Subelements
ejb-ref
Superelements
Subelements
ejb-ref-name
Superelements
Subelements
endpoint-address-uri
Superelements
Subelements
Example
enterprise-beans
Superelements
Subelements
Example
entity-mapping
Superelements
Subelements
establish-trust-in-client
Superelements
Subelements
establish-trust-in-target
Superelements
Subelements
F
fetched-with
Superelements
Subelements
field-name
Superelements
Subelements
finder
Superelements
Subelements
flush-at-end-of-method
Superelements
Subelements
G
gen-classes
Superelements
Subelements
group-name
Superelements
Subelements
H
http-method
Superelements
Subelements
I
idempotent-url-pattern
Superelements
Subelements
Attributes
Example
integrity
Superelements
Subelements
ior-security-config
Superelements
Subelements
is-cache-overflow-allowed
Superelements
is-one-one-cmp
Superelements
is-read-only-bean
Superelements
Subelements
J
java-method
Superelements
Subelements
jms-durable-subscription-name
Superelements
Subelements
jms-max-messages-load
Superelements
Subelements
jndi-name
Superelements
Subelements
jsp-config
Superelements
Subelements
Properties
K
key-field
Superelements
Subelements
Attributes
L
level
Superelements
Subelements
local-home-impl
Superelements
Subelements
local-impl
Superelements
Subelements
locale-charset-info
Superelements
Subelements
Attributes
locale-charset-map
Superelements
Subelements
Attributes
Example Agents
localpart
Superelements
Subelements
lock-when-loaded
Superelements
Subelements
lock-when-modified
Superelements
log-service
Superelements
Subelements
Attributes
login-config
Superelements
Subelements
M
manager-properties
Superelements
Subelements
Properties
mapping-properties
Superelements
max-cache-size
Superelements
Subelements
max-pool-size
Superelements
Subelements
max-wait-time-in-millis
Superelements
mdb-connection-factory
Superelements
Subelements
mdb-resource-adapter
Superelements
Subelements
message
Superelements
Subelements
message-destination
Superelements
Subelements
message-destination-name
Superelements
Subelements
message-security
Superelements
Subelements
message-security-binding
Superelements
Subelements
Attributes
message-security-config
Superelements
Subelements
Attributes
method
Superelements
Subelements
method-intf
Superelements
Subelements
method-name
Superelements
Subelements
Examples
method-param
Superelements
Subelements
method-params
Superelements
Subelements
N
name
Superelements
Subelements
named-group
Superelements
Subelements
namespaceURI
Superelements
Subelements
none
Superelements
Subelements
O
one-one-finders
Superelements
Subelements
operation-name
Superelements
Subelements
P
parameter-encoding
Superelements
Subelements
Attributes
pass-by-reference
Superelements
Subelements
password
Superelements
Subelements
pm-descriptors
Superelements
pool-idle-timeout-in-seconds
Superelements
Subelements
port-component-name
Superelements
Subelements
port-info
Superelements
Subelements
prefetch-disabled
Superelements
Subelements
principal
Superelements
Subelements
principal-name
Superelements
Subelements
property (with attributes)
Superelements
Subelements
Attributes
Example
property (with subelements)
Superelements
Subelements
Example
provider-config
Superelements
Subelements
Attributes
Q
query-filter
Superelements
Subelements
query-method
Superelements
Subelements
query-ordering
Superelements
Subelements
query-params
Superelements
Subelements
query-variables
Superelements
Subelements
R
read-only
Superelements
Subelements
realm
Superelements
Subelements
refresh-field
Superelements
Subelements
Attributes
refresh-period-in-seconds
Superelements
Subelements
removal-timeout-in-seconds
Superelements
Subelements
remote-home-impl
Superelements
Subelements
remote-impl
Superelements
Subelements
request-policy
Superelements
Subelements
Attributes
request-protection
Superelements
Subelements
Attributes
required
Superelements
Subelements
res-ref-name
Superelements
Subelements
resize-quantity
Superelements
Subelements
resource-adapter-mid
Superelements
Subelements
resource-env-ref
Superelements
Subelements
Example
resource-env-ref-name
Superelements
Subelements
resource-ref
Superelements
Subelements
Example
response-policy
Superelements
Subelements
Attributes
response-protection
Superelements
Subelements
Attributes
role-name
Superelements
Subelements
S
sas-context
Superelements
Subelements
schema
Superelements
Subelements
Examples
schema-generator-properties
Superelements
Subelements
Properties
Example
secondary-table
Superelements
Subelements
security
Superelements
Subelements
security-role-mapping
Superelements
Subelements
service-endpoint-interface
Superelements
Subelements
service-impl-class
Superelements
Subelements
service-qname
Superelements
Subelements
service-ref
Superelements
Subelements
service-ref-name
Superelements
Subelements
servlet
Superelements
Subelements
servlet-impl-class
Superelements
Subelements
servlet-name
Superelements
Subelements
session-config
Superelements
Subelements
session-manager
Superelements
Subelements
Attributes
session-properties
Superelements
Subelements
Properties
ssl
Superelements
Subelements
Attributes
steady-pool-size
Superelements
Subelements
store-properties
Superelements
Subelements
Properties
stub-property
Superelements
Subelements
Example
sun-application
Superelements
Subelements
sun-application-client
Superelements
Subelements
sun-cmp-mapping
Superelements
Subelements
sun-cmp-mappings
Superelements
Subelements
sun-ejb-jar
Superelements
Subelements
sun-web-app
Superelements
Subelements
Attributes
Properties
T
table-name
Superelements
Subelements
target-server
Superelements
Subelements
Attributes
tie-class
Superelements
Subelements
timeout
Superelements
Subelements
Attributes
transport-config
Superelements
Subelements
transport-guarantee
Superelements
Subelements
U
unique-id
Superelements
Subelements
url-pattern
Superelements
Subelements
use-thread-pool-id
Superelements
Subelements
V
value
Superelements
Subelements
victim-selection-policy
Superelements
Subelements
Example
W
web
Superelements
Subelements
web-uri
Superelements
Subelements
webservice-description
Superelements
Subelements
webservice-description-name
Superelements
Subelements
webservice-endpoint
Superelements
Subelements
wsdl-override
Superelements
Subelements
Example
wsdl-port
Superelements
Subelements
wsdl-publish-location
Superelements
Subelements
Example
© 2010, Oracle Corporation and/or its affiliates