SlideShare a Scribd company logo
1 of 32
EJB 3.0 Peter Antman, CTO, 2006 - 2007 Mogul
EJB 3.0 - fundamentals ,[object Object]
Simplified requirements on business interfaces ,[object Object],[object Object]
dependency injection of resources, such as other EJB:s or Data Sources
life cycle callbacks ,[object Object]
Introduce object/relational mapping persistence API which works on simple domain object (inspired by Hibernate) ,[object Object],[object Object]
security
resource management
remoting
Whats new – an overview ,[object Object]
An Object/Relational persistence specification: Java Persistence API (JPA)
Session- and message driven beans are ordinary Java Beans: no inheritance from javax.ejb. beans
No requirement to implement callback interfaces
No more home interfaces
Remote business interface is an ordinary interface, no need to extend java.rmi.Remote
No need for remote methods to throw RemoteException
Local business interface is an ordinary interface
Bean should/may implement its interfaces
Simplified Exception handling by reducing need of checked exceptions
Business and lifecycle interceptors
Session beans - basic ,[object Object],public interface My { public void doWork(Work w); } @Stateless public class MyBean implements My { public void doWork(Work w) {} } ,[object Object]
Add @Remote to interface or bean to make the interface Remote @Stateless @Remote public class MyBean implements My
Session bean – local and remote interface ,[object Object]
These may  not  be the same interface
They may however inherit a common parent
Annotation may be in interfaces @Remote public interface MyRemote extends My { } @Local public interface MyLocal extends My {} ,[object Object],@Sateless @Remote(MyRemote.class) @Local(MyLocal.class) public class MyBean extends My {
Session bean lifecycle callbacks ,[object Object]
All session beans may use @PostConstruct and @PreDestroy @PostConstruct public void init() {} @PreDestroy public void destroy() {} ,[object Object],@PostActivate public void activate() {} @PrePassivate public void passivate() {} ,[object Object],@Remove public void saveCart() {}
Message Driven Bean ,[object Object]
Supports @PostConstruct and @PreDestroy annotation
May use @MessageDriven annotation to configure itself
May use one or more @ActivationConfigProperty annotation for configuration @MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"), @ActivationConfigProperty(propertyName="destination", propertyValue="queue/mdb") }) public class CalculatorBean implements MessageListener { public void onMessage (Message msg) {

More Related Content

What's hot

Reading and writting v2
Reading and writting v2Reading and writting v2
Reading and writting v2
ASU Online
 
Session 7 Tp7
Session 7 Tp7Session 7 Tp7
Session 7 Tp7
phanleson
 

What's hot (20)

Java beans
Java beansJava beans
Java beans
 
Java beans
Java beansJava beans
Java beans
 
Creational pattern 2
Creational pattern 2Creational pattern 2
Creational pattern 2
 
java programming - applets
java programming - appletsjava programming - applets
java programming - applets
 
Xpath injection in XML databases
Xpath injection in XML databasesXpath injection in XML databases
Xpath injection in XML databases
 
Reading and writting v2
Reading and writting v2Reading and writting v2
Reading and writting v2
 
XPath Injection
XPath InjectionXPath Injection
XPath Injection
 
Dependency Injection in Spring
Dependency Injection in SpringDependency Injection in Spring
Dependency Injection in Spring
 
Advanced core java
Advanced core javaAdvanced core java
Advanced core java
 
My c++
My c++My c++
My c++
 
Java Tutorial
Java TutorialJava Tutorial
Java Tutorial
 
Java Interview Questions
Java Interview QuestionsJava Interview Questions
Java Interview Questions
 
Testing the frontend
Testing the frontendTesting the frontend
Testing the frontend
 
Inheritance
InheritanceInheritance
Inheritance
 
Spring Certification Questions
Spring Certification QuestionsSpring Certification Questions
Spring Certification Questions
 
Java RMI
Java RMIJava RMI
Java RMI
 
Introduction to JAVA
Introduction to JAVAIntroduction to JAVA
Introduction to JAVA
 
Collections in-csharp
Collections in-csharpCollections in-csharp
Collections in-csharp
 
Session 7 Tp7
Session 7 Tp7Session 7 Tp7
Session 7 Tp7
 
Spring FrameWork Tutorials Java Language
Spring FrameWork Tutorials Java Language Spring FrameWork Tutorials Java Language
Spring FrameWork Tutorials Java Language
 

Similar to EJB 3.0 Walkthrough (2006)

Introduction to CDI and DI in Java EE 6
Introduction to CDI and DI in Java EE 6Introduction to CDI and DI in Java EE 6
Introduction to CDI and DI in Java EE 6
Ray Ploski
 
Spring framework
Spring frameworkSpring framework
Spring framework
Ajit Koti
 
02 Hibernate Introduction
02 Hibernate Introduction02 Hibernate Introduction
02 Hibernate Introduction
Ranjan Kumar
 

Similar to EJB 3.0 Walkthrough (2006) (20)

Spring talk111204
Spring talk111204Spring talk111204
Spring talk111204
 
Ejb3 Dan Hinojosa
Ejb3 Dan HinojosaEjb3 Dan Hinojosa
Ejb3 Dan Hinojosa
 
EJB et WS (Montreal JUG - 12 mai 2011)
EJB et WS (Montreal JUG - 12 mai 2011)EJB et WS (Montreal JUG - 12 mai 2011)
EJB et WS (Montreal JUG - 12 mai 2011)
 
Spring
SpringSpring
Spring
 
Spring talk111204
Spring talk111204Spring talk111204
Spring talk111204
 
Spring frame work
Spring frame workSpring frame work
Spring frame work
 
Introduction to CDI and DI in Java EE 6
Introduction to CDI and DI in Java EE 6Introduction to CDI and DI in Java EE 6
Introduction to CDI and DI in Java EE 6
 
Context and Dependency Injection 2.0
Context and Dependency Injection 2.0Context and Dependency Injection 2.0
Context and Dependency Injection 2.0
 
CDI @javaonehyderabad
CDI @javaonehyderabadCDI @javaonehyderabad
CDI @javaonehyderabad
 
Spring training
Spring trainingSpring training
Spring training
 
Deployment
DeploymentDeployment
Deployment
 
Enterprise Java Beans 3 - Business Logic
Enterprise Java Beans 3 - Business LogicEnterprise Java Beans 3 - Business Logic
Enterprise Java Beans 3 - Business Logic
 
Spring review_for Semester II of Year 4
Spring review_for Semester II of Year 4Spring review_for Semester II of Year 4
Spring review_for Semester II of Year 4
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
Spring framework in depth
Spring framework in depthSpring framework in depth
Spring framework in depth
 
Inheritance
InheritanceInheritance
Inheritance
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotation
 
02 Hibernate Introduction
02 Hibernate Introduction02 Hibernate Introduction
02 Hibernate Introduction
 
Java Basics
Java BasicsJava Basics
Java Basics
 
OOP in PHP
OOP in PHPOOP in PHP
OOP in PHP
 

More from Peter Antman

More from Peter Antman (20)

Core Protocols - A workshop
Core Protocols - A workshopCore Protocols - A workshop
Core Protocols - A workshop
 
Growing up with agile - how the Spotify 'model' has evolved
Growing up with agile - how the Spotify 'model' has evolved Growing up with agile - how the Spotify 'model' has evolved
Growing up with agile - how the Spotify 'model' has evolved
 
Fluent at agile - agile sverige 2014
Fluent at agile - agile sverige 2014Fluent at agile - agile sverige 2014
Fluent at agile - agile sverige 2014
 
Pirateship - growing a great crew: workshop facilitation guide
Pirateship - growing a great crew: workshop facilitation guidePirateship - growing a great crew: workshop facilitation guide
Pirateship - growing a great crew: workshop facilitation guide
 
Facilitating the Elephant carpaccio exercise
Facilitating the Elephant carpaccio exerciseFacilitating the Elephant carpaccio exercise
Facilitating the Elephant carpaccio exercise
 
User Story Workshop
User Story WorkshopUser Story Workshop
User Story Workshop
 
Lean Canvas - a hypotheses board
Lean Canvas - a hypotheses boardLean Canvas - a hypotheses board
Lean Canvas - a hypotheses board
 
Strong decisions with consensus, Agila Sverige 2014
Strong decisions with consensus, Agila Sverige 2014Strong decisions with consensus, Agila Sverige 2014
Strong decisions with consensus, Agila Sverige 2014
 
Lean Dot Game
Lean Dot Game Lean Dot Game
Lean Dot Game
 
Stop the line @spotify
Stop the line @spotifyStop the line @spotify
Stop the line @spotify
 
Tear Down the Pyramid Again - Agile Management from the trenches
Tear Down the Pyramid Again - Agile Management from the trenchesTear Down the Pyramid Again - Agile Management from the trenches
Tear Down the Pyramid Again - Agile Management from the trenches
 
Piemonte vin
Piemonte vinPiemonte vin
Piemonte vin
 
The Bespoke Software Product Factory (2007)
The Bespoke Software Product Factory (2007)The Bespoke Software Product Factory (2007)
The Bespoke Software Product Factory (2007)
 
Java 1.5 - whats new and modern patterns (2007)
Java 1.5 - whats new and modern patterns (2007)Java 1.5 - whats new and modern patterns (2007)
Java 1.5 - whats new and modern patterns (2007)
 
Java Server Faces 1.2 presented (2007)
Java Server Faces 1.2 presented (2007)Java Server Faces 1.2 presented (2007)
Java Server Faces 1.2 presented (2007)
 
Så funkar det (del 3) - webben
Så funkar det (del 3) -  webbenSå funkar det (del 3) -  webben
Så funkar det (del 3) - webben
 
Så funkar det (del 2) - mail
Så funkar det (del 2) - mailSå funkar det (del 2) - mail
Så funkar det (del 2) - mail
 
Så funkar det (del 1) - word
Så funkar det (del 1) - wordSå funkar det (del 1) - word
Så funkar det (del 1) - word
 
eXtreme Programming
eXtreme Programming eXtreme Programming
eXtreme Programming
 
SCRUM at Polopoly - or building a lean culture
SCRUM at Polopoly - or building a lean cultureSCRUM at Polopoly - or building a lean culture
SCRUM at Polopoly - or building a lean culture
 

Recently uploaded

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 

Recently uploaded (20)

Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 

EJB 3.0 Walkthrough (2006)