You are on page 1of 6

J2EE Programming Class Part II

(We are now java.net community member. Please click the above button in order to join as a
individual member.)

● Class #11

❍ Announcements from Sang Shin


■ The focus of this session is twofold - talking about fundamental concept and

architecture of EJB application and then talking about development and


deployment process of an EJB application.
■ The programming APIs of EJB will be talked about in detail in subsequent

sessions
❍ Presentation material
■ Introduction to EJB (105 minutes):

■ (PDF slides with speaker notes) (PDF 4 slides per page) (PDF 1 slide per

page) (StarOffice file)


■ Audio version of this presentation (MP3 file, 19Mbytes)

❍ Pre-class reading
■ For "Introduction to EJB", read one of the following tutorials (must read)

■ Chapter 23: Enterprise Beans of J2EE 1.4 Tutorial in java.sun.com (2

hours)
■ Chapter 24: Getting Started with Enterprise Beans of J2EE 1.4 Tutorial in

java.sun.com (2 hours)
■ "Overview" and "Enterprise JavaBeans" sections of Enterprise JavaBeans

Fundamentals in java.sun.com (1 hour)


■ Chapters 1 (Overview), 2 (EJB Fundamentals), Chapter 3 (Writing your

First Bean) of Mastering Enterprise JavaBeans written by Ed Roman (2


hours)
■ "EJB Concept" chapter of "Special Edition of using EJB 2.0" written by

Chuck Cavaness and Brian Keeton (2 hours)


■ Enterprise Java Beans Tier section of Designing Enterprise Application

with J2EE platform, 2nd edition.


❍ Homework Assignment
■ Click homework

❍ NetBeans Corner
■ I explained how to build, deploy, and run <J2EE_HOME>/samples/ejb/

stateless/apps/simple application of J2EE 1.4 SDK from scratch using


NetBeans here as part of the homework
■ I also explained how you can play with the following NetBeans features

■ Seeing Javadoc of J2EE API

http://www.javapassion.com/j2ee/Class2.html (1 of 6)12/29/2005 10:20:33 AM


J2EE Programming Class Part II

■ Generating Javadoc of the application


■ Generating code for calling EJB
■ HTTP monitor
■ Reformat code
■ Fix imports

● Class #12

❍ Announcements from Sang Shin


■ In this session, you will learn Session beans in a bit more detail.

❍ Presentation material
■ Session Beans (90 minutes):

■ (PDF slides with speaker notes) (PDF 4 slide per page) (PDF 1 slide per

page) (StarOffice file)


❍ Pre-class reading
■ For Session Beans, read one of the following (must read)

■ Read "Chapter 25: Session bean examples" of J2EE 14 Tutorial in java.

sun.com (1 hour)
■ Read "Session Type Enterprise Beans" section of Enterprise JavaBeans

Fundamentals in java.sun.com
■ Read Chapter 4: Introduction to Session Beans of Mastering Enterprise

JavaBeans written by Ed Roman (1 hour)


❍ Post-class reading
■ Enterprise Java Beans Tier section (especially sections 5.4: Session Beans and

5.5: Entity Beans) of Designing Enterprise Application with J2EE platform, 2nd
edition
■ It describes when to use session beans and when to use entity beans

using examples
■ EJB Design Patterns written by Floyd Marinescu

■ Bitter EJB Review Project written by Bruce Tate, and three other authors

■ EJB Cookbook Review Project written by Ben Sullins and Mark Whipple

■ See what kind of EJB questions are being posted in EJB forum of java.sun.com

■ See what kind of EJB questions are being posted in EJB forum of theserverside.

com
❍ Home assignment
■ Click homework (it assumes you are using J2EE 1.4 SDK 2005Q1 and J2EE 1.4

Tutorial Update 4)

● Class #13

http://www.javapassion.com/j2ee/Class2.html (2 of 6)12/29/2005 10:20:33 AM


J2EE Programming Class Part II

❍ Announcements from Sang Shin


■ This session is about Entity beans. Entity bean is a lot more complex beast than a

session bean since it involves backend database. So we have a very large


number of slides here (almost 230 slides) and it will take sometime for you to
digest it.
■ During the past several years, entity beans have reviewed mixed reviews from the

J2EE community in general regarding its usefulness. There are some truths and
there are some myths in those thinkings. We will avoid this discussion for now
and focus our attention to understanding "What i entity bean and how it works".
❍ Presentation material
■ Entity Beans Overview (180 minutes) :

■ (PDF slides with speaker notes) (PDF 4 slide per page) (PDF 1 slide per

page) (StarOffice file)


■ Audio version of this presentation (Realaudio or MP3 file)

■ Advanced Entity Beans

■ (PDF slides with speaker notes) (PDF 1 slide per page) (StarOffice file)

■ EJB QL

■ (PDF slides with speaker notes) (PDF 1 slide per page) (StarOffice file)

❍ Pre-class reading
■ For introduction on Entity Beans, read one of the following

■ Read "Chapter 26: Bean managed persistence examples" and "Chapter

27: Container-Managed persistence examples" sections of J2EE 1.4


Tutorial in java.sun.com (2 hours) - must read
■ Read Chapter 5: Introduction to Entity Beans, Chapter 6: Writing Bean-

Managed Persistent Entity Beans, Chapter 7: Writing Container-Managed


Persistent Entity Beans of Mastering Enterprise JavaBeans written by Ed
Roman (2 hours)
■ Read Chapter 5: Entity Model of Professional EJB (2 hours)

