1
Entity Beans
07/02/2003
2
Sang Shin
sang.shin@sun.com
Jeff Cutler
jpcutler@yahoo.com
www.javapassion.com/j2ee
07/02/2003
3
Disclaimer & Acknowledgments
? Even though Sang Shin is a full-time employee of Sun
Microsystems, the contents here are created as his own
personal endeavor and thus do not reflect any official stance
of Sun Microsystems.
? Sun Microsystems is not responsible for any contents in this
presentation.
? Acknowledgments
– Large number of slides are made from the contents of the book "Applied
Enterprise JavaBeans" Technology written by Kevin Boone (Sun
Microsystems), published by Prentice Hall [1]
– Some slides are made from the contents of J2EE tutorial authored by Dale
Green (Sun Microsystems) [2]
– Some slides (Relationship related) are made from Mastering EJBs authored by
Ed Roman [3]
– Some slides are made from the contents of EJB codecamp material authored
by Carol McDonald (Sun Microsystems)
07/02/2003
4
Revision History & Things to Do
?
03/01/2003: version 1, Created (Sang Shin)
?
03/03/2003: Updated (Jeff Cutler)
?
03/24/2003: Updated (Sang Shin)
?
06/20/2003: Speaker notes are added for most slides (Sang Shin)
?
07/01/2003: Some slides which were out of place at the end are cleaned up (Sang
Shin)
?
Things to do
– ejBSelect section needs to be improved
– Schema mapping issue needs to be beefed up a bit
– Some slides still need speaker notes
07/02/2003
5
Agenda - page 1
? What is and why entity bean?
? Operational flow
– findX(), create(), remove()
? Life cycle of entity bean instance
? Role of container for entity beans
? Primary key
? Codes bean developer write (server side)
? Codes client programmer write (client side)
? Limitations of CMP 1.1
? CMP 2.0
07/02/2003
6
Agenda - page 2
? Relationship handling
– Cardinality, Directionality, Lazy-loading, Cascade
delete, Referential Integrity
? EJB-QL
? Relationship and EJB-QL
? Persistence strategies
? Commit options
? Home methods
? Passing references to EJBs within EJBs
? Exception handling
07/02/2003
7
What is an