Book description
Not just another EJB book, EJB 2.1 Kick Start distinguishes itself in two key ways. First, author Peter Thaggard builds his examples from the new paradigms introduced in EJB 2.X rather than simply rewriting EJB 1.0 code. The changes in EJB 2.X programming--particularly in the areas of deployment descriptors and data persistence--require a new way of thinking about application architecture. The second distinction comes from the use of a project life-cycle approach.
Thaggard presents examples using the define-describe-build approach advocated by the thought leaders in object-oriented programming rather than simply laying out the features of the EJB specification. The result is a readable book that will successfully guide EJB programmers and those migrating from EJB 1/x.
Table of contents
- Copyright
- About the Author
- Acknowledgments
- We Want to Hear from You!
- Introduction
-
I. Fundamental EJB
-
1. The Status Quo
- The Problem with the Status Quo
- The Knight in Shining Armor: EJB
- The Business Plan
- BookEaz Business Plan
- Use Cases Lite
- Use Case Analysis of BookEaz
- BookEaz Use Case Document
- Conclusion
-
2. Designing a Solution Using EJB
- Logical Modeling: The Key to Designing EJB Systems
- Keeping It Strictly Business
- BookEaz Sequence Diagrams
- Conclusion
- 3. Implementing a Solution Using EJB 2.0
-
4. Complex Entity Beans and Local Objects
- Implementing Local Entity Beans
- Complex Entity Bean Relationships
-
Implementing and Deploying ShoppingCart
- ShoppingCart’s Remote Interface Implementation
- ShoppingCartHome’s Implementation
- ShoppingCartBean’s Implementation
-
Deploying ShoppingCart
- Compile the Code
- Add ShoppingCart to the Shopping JAR
- Configure General Information About ShoppingCart
- Fill in the Entity Settings Dialog Box
- Inform DeployTool of ShoppingCart’s Use of ShoppingItemHome
- Define the ShoppingCart-to-ShoppingItem Relationship
- Bind ShoppingCart to a Datasource
- Deploy Shopping
- Test ShoppingCart
- Installing Predeployed EJBs
- Conclusion
- 5. Session Beans and Message-Driven Beans
-
1. The Status Quo
-
II. Reference
-
6. All About Deployment
-
Deployment Overview
- Deployment Units
- EAR File Contents
- References Between Components
- The ejb-jar.xml Deployment Descriptor File
-
Defining a Session Bean with <session>
- Optional Element: <description>
- Optional Element: <display-name>
- Optional Element: <small-icon>
- Optional Element: <large-icon>
- Mandatory Element: <ejb-name>
- Optional Element: <home>
- Optional Element: <remote>
- Optional Element: <local-home>
- Optional Element: <local>
- Optional Element: <service-endpoint>
- Mandatory Element: <ejb-class>
- Mandatory Element: <session-type>
- Mandatory Element: <transaction-type>
- Optional Section: <env-entry>
- Optional Section: <ejb-ref>
- Optional Section: <ejb-local-ref>
- Optional Section: <service-ref>
- Optional Section: <security-role-ref>
- Optional Section: <security-identity>
- Optional Section: <resource-ref>
- Optional Section: <resource-env-ref>
- Optional Section: <message-destination-ref>
-
Defining an Entity Bean with <entity>
- Optional Element: <description>
- Optional Element: <display-name>
- Optional Element: <small-icon>
- Optional Element: <large-icon>
- Mandatory Element: <ejb-name>
- Optional Element: <home>
- Optional Element: <remote>
- Optional Element: <local-home>
- Optional Element: <local>
- Mandatory Element: <ejb-class>
- Mandatory Element: <persistence-type>
- Mandatory Element: <prim-key-class>
- Mandatory Element: <reentrant>
- Optional Element: <cmp-version>
- Optional Element: <abstract-schema-name>
- Optional Elements: <cmp-field>
- Optional Element: <primkey-field>
- Optional Section: <env-entry>
- Optional Section: <ejb-ref>
- Optional Section: <ejb-local-ref>
- Optional Section: <service-ref>
- Optional Section: <security-role-ref>
- Optional Section: <security-identity>
- Optional Section: <resource-ref>
- Optional Section: <resource-env-ref>
- Optional Section: <message-destination-ref>
- Optional Sections: <query>
-
Defining a Message-Driven Bean with <message-driven>
- Optional Element: <description>
- Optional Element: <display-name>
- Optional Element: <small-icon>
- Optional Element: <large-icon>
- Mandatory Element: <ejb-name>
- Mandatory Element: <ejb-class>
- Optional Element: <messaging-type>
- Mandatory Element: <transaction-type>
- Optional Element: <message-selector>
- Optional Element: <acknowledge-mode>
- Mandatory Section: <message-driven-destination>
- Optional Section: <env-entry>
- Optional Section: <ejb-ref>
- Optional Section: <ejb-local-ref>
- Optional Section: <service-ref>
- Optional Section: <security-role-ref>
- Optional Section: <security-identity>
- Optional Section: <resource-ref>
- Optional Section: <resource-env-ref>
- Optional Section: <message-destination-ref>
-
Describing Container Managed Relationships (CMR)
- Optional Section: <relationships>
- Mandatory Section: <ejb-relation>
- Optional Element: <description>
- “Virtually Mandatory” Element: <ejb-relation-name>
- Mandatory Section: <ejb-relationship-role>
- This Role and the Other Role
- Optional Element: <description>
- “Virtually Mandatory” Element: <ejb-relationship-role-name>
- Mandatory Element: <multiplicity>
- Optional Element: <cascade-delete/>
- Mandatory Section: <relationship-role-source>
- Mandatory Section: <cmr-field>
- Assembling EJBs: Security and Transactions
- Conclusion
-
Deployment Overview
-
7. Entity Beans
- Compiling and Running Chapter 7’s Examples
- Remote/Local Interfaces
- Remote and Local Home Interfaces
-
Entity Bean Implementations
-
CMP Implementations
- CMP Implementations of Getters and Setters
- CMP Implementations of Business Methods
- CMP ejbcreate...() Methods
- CMP ejbPostCreate...() Methods
- CMP remove() Methods
- CMP ejbActivate() Methods
- CMP ejbPassivate() Methods
- CMP ejbLoad() Methods
- CMP ejbStore() Methods
- CMP setEntityContext() Methods
- CMP unsetEntityContext() Methods
- CMP Implementations of ejbTimeOut()
- CMP Implementations of Home Methods
- CMP select...() Methods
- CMP find...() Methods
- EJB QL “Lite”: Defining Finders and Selectors with EJB QL
-
BMP Implementations
- BMP Implementations of Attributes, Getters, and Setters
- BMP Implementations of Business Methods
- BMP create...() Methods
- BMP PostCreate() Methods
- BMP ejbRemove() Methods
- BMP ejbActivate() Methods
- BMP ejbPassivate() Methods
- BMP ejbLoad() Methods
- BMP ejbStore() Methods
- BMP setEntityContext() Methods
- BMP unsetEntityContext() Methods
- BMP Implementations of ejbTimeOut()
- BMP Implementations of Home Methods
- BMP select...() Methods
- BMP find...() Methods
-
CMP Implementations
-
8. Session Bean Reference
- Compiling and Running the Examples
- Stateful and Stateless Session Beans
- Session Bean Component Interface
- Business Method Declarations in Web Service Endpoint Interfaces
- Remote and Local Session Bean Home Interfaces
- Session Bean Implementations
- Conclusion
-
9. Message-Driven Bean (MDB) Reference
- Queues and Topics
-
The Two Interfaces of MDBs
- The onMessage() Method
- JAXM Message-Processing Methods
- Responding to Timer Service Events
- The ejbCreate() Method
- The ejbRemove() Method
- The setMessageDrivenContext() Method
- The MessageDrivenContext.setRollbackOnly() Method
- The boolean getRollbackOnly() Method
- The javax.transaction.UserTransaction getUserTransaction() Method
- MDB Best Practices
- Conclusion
- 10. EJB 2.1 Web Service and Timer Service Support
-
6. All About Deployment
-
III. Appendixes
- A. Introduction to UML for Analysis and Design
- B. Installing and Configuring the J2EE Reference Server
- C. Installing and Configuring WebLogic Server
Product information
- Title: EJB™ 2.1 Kick Start
- Author(s):
- Release date: November 2002
- Publisher(s): Sams
- ISBN: 9780672321788
You might also like
book
WebSphere Application Server V8.5 Concepts, Planning, and Design Guide
This IBM® Redbooks® publication provides information about the concepts, planning, and design of IBM WebSphere® Application …
book
Sams Teach Yourself J2EE™ in 21 Days, Second Edition
J2EE has become required knowledge for any serious Java developer, but learning this large and complex …
book
EJB 2.0 Development with WebSphere Studio Application Developer
This IBM Redbook provides detailed information on how to effectively use WebSphere Studio Application Developer for …
book
Enterprise JavaBeans 3.1, 6th Edition
Learn how to code, package, deploy, and test functional Enterprise JavaBeans with the latest edition of …