Index Next |
iPlanet Application Server Developer's Guide |
Contents
Preface
Chapter 1 Developing ApplicationsApplication Requirements
About the Application Programming Model
The Presentation Layer
Effective iPlanet Application Guidelines
Servlets
The Business Logic Layer
JSPs
HTML Pages
Client-Side JavaScript
Session Beans
The Data Access Layer
Entity Beans
Message Driven Beans
Presenting Data with Servlets and JSPs
Creating Reusable Application Code
Improving Performance
Scalability Planning
Modularizing Applications
Functional Isolation
Reusable Code
Prepackaged Components
Unique Names
Shared Framework Classes
Session and Security Issues
Chapter 2 Controlling Applications with ServletsAbout Servlets
Servlet Data Flow
About the Server Engine
Servlet Types
Instantiating and Removing Servlets
Designing Servlets
Request Handling
Allocating Servlet Engine Resources
Dynamically Reloading Servlets at Runtime
Configuring Servlets for Deployment
Locating Servlet Files
Deploying Servlets
Choosing a Servlet Type
Creating Servlets
Create Standard or Non-Standard Servlets
Planning for Servlet Reuse
Servlet Files for an iPlanet Application
The Servlet's Class File
Invoking Servlets
Creating the Class Declaration
The Servlet's Deployment Descriptor
Overriding Methods
Accessing Parameters and Storing Data
Handling Sessions and Security
Accessing Business Logic Components
Handling Threading Issues
Delivering Client Results
Elements
iPlanet Application Server Optional Features
Changing Configuration Files
Calling a Servlet With a URL
Invoking Specific Application Servlets
Calling a Servlet Programmatically
Invoking Generic Application Servlets
Verifying Servlet Parameters
Chapter 3 Presenting Application Pages with JavaServer PagesIntroducing JSPs
How JSPs Work
Designing JSPs
Choosing a Component
Creating JSPs
Designing for Ease of Maintenance
Designing for Portability
Handling Exceptions
General Syntax
Programming Advanced JSPs
JSP Tags
Directives
Escape Characters
Comments
<%@ page%>
Example
<%@ include%>
<%@ taglib... %>
Scripting Elements
Declarations <%! ... %>
Actions
Expressions <%= ... %>
Scriptlets <%...%>
<jsp:useBean>
Implicit Objects
<jsp:setProperty>
<jsp:getProperty>
<jsp:include>
<jsp:forward>
<jsp:plugin>
Including Other Resources
Deploying JSPs
Using JavaBeans
Accessing Business Objects
Unregistered JSPs
Invoking JSPs
Registered JSPs
Calling a JSP With a URL
JSP 1.1 Tag Summary
Invoking JSPs in a Specific Application
Invoking a JSP From a Servlet
Invoking JSPs in a Generic Application
Directives
Modifying Custom Tags for JSP 1.1
Expressions
Scriptlets
Comments
Bean-Related Actions
Other Actions
Compiling JSPs: The Command-Line Compiler
Value-added Features
Custom Tag Extensions
Database Query Tag Library
JSP Load Balancing
LDAP Tag Library
Conditional Tag Library
Attribute Tag Library
JSP Page Caching
Chapter 4 Introducing Enterprise JavaBeansWhat Enterprise JavaBeans Do
What is an Enterprise JavaBean?
Understanding Client Contracts
Understanding Enterprise Beans
Understanding Component Contracts
Understanding JAR File Contracts
Understanding Session Beans
EJB Role in an iPlanet Application Server Application
Understanding Entity Beans
Understanding Message Driven Beans
MDB Properties
Designing an Object-Oriented Application
Planning Guidelines
Using the ejbc Compiler
Using Session Beans
Using Entity Beans
Planning for Failover Recovery
Working with Databases
Deploying EJBs
Dynamically Reloading EJBs
Using JNDI to Reference an EJB
Chapter 5 Using Session EJBs to Manage Business RulesIntroducing Session EJBs
Session Bean Components
Creating the Remote Interface
Additional Session Bean Guidelines
Declaring vs. Implementing the Remote Interface
Creating the Class Definition
Session Timeout
Creating the Home Interface
Passivation and Activation
Creating Stateless or Stateful Beans
Accessing iPlanet Application Server Functionality
Serializing Handles and References
Managing Transactions
Accessing Databases
Session Bean Failover
How to Configure a Stateful Bean with Failover
How the Failover Process Works
Failover Guidelines
How Often Is the State Saved?
How the State Is Saved
Chapter 6 Building Entity EJBsIntroducing Entity EJBs
How an Entity Bean is Accessed
Entity Bean Components
Creating the Class Definition
Additional Entity Bean Guidelines
Using ejbActivate and ejbPassivate
Creating the Home Interface
Using ejbLoad and ejbStore
Using setEntityContext and unsetEntityContext
Using ejbCreate Methods
Using Finder Methods
Declaring vs. Implementing the Remote Interface
Defining Create Methods
Creating the Remote Interface
Defining Find Methods
Accessing iPlanet Application Server Functionality
Container Managed Persistence
Serializing Handles and References
Managing Transactions
Committing a Transaction
Commit Option C
Handling Concurrent Access
Full J2EE Support
Third Party O/R Mapping Tools
Full Example of a CMP Entity Bean
Using the Lightweight CMP Implementation
Creating the Deployment Descriptors by Hand
ejb-jar Deployment Descriptor
Using the Deployment Tool
ias-ejb-jar Deployment Descriptor
CMP Bean Deployment Descriptor
Chapter 7 Using Message Driven BeansIntroducing Message Driven Beans
How a Message Driven Bean is Accessed
Components of Message Driven Beans
Creating the Class Definition
Message Driven Bean Guidelines
Accessing iPlanet Application Server Functionality
Managing Transactions
Using the Deployment Tool
Committing a Transaction
Accessing Databases
Creating the Deployment Descriptors by Hand
J2EE Specific Deployment Descriptor Fields
Message Driven Bean Specific Parameters
Sample Deployment Descriptor File
Chapter 8 Handling Transactions with EJBsUnderstanding the Transaction Model
Specifying Transaction Attributes in an EJB
Using Bean Managed Transactions
Chapter 9 Using JDBC for Database AccessIntroducing JDBC
Supported Functionality
Migrating 6.x DD XML files to 6.5
Understanding Database Limitations
Understanding the iPlanet Application Server Limitations
Supported Databases
To Migrate 6.x Deployment Descriptor XML File
New XML Datasource Descriptors
Local Transactions
Using JDBC in Server Applications
Oracle
Global Transactions
Sybase
DB2
MSSQL
Oracle
Sequelink
Sybase
Using JDBC in EJBs
Handling Connections
Managing Transactions with JDBC or javax.transaction.UserTransaction
Using JDBC in Servlets
Specifying Transaction Isolation Level
Local Connections
Working with JDBC Features
Registering a Local Datasource
Global Connections
Registering a Global Datasource
Container Managed Local Connections
Creating a Global Connection
Registering a Container Managed Local Datasource
Working with Connections
Pooling Connections
Working with ResultSet
Concurrency Support
Working with ResultSetMetaData
Updatable Result Set Support
Working with PreparedStatement
Working with CallableStatement
Handling Batch Updates
Creating Distributed Transactions
Working with RowSet
Using iASRowSet
Using JNDI for a Database Driver
Using CachedRowSet
Creating a RowSet
Chapter 10 Developing and Deploying CORBA-Based ClientsOverview of CORBA Client Support
Scenarios
RMI/IIOP Client Applications
Stand-Alone Program
Architectural Overview
Server-to-Server
iPlanet Value-Added Features
Naming Services
Limitations
C++ Client Support
Built-in ORB and Third Party ORB Support
Basic Authentication and EJB Container Integration
Client Side Authentication
Load Balancing
Scalability
High Availability
Minimal Ports Opened in Firewalls
Choosing the ORB
Developing RMI/IIOP Client Applications
C++ IIOP Client Applications (Unix Only)
JNDI Lookup for the EJB Home Interface
Packaging RMI/IIOP Client Applications
Client Authentication
Client-Side Load Balancing and Failover
Using the Assembly Tool GUI
Configuring RMI/IIOP Support
Automating Reassembly Using Ant
Using Application Client Container (ACC)
Server Configuration
Deploying RMI/IIOP Client Applications
Client Configuration
Client Deployment
Configuring RMI/IIOP Applications for ORBIX
Deployment Tools
Server CLASSPATH Setting (SP2 and Prior)
References
Running RMI/IIOP Client Applications
Configuration Steps
Enabling Security
Troubleshooting RMI/IIOP Client Applications
Performance Tuning RMI/IIOP
Load Testing Approaches
Recognizing Performance Issues
Firewall Configuration for RMI/IIOP
Basic Tuning Approaches
Enhancing Scalability
Viewing RMI/IIOP Log Messages
Monitoring Logs on Windows
Sample RMI/IIOP Applications
Monitoring Logs on UNIX
Converter Sample Application
Other RMI/IIOP Sample Applications
Configuring C++ IIOP Applications for ORBIX
Requirements
Preparing for C++ Client Development
References
Data Type Assumptions and Limitations
Generating the IDL Files
Using J2SE 1.4 rmic 2
Generating CPP Files from IDL Files
Using the OpenORB JavaToIDL Compiler
Enabling Security for C++ IIOP Applications
Lookup for the EJB Home Interface
Client-Side Load Balancing and Failover
Configuring the IIOP Bridge
Deploying C++ IIOP Client Applications
Client Deployment
Performance Tuning IIOP
Server CLASSPATH Setting (SP2 and Prior)
Basic Tuning Approaches
Viewing IIOP Log Messages
Enhancing Scalability
Sample C++ IIOP Applications
Redeploying the Converter Sample for Use with a C++ Client
Chapter 11 Packaging for DeploymentOverview of Packaging and Deployment
Modules
Assembling Modules and Applications
Applications
Naming Standards
Sample Files
Deploying Modules and Applications
Assembling WAR Modules
Using the Command Line Interface (CLI)
Assembling EJB JAR Applications
Using the Deployment Tool
Using the Visual Café Plug-in
Using the Command Line Interface (CLI)
Assembling RMI/IIOP Applications
Using the Deployment Tool
Deployment by Module
Introducing XML DTDs
Deployment by Application
Deploying RMI/IIOP Clients
Deploying Static Content
Tools for Deployment
The iasdeploy Command
General Rules About Deployment
The iPlanet Deployment Tool
The iPlanet Visual Café Plug-in
Redeploying an Application or Module
Deploying to an iPlanet Application Server Cluster
Access to Shared Frameworks
J2EE Standard Descriptors
Web Application XML DTD
Creating Deployment Descriptors
Document Type Definition
The iPlanet Application Server Registry
A Globally Unique Identifier
Web Application Overview
EJB XML DTD
Web Application XML DTD
Element for Specifying an iPlanet Application Server Web Application
EJB JAR File Contents
RMI/IIOP Client XML DTD
Specifying Parameter Passing Rules
EJB iPlanet Application Server XML DTD
Elements for Specifying EJB-JAR
Elements for Specifying Enterprise Beans
Elements for Specifying Persistence Manager
Elements for Specifying Pool Manager
Elements for Specifying EJB Reference
Elements for Specifying Resource Reference
Elements for Specifying Role Mapping
Elements for Specifying Role Implementation
iPlanet Application Server RMI/IIOP Client XML DTD
Resource XML DTD
Elements for Specifying EJB Reference Information
Elements for Specifying Resource Reference Information
Datasource XML DTD
Element for Specifying Datasources
RMI/IIOP Client Datasource XML DTD
Element for Specifying iPlanet Application Server Resources
Elements for Specifying Resources
Elements for Specifying JDBC Datasources
Elements for Specifying Java Client Resources
Elements for Specifying JDBC Settings
Chapter 12 Creating and Managing User SessionsIntroducing Sessions
Sessions and Cookies
How to Use Sessions
Sessions and URL Rewriting
Supported Tags and Attributes
Sessions and Security
The URL Rewriting Process
The Location Header
Order of the Cookies
Creating or Accessing a Session
Examining Session Properties
Binding Data to a Session
Invalidating a Session
Controlling the Session Type
Sharing Sessions in a Distributed Environment
Sharing Sessions with AppLogics
Chapter 13 Writing Secure ApplicationsiPlanet Application Server Security Goals
iPlanet Application Server Specific Security Features
iPlanet Application Server Security Model
Web Client and URL Authorizations
Security Responsibilities Overview
Web Client Invocation of Enterprise Bean Methods
RMI/IIOP Client Invocation of Enterprise Bean Methods
Application Developer
Common Security Terminology
Application Assembler
Application Deployer
Authentication
Container Security
Authorization
Role Mapping
Programmatic Security
User Authentication by Servlets
Declarative Security
Application Level Security
Servlet Level Security
EJB Level Security
HTTP Basic Authentication
User Authorization by Servlets
Secure Socket Layer Mutual Authentication
Form-Based Login
Programmatic Login
Form-Based vs. Programmatic Login
The IProgrammaticLogin Interface
The WebProgrammaticLogin Class
The EjbProgrammaticLogin Class
Defining Roles
User Authorization by EJBs
Referencing Security Roles
Defining Method Permissions
Sample Web Application DD
Defining Roles
User Authentication for Single Sign-on
Defining Method Permissions
Security Role References
How to Configure for Single Sign-on
User Authentication for RMI/IIOP Clients
Single Sign-on Example
Guide to Security Information
User Information
Web Server to Application Server Component Security
Security Roles
Chapter 14 Taking Advantage of the iPlanet Application Server FeaturesCaching Servlet Results
Using a Startup Class
The IStartupClass Interface
Building the Startup Class
Deploying the Startup Class
How kjs Handles the StartupClass Object
Appendix A Using the Java Message ServiceAbout the JMS API
JMS Messaging Styles
Enabling JMS and Integrating Providers
Using JMS in Applications
JNDI and Application Component Deployment
JMS Administration
Connection Factory Proxy
Connection Pooling
User Identity Mapping
About Default Username
About Explicit User ID Map
ConnectionFactoryProxies and Application Created Threads
JMS Features Not Supported
JMS Object Administration Tools
Sample Applications
JNDI Properties for JMS Administration Tools
JMS Object Administration for IBM MQ
Connection Factory Proxy Administration
Creating a Proxy
Deleting a Proxy
Listing Proxy Parameters
User ID Map Administration
Connection Pooling Configuration
Default JMS Provider
Appendix B Runtime ConsiderationsRuntime Environments
Standard Module Runtime Environment
The Classloader Hierarchy
Application Runtime Environment
Dynamic Reloading
Enabling Dynamic Reloading
Using Administration Tool
Dynamic Reloading of Servlets and JSPs
Modifying the Registry
Dynamic Reloading of EJBs
Limitations of Dynamic Reloading
Appendix C Sample Deployment FilesApplication DD XML Files
Glossary
Sample Application DD XML File
Web Application DD XML Files
Sample Web Application DD XML File
EJB-JAR DD XML Files
Sample iPlanet Application Server Web-App DD XML File
Sample J2EE EJB-JAR DD XML File
iPlanet Application Server Client DD XML Files
Sample iPlanet Application Server EJB-JAR DD XML File
RMI/IIOP Client DD XML Files
Resource DD XML Files
Index
Index Next
Copyright © 2002 Sun Microsystems, Inc. All rights reserved.
Last Updated March 06, 2002