EJB Concerns and AOP - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

EJB Concerns and AOP

Description:

Learn Aspect Oriented Programming and see how it can be applied to ... This talk won't answer either question (sorry!) Using EJBs. Client View. Component View ... – PowerPoint PPT presentation

Number of Views:33
Avg rating:3.0/5.0
Slides: 17
Provided by: neeraj
Learn more at: http://www.ccs.neu.edu
Category:
Tags: aop | ejb | concerns | sorry

less

Transcript and Presenter's Notes

Title: EJB Concerns and AOP


1
EJB Concerns and AOP
  • by
  • Neeraj Sangal

2
Motivation
  • Learn Aspect Oriented Programming and see how it
    can be applied to current problems

3
Aspect Oriented Programming
  • Language mechanisms to deal with cross cutting
    concerns
  • The hard question for me which concerns are
    best expressed as aspects

4
Java assert facility
  • assert boolean-condition
  • Language mechanism uses assert keyword
  • Verify integrity of program structures
  • Test pre and post conditions to methods
  • AOP helpful in many cases not all

5
EJB Model
  • Component architecture for web based applications

6
Types of EJBs
  • Session
  • Stateless/Stateful
  • Entity
  • Bean Managed/Container Managed
  • Message Based

7
AOP and EJBs
  • Two approaches to think about
  • How can the EJB operating environment benefit
    from AOP?
  • How can EJB implementers benefit from AOP?
  • This talk will examine the first approach
  • This talk wont answer either question (sorry!)

8
Using EJBs
  • Client View
  • Component View

9
EJB Concerns
  • Database connection pooling
  • Persistence automatic and programmer controlled
  • Transaction management
  • Security
  • Management of multiple instances of multiple
    components

10
Working Set Management
  • Callback methods
  • ejbActivate()
  • ejbPassivate()
  • Serializes current state using standard java
    methods

11
Security
  • Define roles
  • Define which roles are allowed to access an ejbs
    methods
  • What is the best way to implement this?

12
Container Managed Transactions
  • The bean developer does not have to worry about
    transactions (is it true?)
  • Callbacks
  • afterBegin()
  • beforeCompletion()
  • afterCompletion()

13
EntityBean
  • Each entity bean represents a row of data in a
    table
  • Two types
  • Bean Managed Persistence
  • Container Managed Persistence

14
Home Interface Methods
  • Create Methods
  • Find Methods

15
Managing Bean Instances
  • Callbacks
  • ejbActivate()
  • ejbPassivate()
  • ejbLoad()
  • ejbStore()

16
Deployment Descriptor
  • Deployers responsibility relatively
    independent of Bean Developer
  • Based on XML
  • Example of method permission
Write a Comment
User Comments (0)
About PowerShow.com