Index     DocHome     Next     
iPlanet Application Server Developer's Guide (Java)



Contents


Preface

Chapter 1 Developing Applications
Application Requirements
About the Application Programming Model
The Presentation Layer
Servlets
JSPs
HTML Pages
Client-Side JavaScript
The Business Logic Layer
Session Beans
Entity Beans
The Data Access Layer
Effective iPlanet Application Guidelines
Presenting Data with Servlets and JSPs
Creating Reusable Application Code
Improving Performance
Scalability Planning


Chapter 2 Controlling Applications with Servlets
About Servlets
Servlet Data Flow
Servlet Types
About the Server Engine
Instantiating and Removing Servlets
Request Handling
Allocating Servlet Engine Resources
Dynamically Reloading Servlets at Runtime
Configuring Servlets for Deployment
Locating Servlet Files
Deploying Servlets
Designing Servlets
Choosing a Servlet Type
Create Standard or Non-Standard Servlets
Planning for Servlet Reuse
Creating Servlets
Servlet Files for an iPlanet Application
The Servlet's Class File
Creating the Class Declaration
Overriding Methods
Accessing Parameters and Storing Data
Handling Sessions and Security
Accessing Business Logic Components
Handling Threading Issues
Delivering Client Results
The Servlet's Deployment Descriptor
Elements
Changing Configuration Files
iPlanet Application Server Optional Features
Invoking Servlets
Calling a Servlet With a URL
Invoking Specific Application Servlets
Invoking Generic Application Servlets
Calling a Servlet Programmatically
Verifying Servlet Parameters


Chapter 3 Presenting Application Pages with JavaServer Pages
Introducing JSPs
How JSPs Work
Designing JSPs
Choosing a Component
Designing for Ease of Maintenance
Designing for Portability
Handling Exceptions
Creating JSPs
General Syntax
JSP Tags
Escape Characters
Comments
Directives
<%@ page%>
<%@ include%>
<%@ taglib... %>
Scripting Elements
Declarations <%! ... %>
Expressions <%= ... %>
Scriptlets <%...%>
Actions
<jsp:useBean>
<jsp:setProperty>
<jsp:getProperty>
<jsp:include>
<jsp:forward>
<jsp:plugin>
Implicit Objects
Programming Advanced JSPs
Including Other Resources
Using JavaBeans
Accessing Business Objects
Deploying JSPs
Unregistered JSPs
Registered JSPs
Invoking JSPs
Calling a JSP With a URL
Invoking JSPs in a Specific Application
Invoking JSPs in a Generic Application
Invoking a JSP From a Servlet
JSP 1.1 Tag Summary
Directives
Expressions
Scriptlets
Comments
Bean-Related Actions
Other Actions
Modifying Custom Tags for JSP 1.1
Compiling JSPs: The Command-Line Compiler
Value-added Features
Custom Tag Extensions
Database Query Tag Library
LDAP Tag Library
Conditional Tag Library
Attribute Tag Library
JSP Load Balancing
JSP Page Caching


Chapter 4 Introducing Enterprise JavaBeans
What Enterprise JavaBeans Do
What is an Enterprise JavaBean?
Understanding Client Contracts
Understanding Component Contracts
Understanding JAR File Contracts
Session Beans and Entity Beans
Understanding Session Beans
Understanding Entity Beans
EJB Role in an iPlanet Application Server Application
Designing an Object-Oriented Application
Planning Guidelines
Using Session Beans
Using Entity Beans
Planning for Failover Recovery
Working with Databases
Deploying EJBs
Dynamically Reloading EJBs


