SlideShare une entreprise Scribd logo
1  sur  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) {

Contenu connexe

Tendances (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
 

Similaire à EJB 3.0 Walkthrough (2006)

Spring talk111204
Spring talk111204Spring talk111204
Spring talk111204ealio
 
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)Montreal JUG
 
Spring talk111204
Spring talk111204Spring talk111204
Spring talk111204s4al_com
 
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 6Ray Ploski
 
Context and Dependency Injection 2.0
Context and Dependency Injection 2.0Context and Dependency Injection 2.0
Context and Dependency Injection 2.0Brian S. Paskin
 
Spring training
Spring trainingSpring training
Spring trainingTechFerry
 
Enterprise Java Beans 3 - Business Logic
Enterprise Java Beans 3 - Business LogicEnterprise Java Beans 3 - Business Logic
Enterprise Java Beans 3 - Business LogicEmprovise
 
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 4than sare
 
Spring framework
Spring frameworkSpring framework
Spring frameworkAjit Koti
 
Spring framework in depth
Spring framework in depthSpring framework in depth
Spring framework in depthVinay Kumar
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotationjavatwo2011
 
02 Hibernate Introduction
02 Hibernate Introduction02 Hibernate Introduction
02 Hibernate IntroductionRanjan Kumar
 

Similaire à 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
 

Plus de Peter Antman

Core Protocols - A workshop
Core Protocols - A workshopCore Protocols - A workshop
Core Protocols - A workshopPeter Antman
 
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 Peter Antman
 
Fluent at agile - agile sverige 2014
Fluent at agile - agile sverige 2014Fluent at agile - agile sverige 2014
Fluent at agile - agile sverige 2014Peter Antman
 
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 guidePeter Antman
 
Facilitating the Elephant carpaccio exercise
Facilitating the Elephant carpaccio exerciseFacilitating the Elephant carpaccio exercise
Facilitating the Elephant carpaccio exercisePeter Antman
 
User Story Workshop
User Story WorkshopUser Story Workshop
User Story WorkshopPeter Antman
 
Lean Canvas - a hypotheses board
Lean Canvas - a hypotheses boardLean Canvas - a hypotheses board
Lean Canvas - a hypotheses boardPeter Antman
 
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 2014Peter Antman
 
Stop the line @spotify
Stop the line @spotifyStop the line @spotify
Stop the line @spotifyPeter Antman
 
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 trenchesPeter Antman
 
The Bespoke Software Product Factory (2007)
The Bespoke Software Product Factory (2007)The Bespoke Software Product Factory (2007)
The Bespoke Software Product Factory (2007)Peter Antman
 
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)Peter Antman
 
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)Peter Antman
 
Så funkar det (del 3) - webben
Så funkar det (del 3) -  webbenSå funkar det (del 3) -  webben
Så funkar det (del 3) - webbenPeter Antman
 
Så funkar det (del 2) - mail
Så funkar det (del 2) - mailSå funkar det (del 2) - mail
Så funkar det (del 2) - mailPeter Antman
 
Så funkar det (del 1) - word
Så funkar det (del 1) - wordSå funkar det (del 1) - word
Så funkar det (del 1) - wordPeter Antman
 
eXtreme Programming
eXtreme Programming eXtreme Programming
eXtreme Programming Peter Antman
 
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 culturePeter Antman
 

Plus de 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
 

Dernier

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 

Dernier (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 

EJB 3.0 Walkthrough (2006)