|
|
Writing Advanced EJB 3.0 Applications |
Course
Overview
This course is "the" EJB3.0 course
available. It covers everything you
need to know to develop Enterprise
Java Beans applications. Session
Beans, Entities, EJB Transactions
and EJB security are all covered in
great depth. All technologies used
are portrait on their architectural
role. Best practices and patterns
are explained throughout the course.
What
will I learn?
This an intermediate to advanced
level Java training course, designed
for developers who need to get up
and running with advanced EJB
programming skills immediately.
This is an advanced-level
server-side Java course. People
should be experience with Java EE
Tecnologies such as JNDI,
DataSources, Web Technologies.
Ideally attendees should have 6-8
months, or more, experience with
server-side Java technologies.
Detailed description
Designed for enterprise developers
who wish to implement server-side
business objects in Java, this
lab-intensive training provides
students with a solid understanding
of the essentials of EJB using sound
coding techniques and best
programming practices.
Our training is technology centric.
Although a specific application
server product will be used
throughout the course, the
comprehensive labs and lessons
geared towards teaching advanced EJB
programming techniques, rather than
focusing on the finer points of the
tools in use.
If your team is reviewing or using
another server technology, we can
modify our labs to run in the
environment of your choice. Our
dedicated curriculum development
team can easily customize our
offerings to best suit your specific
requirements. If your team is
reviewing or using another server
technology, we can modify our labs
to run in the environment of your
choice. Our dedicated curriculum
development team can easily
customize our offerings to best suit
your specific requirements.
Course
Style
Throughout this five-day workshop
students will be led through a
series of progressively advanced
topics, where each topic consists of
lecture, group discussion,
comprehensive hands-on lab
exercises, and lab review. This
training is about 50% hands-on lab
and 50% lecture. Over 20 complete
lab projects are laced throughout
the course, designed to reinforce
fundamental skills and concepts
learned in the lessons. Because
these lessons, labs and projects are
presented in a building block
fashion, students will gain a solid
understanding of not only the core
concepts, but also how all the
pieces fit together in a complete
multi-tier internet business
application.
Course
Contents
Session: Introduction Enterprise
JavaBeans
* Lesson: Introducing Enterprise
JavaBeans™
* Lesson: Components of EJB
Architecture
Session: Writing EJB 3.0 Session
Beans
* Lesson: Writing the business
interface and implementation
* Lesson: Exception Handling
* Lesson: Configuration and
Deployment
* Lesson: Timer Service (optional)
Session: EJB 3.0 Entities
* Lesson: Introduction to Entities
* Lesson: Getting started with EJB
3.0
* Lesson: Basic ORM
* Lesson: Entity associations
(relations)
* Lesson: Mapping Inheritance
Session: Transaction Management
* Lesson: Fundamentals of EJB
Transactions
* Lesson: Bean-managed Transactions
* Lesson: Container-managed
Transactions
Session: Security
* Lesson: Enterprise Java Beans
Security
Appendix: Overview of J2EE Design
patterns (Business and Integration
tiers)
* Lesson: (J2EE) Design Patterns
summary
Appendix: Developing JMX MBeans
* Lesson: Brief overview of JMX
* Lesson: Developing standard MBeans
* Lesson: Developing Dynamic MBeans
* Lesson: JMX Remoting (client side)
Detailed overview
Introduction Enterprise JavaBeans
Lesson: Introducing Enterprise
JavaBeans™
* Position Java EE and Enterprise
JavaBeans
* Explain the need for Enterprise
JavaBeans
* Define purpose of Enterprise
JavaBeans.
* Understand the key features of the
EJB Specification.
* Explain how EJB and CORBA relate
* Explain how EJBs relate to
"ordinary" JavaBeans.
Lesson: Components of EJB
Architecture
* List the four client types
* List the primary components in an
EJB server.
* List services the container may
provide to the bean.
* List the four components the EJB
developer is responsible for
providing.
* Describe ways session, entities
and message driven beans differ.
* Describe the relationship between
Web Services and Enterprise Java
Beans
* Describe the purpose of the EJB
jar file.
* List the mandatory four objects
per bean included in an EJB jar
file.
Writing EJB 3.0 Session Beans
Lesson: Writing the business
interface and implementation
* Understand the life-cycle of a
session bean
* Describe the difference between a
stateful and a stateless session
bean.
* Explain how the bean provider
specifies the state management type.
* Understand the semantics of a
Business Interface
* Understand restrictions imposed on
Remote Business Interfaces
* Understand how to write EJB 3.0
Session Beans
* List the different Lifecycle
callback interceptor methods
* Understand stateful session bean
removal
Lesson: Exception Handling
* Explain the differences between a
system error and an application
error.
* Explain which exceptions should be
thrown to indicate system errors.
* Explain which exceptions should be
thrown to indicate application
errors.
* Describe how the container handles
exceptions thrown by a bean.
* Explain the @ApplicationException
annotation
* Preview effect of exceptions
onContainer Transaction
Lesson: Configuration and Deployment
* Understand the overall structure
of a ejb-jar deployment descriptor.
* Show how to add environment
information to the deployment
descriptor.
* Add bean and resource factory
references.
* Show how to provide assembly
information, resolving references to
external beans, web services and
resource factories.
* Understand dependency injection
* Understand different ways of
having a container inject values
* Understand limitations of Java EE
dependency injection
* Understand alternatives to
obtaining resources and beans
* Successfully deploy a session bean
to a server.
* List benefits of using a
deployment descriptor over
annotations
* Discuss what information is best
placed in annotation, and what is
best placed in the deployment
descriptor.
Lesson: Timer Service (optional)
* Understand the concept of Timer
Services
* Introduce the API
EJB 3.0 Entities
Lesson: Introduction to Entities
* Explain Object to Relational (O/R)
Mapping (ORM)
* Explain the Java Persistence
Architecture
* List benefits of using Entities
* Discuss the goals of Entities
* List key functionalities of
Entities
* List the different Persistence
types (entity and embeddable
objects)
Lesson: Getting started with EJB 3.0
* Understand the nuts and bolts of
Entities
* Understand how to map an Entity to
the database
* Understand the configurations
involved and their relationships
* List different ways of packaging
Entities
* Understand the overall syntax of
the peristence.xml Configuration
file
* Understand the overall syntax of a
mapping file
* Introduce the
javax.persistence.EntityManager
* Understand one way of obtain a
reference to the Persistence Context
* Supply a basic example of using
Entities
Lesson: Basic ORM
* Configure persistent classes
* Configure persistent state of a
class
* Understand the requirements on a
persistent entity class
* Understand Object identity in EJB
* Discuss object identity and a
caveat in hashCode and equals
implementations
* Discuss different ways of
generating unique numbers for keys
* Understand how to influence
mapping to columns
* Understand how to map properties
of a class to multiple tables
* Understand how to map composition
using Embeddable classes
Lesson: Entity associations
(relations)
* List the different types of
associations
* Understand the difference between
uni and bidirectional associations
* Understand how to map
unidirectional one to one, many to
one and one to many associations
* Understand how to and when to use
join tables
* Understand how to map many-to-many
associations
* Understand how to configure
bidirectional associations
* Understand how to cascade over
associations
Lesson: Mapping Inheritance
* Discuss the three Inheritance ORM
strategies
* Discuss the Single Table
Inheritance Pattern (aka table per
class hierarchy)
* Discuss the Class Table
Inheritance Pattern (aka table per
subclass)
* Discuss the Concrete Table
Inheritance Pattern (aka table per
concrete class)
* Discuss Strength and weaknesses of
each strategy
* Introduce the concept of Mapped
Superclasses
* Understand how to configure these
mappings
* Understand the concept of a
discriminator
Transaction Management
Lesson: Fundamentals of EJB
Transactions
* Describe the need for transaction
control.
* Explain isolation levels.
* List the four isolation levels.
* Explain which isolation levels
should be used.
* List the three styles of
transaction management.
* Explain relation between the
Persistent Context EntityManager and
transaction.
* Understand Optimistic vs
Pessimistic locking schemes
* Implement Optimistic concurrency
on Entities using versioning
* Implement Pessimistic concurrency
on Entities using Lock modes
Lesson: Bean-managed Transactions
* Correctly indicate in the DD that
the bean will be managing its own
transactional state.
* Use the appropriate API in the
bean to create and terminate
transactions.
* Explain the issues of BMT with
stateful/stateless session beans.
* Explain the issues of BMT with and
EJB 2.1 Entity Beans.
Lesson: Container-managed
Transactions
* List the six transaction
attributes.
* Name the annotations used to
specify CMT.
* Name the tag/value pair used in DD
to specify CMT.
* List which methods of
session/entity beans (2.1) require
transaction attributes to be
specified in DD.
* Explain how a bean would roll back
a transaction.
* Explain how transactions influence
the container-managed transaction.
* Explain the purpose of the
SessionSynchronization interface.
* Describe how each of the three
methods in this interface provides
transaction control to your bean.
Security
Lesson: Enterprise Java Beans
Security
* Define users, principals and
roles.
* Describe what security information
is placed in DD.
* Explain how container may provide
security implementation.
Appendences
Overview of J2EE Design patterns
(Business and Integration tiers)
Lesson: (J2EE) Design Patterns
summary
* J2EE Business Tier Pattern:
Business Delegate (Proxy)
* J2EE Business Tier Pattern: Value
Objects (Holder).
* J2EE Business Tier Pattern:
Service Locator.
* J2EE Integration Patterns: Data
Access Objects.
* J2EE Integration Patterns: Service
Activator.
* Understand how motivations of
certain J2EE Patterns have been
addressed by a top-down approach of
CBD.
Developing JMX MBeans
Lesson: Brief overview of JMX
* Explain the JMX three level
architecture
* Understand the role and
relationships for each level
* Get an understanding of MBeans and
the different ways of implementing
them
* Understand the relation between an
MBean Server and its MBeans
* Discuss different MBean deployment
scenarios
* Understand the concept of an MLET
* Introduce JBoss sar files
* Understand the JBoss -service.xml
file
Lesson: Developing standard MBeans
* Understand the three different
ways of developing standard MBeans
* Understand what aspects of a
standard MBean are considered
static, and which are dynamic
* Understand the registration
process of an MBean on a local MBean
Server
* Discuss the limitations of local
MBean Server registration
* See a real-life application of JMX
to monitor a web application
* Develop a real-life application of
JMX to manage document caching in a
J2EE environment
Lesson: Developing Dynamic MBeans
* Understand the rational behind
Dynamic MBeans
* Understand the need to a metamodel
* Explain how a Dynamic MBean
exposes its behavior
* Correctly handle attribute support
implementation
* Correctly handle constructor and
operation support implementation
* Describe how MBeans can acts as
event sources
* Understand how to support
notifications
* Introduce proper exception
handling for Dynamic MBeans
Lesson: JMX Remoting (client side)
* Discuss the two different
mechanisms for clients to work with
a server
* Contrast Adapters and Connectors
* Understand what JSR160 (JMX
Remoting) adds to the JMX arena
* Understand the different mechanism
of connecting with a JMX MBeanServer
using JMX Remoting
* Understand client configuration to
connect with a remote server
* Understand the two ways of
connecting a client with the server
using connectors
* Understand the way URLs are
described.
* Understand the relation between
JMX and technologies such as LDAP,
Jini and SLP
* Describe the role of JMXMP
* Understand what a JMX client can
do, when connected
* Briefly describe the query
mechanism
* Understand how a client can
operate with the MBeans on the
server
* Discuss class loading and
registration of MBeans
* Understand how to listen to
notification
Hands-on lab exercises
1. Write the Membership bean-Learn
how to write an EJB 3.0 Session Bean
2. Connecting the Session Bean to a
Database -The objective of this
exercise is to understand the bean's
environment, DI and deployment.
3. Map a class (Member) to the
database-The objective is to map a
class with fields of different types
to the database. This will also make
students understand how to setup the
environment
4. Implement a composition-The
objective of this exercise is to
understand how to use EJB 3.0
Embeddable classes
5. Map different associations-The
objective is to map different
association types to the database in
two real life use cases.
6. Map specializations-The objective
is to understand how to map class
inheritance to the database
7. Putting it all together case-The
objective is to create a full Java
EE application from a UML model
Hands-on lab exercises (in
appendences)
1. Developing an MBean to manage
document caching-Understand how to
develop an MBean following the
Standard MBean specification.
Secondly, it will also show you how
to use MBeans from your application.
Prerequisites
Recommended Follow-On Courses
This course covers advanced EJB
topics, so you may wish to cover
other essential components of the
J2EE technology such as Java
Servlets & JavaServer Pages.
Duration
4 days
|
Cost £1,500 plus VAT |
|
Recommended reading & follow on courses
Thinking in Java Testimonials
Who has been on this course before
Carmarthenshire County Council
|