Chapter 5 Using Session EJBs to Manage Business Rules
Introducing Session EJBs
Session Bean Components
Creating the Remote Interface
Declaring vs. Implementing the Remote Interface
Creating the Class Definition
Session Timeout
Passivation and Activation
Creating the Home Interface
Additional Session Bean Guidelines
Creating Stateless or Stateful Beans
Accessing iPlanet Application Server Functionality
Serializing Handles and References
Managing Transactions
Committing a Transaction
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 EJBs
Introducing Entity EJBs
How an Entity Bean is Accessed
Entity Bean Components
Creating the Class Definition
Using ejbActivate and ejbPassivate
Using ejbLoad and ejbStore
Using setEntityContext and unsetEntityContext
Using ejbCreate Methods
Using Finder Methods
Declaring vs. Implementing the Remote Interface
Creating the Home Interface
Defining Create Methods
Defining Find Methods
Creating the Remote Interface
Additional Entity Bean Guidelines
Accessing iPlanet Application Server Functionality
Serializing Handles and References
Managing Transactions
Committing a Transaction
Commit Option C
Handling Concurrent Access
Accessing Databases
Container Managed Persistence
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
ias-ejb-jar Deployment Descriptor
CMP Bean Deployment Descriptor
Using the Deployment Tool


Chapter 7 Handling Transactions with EJBs
Understanding the Transaction Model
Specifying Transaction Attributes in an EJB
Using Bean Managed Transactions


Chapter 8 Using JDBC for Database Access
Introducing JDBC
Supported Functionality
Understanding Database Limitations
Understanding the iPlanet Application Server Limitations
Supported Databases
Using JDBC in Server Applications
Using JDBC in EJBs
Managing Transactions with JDBC or javax.transaction.UserTransaction
Specifying Transaction Isolation Level
Using JDBC in Servlets
Handling Connections
Local Connections
Registering a Local Datasource
Global Connections
Using Resource Managers
Registering a Global Datasource
Creating a Global Connection
Container Managed Local Connections
Registering a Container Managed Local Datasource
Working with JDBC Features
Working With Connections
Pooling Connections
Working with ResultSet
Concurrency Support
Updatable Result Set Support
Working with ResultSetMetaData
Working with PreparedStatement
Working with CallableStatement
Handling Batch Updates
Creating Distributed Transactions
Working with RowSet
Using iASRowSet
Using CachedRowSet
Creating a RowSet
Using JNDI


Chapter 9 Developing and Deploying RMI/IIOP-Based Clients
Overview of RMI/IIOP Support
Scenarios
Stand-Alone Java Main Program
Server-to-Server
Architectural Overview
iPlanet Value-Added Features
Naming Services
Built-in ORB
Basic Authentication and EJB Container Integration
Server-Side Load Balancing
Scalability
High Availability
Minimal Ports Opened in Firewalls
Limitations
Developing RMI/IIOP Client Applications
JNDI Lookup for the EJB Home Interface
Specifying the Naming Factory Class
Specifying the Target RMI/IIOP Bridge
Specifying the JNDI Name of an EJB
A JNDI Example
Client Authentication
Sample Principal Class
Client-Side Load Balancing and Failover
Manual Selection from the List of Known Bridges
Round Robin DNS
Packaging RMI/IIOP Client Applications
Using the Assembly Tool GUI
Automating Reassembly Using Ant
Using Application Client Container (ACC)
Configuring RMI/IIOP Support
Server Configuration
Client Configuration
Configuring a Java 2 Environment and iPlanet ORB
Installing RMI/IIOP Client Support Classes
Deploying Client Applications
Client Deployment
Deployment Tools
Server CLASSPATH Setting (SP2 and Prior)
Running Client Applications
Troubleshooting
Performance Tuning RMI/IIOP
Recognizing Performance Issues
Basic Tuning Approaches
Solaris File Descriptor Setting
Java Heap Settings
Enhancing Scalability
Firewall Configuration for RMI/IIOP
Viewing RMI/IIOP Log Messages
Monitoring Logs on Windows
Monitoring Logs on UNIX
Sample Applications
Converter Sample Application
Other RMI/IIOP Sample Applications


