1. Introduction to Rational Application Developer (RAD) v7.0
|
|
- Objectives
- The RAD 7 Product
- Eclipse Platform
- Rational Web Developer
- Rational Application Developer
- Key Features in RAD v7.0
- Views, Perspective, and Editor Areas
- Basic Operations with RAD Views and Perspectives
- The Java Perspective
- The Debug Perspective
- Navigator View
- Package Explorer
- Outline View
- Task and Problems View
- Build and Validation
- Import and Export Project
- Code Completion, Templates and Snippets
- Searching
- Setup Compiler Class Path
- JRE Switching
- Refactoring
- Changing Class Name
- Changing Method Name
- Changing Variable Name
- Moving a Class to a Different Package
- Extracting Code to a Method
- Pull Up and Push Down Methods
- Migrating Workspace from RAD v6
- Project Interchange Feature
- Migrating J2EE Applications
- J2EE Migration Wizard
- Summary
|
|
2. J2EE Overview
|
|
- Introduction
- Why Do We Need J2EE?
- J2EE Components
- J2EE Technologies
- Useful J2SE Technologies
- Application Artifacts
- J2EE Architecture
- J2EE 1.4 Version Levels
- J2EE Software Packaging
- Deployment Descriptor
- Enterprise Archive (EAR)
- Web Modules and WAR
- EJB Modules
- Building Module Dependency
- Objectives
- Project Explorer
- Servers View
- The J2EE Perspective
- The Web Perspective
- Create an Enterprise Application
- Setup Utility JAR
- Create an EJB Project
- Create a Web Project
- Setup Dependent JAR Files
- Create Server Instance and Server Configuration
- Configure Server Instance
- Add an Enterprise Application Project to the Test Server
- Start and Stop the Server
- Test a Servlet
- Debug a servlet
- Test a JSP
- Debug a JSP
- Summary
|
|
3. Servlet Basics
|
|
- Objectives
- History CGI
- Server Extension APIs
- Java Servlet
- Servlet Container
- Servlet Responsibilities
- J2EE and Servlet
- The Servlet Class
- The HttpServlet Class
- An Example Hello World
- The Servlet Container
- The Servlet API
- Life Cycle Initialization
- Example Initialization
- Life Cycle Processing
- Life Cycle Destroy
- User Input
- Example User Input
- Output to Client
- Servlet Error Handling
- Threading Issues
- Create a Servlet in RAD
- Code Servlet Methods
- The Web Deployment Descriptor
- Test the Servlet
- Debug Servlets in the WebSphere Test Environment
|
|
4. JavaServer Page (JSP) Basics
|
|
- Objectives
- JavaServer Pages
- A Simple Example - Hello.jsp
- JSP Benefits
- Evolution of Dynamic Content Technologies
- How JSP Works
- JSP Invocation
- JSP Scripting Elements
- The XML Syntax
- JSP Directive
- page Directive Attributes
- page Directive an Example
- page Attribute errorPage
- page Attribute isErrorPage
- Using XML Syntax
- Directives include
- Include an Example
- Include at compile time vs. at request time
- Request time inclusion
- JSP Declarations
- Declarations an Example
- JSP Expressions
- JSP Expressions an Example
- JSP Scriptlets
- JSP Scriptlets an Example
- JSP Comments
- JSP Predefined Variables
- The request Object
- The response Object
- The out Object
- Out an Example
- Creating a JSP With RAD
- Editing a JSP With RAD
- Testing a JSP With WSAD
- Debugging a JSP With RAD
|
|
5. Servlet Interaction Interface
|
|
- Objectives
- Request
- Request Parameters
- Request Attributes
- Request Headers
- Request Path
- Other Request Information
- Response
- Cookies
- Setting Cookies
- Servlet Context
- Servlet Context Attributes
- Resource
- Session Tracking
- Tracking Techniques
- Cookies
- Cookies an Example
- HTML Hidden Fields
- Using HttpSession
- Session Invalidation
- An Example of Session Tracking Code...
- HttpSession - URL Rewriting
- Summary
|
|
6. Servlet Programming Advanced
|
|
- Objectives
- Key Issues for Web Application Development Productivity
- Web Application Programming Model MVC
- Model
- View
- Controller
- What is JDBC?
- JDBC Architecture
- JDBC: Basic Steps
- Loading a Driver
- DB2 UDB JDBC Drivers
- Oracle JDBC Drivers
- Create a Connection
- Connection
- Statement
- PreparedStatement
- ResultSet
- Example JDBC Servlet With Transactions
- Close the Connection
- Need for Connection Pooling
- Connection Pooling in JDBC 2.0
- Connection Pooling
- Basic Steps in Using JDBC Connection Pooling
- Access a DataSource
- Get a Connection
- Release Connections
- Connection Pool Example
- Resource References
- JavaBeans
- MVC Implementation
- Request Dispatching
- Request Dispatching - Forward vs. Include
- HTTP Redirection
- Dispatch vs. redirection
- Integrating Servlet and JSP
- Calling a JSP from a Servlet
- Request Dispatching - forward Request to JSP
- Supply Result information to the JSP
- A Simple Example
- Display JavaBean Properties in JSP
|
|
7. Using Java Beans with JSP
|
|
- Objectives
- What is a JavaBean?
- Structure of a JavaBean
- Life Cycle
- Properties
- Very Simple Bean
- Using Java Beans in JSP
- The <jsp:useBean> tag
- Java Bean scope
- <jsp:useBean> in Action
- The <jsp:getProperty> tag
- The <jsp:setProperty> tag
- Mapping all the request parameters
- Another Example
- Mixing Scriptlets and Bean tags
|
|
8. JSP Expression Language and Standard Tag Library
|
|
- JSP Expression Language (EL)
- Basic Usage
- Built-in Objects
- Working With Arrays and Maps
- Operators
- Full Example
- JSP Standard Tag Library (JSTL 1.1)
- JSP Standard Tag Library (JSTL 1.0)
- Run Time Version (JSTL 1.0)
- Basic Tags
- Condition Tags
- Interator Tags
- Internationalization (I18N)
- Setting Preferred Locale
- Specifying Resource Bundle
- Display Translated Text
- Display Number
- Display Date
- JDBC Tags
- Specify Data Source
- Performing a Query
- Display Result
- Pagination Example
|
|
9. Enterprise JavaBean (EJB) Overview
|
|
- Objectives
- Needs for EJB
- Distributed Computing
- Distributed Transaction
- Distributed Security
- What are EJBs?
- Main Characteristics of EJBs
- EJB Remote Method Call
- EJB Architecture Components
- EJB Client
- EJB JAR File
- EJB Server
- EJB Container
- EJB Container - Persistence
- EJB Container - Transaction
- Enterprise Java Beans
- Session Beans
- Entity Beans
- EJB Classes and Interfaces
- Basic Components of Entity and Session Beans
- EJB Home Interface
- An EJB Home Interface Example
- EJBHome Object
- EJB Remote Interface
- Remote Interface Example
- EJB Local Home Interface
- EJB Local Interface
- Remote EJB Objects
- Local EJB Objects
- EJB Implementation Class
- Remote v. Local EJBs
- EJB Application Development
- Deploying Enterprise Beans
- Major Components of Deployed EJBs
- Summary
|
|
10. Session Bean
|
|
- Objectives
- Session Beans
- Stateless Session Bean
- Stateful Session Bean
- Components of Session Beans
- Home Interfaces
- Remote Interface
- Local Interface
- Service Endpoint Interface (SEI)
- The Session Bean Class
- ejbCreate() Method
- Business Methods
- A Simple Stateless Session Bean Example
- A Simple Stateful Session Bean Example
- Registering Artifacts in ejb-jar.xml
- Session Context
- EJB Context
- EJB Context
- Session Bean Lifecycle
- Lifecycle - Stateless
- Lifecycle - Stateful
- Concurrency Issues
- Invoking Session Beans from Client Application
- Looking Up a Home Object
- EJB Reference
- Create an EJB Object
- Calling Business Methods
- IBM RAD for EJB Development
- Developing a Session Bean using RAD
- EJB Project in RAD
- Create an EJB Project
- Examine the EJB Project
- Create a Session Bean
- Code Methods
- Promote Methods to Interfaces
- Deploying EJBs
- EJB Deployment Descriptor
- Generating Deployed Code
- Run on Server
- JNDI Explorer
- Test the Home Interface
- Test the Component Interface
- EJB JAR File Structure
- EJB Client JAR File Structure
|
|
11. Entity Bean
|
|
- Objectives
- Entity Beans
- Persistence
- Entity Bean Components
- Container
- Container
- Container
- Primary Key Class
- A Primary Key Class Example
- (Remote) Home Interface
- Local Home Interface
- Remote Interface
- Local Interface
- Entity Bean Class
- Entity Instance
- Entity Object Lifecycle
- Bean Instance Lifecycle
- Bean Managed Persistence
- Container Managed Persistence
- Writing BMP Bean
- A BMP Bean Example
- Writing a CMP Bean
- Indicating Persistent Fields
- Writing a CMP Bean
- Writing a CMP Bean
- Example Bean Class
- Deployment Descriptor Settings
- Writing finder methods
- EJB Query Language
- EJBQL: Simple examples
- EJBQL: SELECT clause
- EJBQL: FROM clause
- EJBQL: WHERE clause
- EJBQL: Watch out!
- Using EJBQL in a CMP bean
- Business Methods
- EntityContext
- Writing CMP Beans
- Defining and Mapping CMP Fields
- Developing Entity Beans in RAD
- Adding a CMP Entity EJB
- EJB Deployment Descriptor
- Add an EJBQL Query
- Create a Physical Data Model
- Creating a Database Mapping
- Choosing a Backend
- Choosing a Mapping Type
- Specifying the Mapping
- EJB 2.0 Relationships
- WebSphere Extensions
|
|
12. J2EE Application Deployment
|
|
- Objectives
- Overview
- Generate Deployed Code
- Export EAR
- Separate Client Side Code
- Export EJB Client JAR
- Export Utility JAR
- J2EE Deployment
- Administrative Console
- Environment Variables
- Security
- Resources
- Creating JDBC Provider
- Creating Data Source
- WebSphere MQ JMS Configuration
- WebSphere MQ JMS Provider
- Connection Factory
- Destination
- Listener Port
- Relationship Between Messaging Components
- Installing Applications
- Server Options
- Starting an Application
- Summary
|
|
13. Business and Integration Tier Patterns
|
|
- Objectives
- Business Delegate Pattern
- How it works
- Data Transfer Object Pattern
- DTO Example (Output)
- DTO Example (Input)
- Role of DTO in MVC
- Access Beans
- Types of Access Beans
- Data Class Access Bean
- Data Class Programming Model
- Access Bean Constructor
- Generating Access Beans
- Generating a Data Class
- Generating an EJB Factory
- Using EJB Factory and Data Class
- Deleting the Access Bean
- Value Object Pattern
- Multiple Value Objects
- Best Practice derive EJB from the Value Object
- Composite Entity Pattern
- An example
- Class Diagram
- How the client interacts
- Value Object Assembler
- Value List Handler
- How does it work?
- How does it work - continued
- Design Considerations
- Service Locator
- Data Access Object (DAO)
- DAO Implementation Guidelines
- Service Activator
- MDB- Integrating JMS and EJB
- Message-Driven Beans Are Different From Other EJBs
- Message-Driven Beans are Stateless
- Message-Driven Bean Interfaces
- Example: Message Counter
- Class MessageCounter
- Processing the Message
- Deployment Descriptor Entry
- Summary
|
|
Appendix A. Message-Driven Beans
|
|
- Objectives
- The Trouble with RMI/IIOP
- Messaging to the Rescue
- Messaging Features
- Message-Oriented Middleware
- Messaging Domains
- Publish/Subscribe
- Point-to-Point
- Java Message Service
- JMS Programming: Overview
- The JMS Interfaces
- JMS Programming: Example
- Integrating JMS and EJB
- Message-Driven Beans Are Different From Other EJBs
- Message-Driven Beans Cannot Talk to Their Clients
- Message-Driven Beans are Stateless
- Durable Subscription
- Message-Driven Bean Interfaces
- javax.ejb.MessageDrivenBean
- javax.jms.MessageListener
- javax.jms.Message
- Lifecycle
- Example: Message Counter
- Class MessageCounter
- Working With Messages
- Processing the Message
- Deployment Descriptor Entry
- Binding the Queue or Topic
- Transactions
- Security
- Load Balancing
- Clustering and Topics
- Clustering and Queues
- A Few Tips
- Poison Messages
- How the Programmer Can Avoid Poison Messages
- How the System Administrator Can Avoid Poison Messages
- Building a Response
- Potential Problems
- A Simple Alternative
- Type Checking and Messages
- Testing Message-Driven Beans
- Summary
- References
|
|
Appendix B. JSP Custom Tag Development
|
|
- Objectives
- What is Custom Tag?
- Why Develop Custom Tags?
- The Nature of a Custom Tag
- Tag Body
- Fragment Attribute
- Dynamic Attributes
- Tag Library Descriptor (TLD)
- Tag Implementation Options
- The Simple Tag API
- Example Tag Class
- Life Cycle of a Simple Tag
- The JspContext Object
- Dealing With the Body
- Implementing an Iteration Tag
- Accessing a Parent Tag
- Working With Fragment Attributes
- The TLD File
- Defining a Tag
- Packaging a Tag Library
- Using a Tag Library
- The Tag File Approach
- Example Tag File
- The Tag Directive
- Defining Attributes
- Working With Variables
- Working With Fragment Attributes
- Packaging Tag Files
- Creating the TLD File
- Using a Tag File From a JSP
|
|
Appendix C. JMS Overview
|
|
- Objectives
- Messaging Intro
- Messaging Example
- Messaging Components
- Messaging Types
- JMS (Java Messaging Service)
- Message Driven Beans (MDB)
- MDB as Message Consumer
- JMS Resources
- JMS Messaging Configuration Questions
- JMS Messaging Configuration Answers
|