■ Read "The EJB 2.0 Entity Model" chapter written by Dan O'Connor and

Dave Young
■ Read "Entity Type Enterprise Beans" section of Enterprise JavaBeans

Fundamentals in java.sun.com (1 hour)


■ For Entity Beans Relationship handing, read

■ Read Chapter 11: BMP and CMP Relationships of Mastering Enterprise

Beans written by Ed Roman (4 hours) - must read


■ This is an excellent write-up on Entity Beans relationship

■ For EJB QL, read

■ Appendix D: EJB Query Language (EJB-QL) of Mastering Enterprise

Beans written by Ed Roman - read if you have time


■ For J2EE 1.4 CMP Support, read

■ Using CMP for Entity Beans - you will need to read this if you are using

J2EE 1.4 as your CMP platform

http://www.javapassion.com/j2ee/Class2.html (3 of 6)12/29/2005 10:20:33 AM


J2EE Programming Class Part II

❍ Post-class reading
■ Read all the chapters you have not read in J2EE blueprint

■ Read Chapter12: Persistence Best Practice of Mastering Enterprise Beans

written by Ed Roman
■ If you need to know all the elements defined in EJB deployment descriptor, go to

Appendix C: Deployment Descriptor reference of Mastering Enterprise Beans


written by Ed Roman
❍ Homework assignment
■ Click homework (it assumes you are using J2EE 1.4 SDK 2005Q1 and J2EE 1.4

Tutorial Update 4)

● Class #14

● Announcement from Sang Shin


❍ In this session, you will learn chracteristics and motivation of Message

Oriented Middleware, MOM in short. Then you will learn what the JMS is
and how to build and messaging applications using JMS.
● Presentation material
❍ JMS and MDB (120 minutes):

■ (PDF slides with speaker notes) (PDF 1 slide per page)(StarOffice

file)
● Pre-class reading
❍ Read JMS tutorial in java.sun.com - read if you have time

❍ Read Chapter 33: The Java Messaging Services API of J2EE 1.4 tutorial -

must read
❍ Read Chapter 23: Enterprise Beans, Section:What is a Message-Driven

Bean? of J2EE 1.4 tutorial in java.sun.com - read if you have time


❍ Read Chapter 28: Message-Driven Bean example of J2EE 1.4 tutorial -

must read
❍ Delivering Messages for Business Integration article in JavaPro - read if

you have time


● Post-class reading
❍ Chapter 2 "Developing a Simple Example" of Java Message Service book

written by Richard Monson-Haefel & David Chappell, published by


O'Reilly. - read if you have time
● Homework assignment
❍ Click homework

● Class #15

http://www.javapassion.com/j2ee/Class2.html (4 of 6)12/29/2005 10:20:33 AM


J2EE Programming Class Part II

❍ Announcements from Sang Shin


■ We will spend some time talking about EJB security. EJB security works with

Web-tier security to provide end-to-end security over J2EE platform. So please


make sure you have good understanding on Web-tier security, which we talked
about in Class #4.
■ Since we do not have enough time to talk about EJB transaction, we will touch

upon it in somewhat lightweight fashion, only 45 minutes instead of 2 or 3 hours


the topic deserves.
❍ Presentation material
■ EJB Security (45 minutes):

■ (PDF slides with speaker notes) (PDF 1 slide per page) (StarOffice file)

■ Audio version of this presentation (Downloadable MP3 file) is also

available from
■ EJB Transaction (45 minutes):

■ (PDF slides with speaker notes) (PDF 4 slide per page) (StarOffice file)

■ JNDI (45 minutes):

■ (PDF slides with speaker notes) (PDF 1 slide per page) (StarOffice file)

❍ Pre-class reading
■ For "EJB Security", read

■ "Understanding EJB Security" section under Chapter9: Adding

Functionality to Your Beans of Mastering Enterprise Beans written by Ed


Roman
■ Chapter 14: Security Design and Management chapter of Special Edition

Using EJB 2.0 written by Cheuk Cavaness and Brian Keeton (2/2002)
■ For "EJB Transaction", read

■ Chapter10: Transaction of Mastering Enterprise Beans written by Ed

Roman
■ "Transactions and EJB" chapter of "Professional EJB" written by Dan
O'Connor and Dave Young
■ For JNDI, read

■ "Calling Beans from Other Beans" section under Chapter9: Adding


Functionality to Your Beans of Mastering Enterprise Beans written by Ed
Roman
■ Appendix A: RMI-IIOP and JNDI Tutorial of Mastering Enterprise Beans

written by Ed Roman - if you want more detailed underlying mechanism of


JNDI
❍ Post-class reading
■ For "EJB Security", read

■ "Security" section of Designing Enterprise Application with J2EE platform,

2nd edition (J2EE Blueprints)


■ For "EJB Transaction", read

■ "Transaction Management" section of Designing Enterprise Application

with J2EE platform, 2nd edition

http://www.javapassion.com/j2ee/Class2.html (5 of 6)12/29/2005 10:20:33 AM


J2EE Programming Class Part II

If you want to know a lot more on generic usage of JNDI (that is, not directly

related to J2EE's usage of JNDI), read


■ JNDI Tutorial in java.sun.com

❍ Homework assignment - HW#10


■ Objectives

■ Tasks

■ Things to be submitted

■ Due date

■ Helpful tips

http://www.javapassion.com/j2ee/Class2.html (6 of 6)12/29/2005 10:20:33 AM