Chapter 10 Deployment Packaging
Overview of Packaging and Deployment
Introducing XML DTDs
Application Deployment Descriptor
Component Deployment Descriptors
Creating Deployment Descriptors
Deployment Descriptors
Document Type Definition
The iPlanet Application Server Registry
A Globally Unique Identifier
Application XML DTD
J2EE Application DTD
iPlanet Application Server Application DTD
Sample Application XML DD File
Web Application XML DTD
Web Application Overview
Web Application XML DTD
Element for Specifying an iPlanet Application Server Web Application
EJB XML DTD
EJB JAR File Contents
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 Roll Implementation
RMI/IIOP Client XML DTD
iPlanet Application Server RMI/IIOP Client XML DTD
Elements for Specifying EJB Reference Information
Elements for Specifying Resource Reference Information
Resource XML DTD
Datasource XML DTD
Element for Specifying Datasources
Element for Specifying iPlanet Application Server Resources
Elements for Specifying Resources
Elements for Specifying JDBC Datasources
RMI/IIOP Client Datasource XML DTD
Elements for Specifying Java Client Resources
Elements for Specifying JDBC Settings


Chapter 11 Creating and Managing User Sessions
Introducing Sessions
Sessions and Cookies
Sessions and Security
How to Use Sessions
Creating or Accessing a Session
Examining Session Properties
Binding Data to a Session
Invalidating a Session
Controlling the Session Type
Sharing Sessions with AppLogics


Chapter 12 Writing Secure Applications
iPlanet Application Server Security Goals
iPlanet Application Server Specific Security Features
iPlanet Application Server Security Model
Web Client and URL Authorizations
Web Client Invocation of Enterprise Bean Methods
RMI/IIOP Client Invocation of Enterprise Bean Methods
Security Responsibilities Overview
Application Developer
Application Assembler
Application Deployer
Common Security Terminology
Authentication
Authorization
Role Mapping
Container Security
Programmatic Security
Declarative Security
Application Level Security
Servlet Level Security
EJB Level Security
User Authentication by Servlets
HTTP Basic Authentication
Secure Socket Layer Mutual Authentication
Form-Based Login
Programmatic Login
Form-Based vs. Programmatic Login
The IProgrammaticLogin Interface
The WebProgrammaticLogin Class
The EjbProgrammaticLogin Class
User Authorization by Servlets
Defining Roles
Referencing Security Roles
Defining Method Permissions
Sample Web Application DD
User Authorization by EJBs
Defining Roles
Defining Method Permissions
Security Role References
User Authentication for Single Sign-on
How to Configure for Single Sign-on
Single Sign-on Example
User Authentication for RMI/IIOP Clients
Guide to Security Information
User Information
Security Roles
Web Server to Application Server Component Security


Chapter 13 Taking Advantage of the iPlanet Application Server Features
Accessing the Servlet Engine
Accessing the Servlet's AppLogic
Accessing the Server Context
Caching 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 Service
About the JMS API
JMS Messaging Styles
Enabling JMS and Integrating Providers
Using JMS in Applications
JNDI and Application Component Deployment
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 Administration
JMS Object Administration Tools
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
Sample Applications
JMS Future in the iPlanet Application Server
Default JMS Provider
Message Driven Enterprise Java Beans
Using JMS in distributed transactions


Appendix B Dynamic Reloading

Appendix C Sample Deployment Files
Application DD XML Files
Sample Application DD XML File
Web Application DD XML Files
Sample Web Application DD XML File
Sample iPlanet Application Server Web-App DD XML File
EJB-JAR DD XML Files
Sample J2EE EJB-JAR DD XML File
Sample iPlanet Application Server EJB-JAR DD XML File
iPlanet Application Server Client DD XML Files
RMI/IIOP Client DD XML Files
Resource DD XML Files
Glossary

Index


Index     DocHome     Next     
Copyright © 2001 Sun Microsystems, Inc. Some preexisting portions Copyright © 2001 Netscape Communications Corp. All rights reserved.

Last Updated June 14, 2001