SlideShare a Scribd company logo
1 of 19
Download to read offline
@antoine_sd @cdispec#AdoptAJSR
Adopt a JSR, why not CDI 2.0 ?
Antoine Sabot-Durand
Red Hat
@antoine_sd
@cdispec
http://cdi-spec.org
@antoine_sd @cdispec#AdoptAJSR
• A brief story of CDI
• Main Goal of CDI 2.0
• What will be in EDR1
• Adopt CDI
Adopt a JSR, why not CDI 2.0 ?
@YourTwitterHandle#DVXFR14{session hashtag} @antoine_sd @cdispec#AdoptAJSR
A
brief history
of CDI
@antoine_sd @cdispec#AdoptAJSR
•CDI stands for Contexts and Dependency Injection
•At the origin CDI was thought to fill the gap between Front spec and EJB
- All EJB session beans are also CDI beans
- CDI integrates Servlet scope as its core built-in contexts
•CDI propose a programming model which provides:
- A well-defined lifecycle for stateful objects bound to lifecycle contexts, where the
set of contexts is extensible
- A typesafe dependency injection mechanism
- The ability to decorate or to associate interceptors to objects with a typesafe
approach
- An event notification model
- An SPI allowing portable extensions to integrate cleanly with the container
What is CDI
CDI Timeline
Dec 2009 June 2013 Apr 2014 Sep 2014
CDI1.0
(Java
EE
6)
CDI1.1
(Java
EE
7)
CDI1.2
(1.1
MR)
CDI2.0
Starts
2016
CDI2.0
released
@YourTwitterHandle#DVXFR14{session hashtag} @antoine_sd @cdispec#AdoptAJSR
M
ain
Goals
of CDI 2.0
@antoine_sd @cdispec#AdoptAJSR
•We had strong feedback from the community:
- Users feedback:
- Need CDI to be more widely available in other Java EE
specifications as a transverse integration solution
- Be able to run CDI outside of a Java EE container.
- 3rd parties spec and framework feedback:
- Need to have an enhance SPI to ease integration
- Need to have a lighter footprint of CDI API / Impl
Goals
@antoine_sd @cdispec#AdoptAJSR
•Java SE support (the spec was renamed Contexts
and Dependency Injection for Java):
- Use in desktop or alternative containers
•Modularity allowing us to work on a CDI light “part”:
- Removing parts of spec requiring proxies in
implementation
- Ease 3rd
parties to develop CDI integration
- This could make CDI compatible with embedded
platform…
CDI 2.0 main goals
@YourTwitterHandle#DVXFR14{session hashtag} @antoine_sd @cdispec#AdoptAJSR
CDI 2.0
Early
Draft 1
@antoine_sd @cdispec#AdoptAJSR
•Early Draft 1 is about to be released
•We are a bit late on our schedule but the work was
bigger than expected
•Some very old and important request were included in
it
•Features are in the 10 first requested ones by the
survey
Early Draft
@antoine_sd @cdispec#AdoptAJSR
•We specified API to boot CDI in Java SE:
•Desktop and non Java EE application can now use a
standard way to boot CDI
Early Draft content, Java SE support
public static void main(String... args) {

CDIProvider provider = CDI.getCDIProvider();

CDI<Object> cdi = provider.initialize();

// retrieve a bean and do work with it

MyBean myBean = cdi.select(MyBean.class).get();

myBean.doWork();

// when done

cdi.shutdown();

}
@antoine_sd @cdispec#AdoptAJSR
•The specification is now split in 3 parts
- CDI core: the common specification regardless of the
platform
- CDI for Java SE: specific features for Java SE
- Mainly SE boot
- CDI for Java EE: specific feature for Java
- EJB, servlet, EL, JSF integration
•This split was necessary for Java SE support
•It’s also the first step for a future CDI light
Early Draft content, spec split
@antoine_sd @cdispec#AdoptAJSR
•One of the oldest user request :
•We decided to use the @Priority from
commons annotation (JSR 250)
•JSR 250 will need a Maintenance Release to
have @Priority targeting a parameter
Early Draft content, Event Ordering
void afterLogin(@Observes @Priority(APPLICATION)
LoggedInEvent event) { ... }
@antoine_sd @cdispec#AdoptAJSR
•The most popular feature in the survey:
•Based on Java 8 new Async API
•Introducing a new kind of observes for backward
compatibility with @ObservesAsync
Early Draft content, Asynchronous
public interface Event<T> {
…
public <U extends T> CompletionStage<U> fireAsync(U event);
public <U extends T> CompletionStage<U> fireAsync(U event, Executor executor);
…
}
@YourTwitterHandle@antoine_sd @cdispec#AdoptAJSR
More info on CDI 2.0
in our talk on Friday 3pm
@YourTwitterHandle#DVXFR14{session hashtag} @antoine_sd @cdispec#AdoptAJSR
Adopt CDI 2.0
@antoine_sd @cdispec#AdoptAJSR
•Reading and checking the spec after the split
•Feedback on Java SE and other features
•Vote on features on the CDI Jira
•Propose new features or IDEAS
CDI needs you!
@antoine_sd @cdispec#AdoptAJSR
•CDI Website: http://cdi-spec.org
•Weld website: http://weld.cdi-spec.org
•Mailing list: https://lists.jboss.org/mailman/listinfo/cdi-
dev
•Discussion: IRC / Freenode / #cdispec
•Keep in touch: @cdispec
Resources
Which JSR you’ll use
365 days a year?
…
JSR 365

More Related Content

What's hot

DevSecOps for Developers, How To Start (ETC 2020)
DevSecOps for Developers, How To Start (ETC 2020)DevSecOps for Developers, How To Start (ETC 2020)
DevSecOps for Developers, How To Start (ETC 2020)Patricia Aas
 
Software Supply Chain Management with Grafeas and Kritis
Software Supply Chain Management with Grafeas and KritisSoftware Supply Chain Management with Grafeas and Kritis
Software Supply Chain Management with Grafeas and KritisAysylu Greenberg
 
Software Supply Chain Management with Grafeas and Kritis
Software Supply Chain Management with Grafeas and KritisSoftware Supply Chain Management with Grafeas and Kritis
Software Supply Chain Management with Grafeas and KritisAysylu Greenberg
 
Binary Authorization in Kubernetes
Binary Authorization in KubernetesBinary Authorization in Kubernetes
Binary Authorization in KubernetesAysylu Greenberg
 
Trying to build an Open Source browser in 2020
Trying to build an Open Source browser in 2020Trying to build an Open Source browser in 2020
Trying to build an Open Source browser in 2020Patricia Aas
 
Trying to build an Open Source browser in 2020
Trying to build an Open Source browser in 2020Trying to build an Open Source browser in 2020
Trying to build an Open Source browser in 2020Patricia Aas
 
Hands on React Native: From Zero to Hero
Hands on React  Native:  From Zero to HeroHands on React  Native:  From Zero to Hero
Hands on React Native: From Zero to HeroDmitry Vinnik
 
Scala on androids
Scala on androidsScala on androids
Scala on androidsthoraage
 
Android's security architecture
Android's security architectureAndroid's security architecture
Android's security architectureOfer Rivlin, CISSP
 
The DevSecOps Builder’s Guide to the CI/CD Pipeline
The DevSecOps Builder’s Guide to the CI/CD PipelineThe DevSecOps Builder’s Guide to the CI/CD Pipeline
The DevSecOps Builder’s Guide to the CI/CD PipelineJames Wickett
 

What's hot (11)

DevSecOps for Developers, How To Start (ETC 2020)
DevSecOps for Developers, How To Start (ETC 2020)DevSecOps for Developers, How To Start (ETC 2020)
DevSecOps for Developers, How To Start (ETC 2020)
 
Software Supply Chain Management with Grafeas and Kritis
Software Supply Chain Management with Grafeas and KritisSoftware Supply Chain Management with Grafeas and Kritis
Software Supply Chain Management with Grafeas and Kritis
 
Software Supply Chain Management with Grafeas and Kritis
Software Supply Chain Management with Grafeas and KritisSoftware Supply Chain Management with Grafeas and Kritis
Software Supply Chain Management with Grafeas and Kritis
 
Android NDK: Entrando no Mundo Nativo
Android NDK: Entrando no Mundo NativoAndroid NDK: Entrando no Mundo Nativo
Android NDK: Entrando no Mundo Nativo
 
Binary Authorization in Kubernetes
Binary Authorization in KubernetesBinary Authorization in Kubernetes
Binary Authorization in Kubernetes
 
Trying to build an Open Source browser in 2020
Trying to build an Open Source browser in 2020Trying to build an Open Source browser in 2020
Trying to build an Open Source browser in 2020
 
Trying to build an Open Source browser in 2020
Trying to build an Open Source browser in 2020Trying to build an Open Source browser in 2020
Trying to build an Open Source browser in 2020
 
Hands on React Native: From Zero to Hero
Hands on React  Native:  From Zero to HeroHands on React  Native:  From Zero to Hero
Hands on React Native: From Zero to Hero
 
Scala on androids
Scala on androidsScala on androids
Scala on androids
 
Android's security architecture
Android's security architectureAndroid's security architecture
Android's security architecture
 
The DevSecOps Builder’s Guide to the CI/CD Pipeline
The DevSecOps Builder’s Guide to the CI/CD PipelineThe DevSecOps Builder’s Guide to the CI/CD Pipeline
The DevSecOps Builder’s Guide to the CI/CD Pipeline
 

Viewers also liked

Java EE, un ami qui vous veut du bien
Java EE, un ami qui vous veut du bienJava EE, un ami qui vous veut du bien
Java EE, un ami qui vous veut du bienAntoine Sabot-Durand
 
Invoke dynamite in Java EE with invoke dynamic
Invoke dynamite in Java EE with invoke dynamicInvoke dynamite in Java EE with invoke dynamic
Invoke dynamite in Java EE with invoke dynamicAntoine Sabot-Durand
 
Introduction to cdi given at java one 2014
Introduction to cdi given at java one 2014Introduction to cdi given at java one 2014
Introduction to cdi given at java one 2014Antoine Sabot-Durand
 
CDI mis en pratique avec Seam Social et Weld OSGI
CDI mis en pratique avec Seam Social et Weld OSGICDI mis en pratique avec Seam Social et Weld OSGI
CDI mis en pratique avec Seam Social et Weld OSGIAntoine Sabot-Durand
 
Nashorn in the future (Japanese)
Nashorn in the future (Japanese)Nashorn in the future (Japanese)
Nashorn in the future (Japanese)Logico
 
The Magnificent java EE 7 in Wildfly-O-Rama
The Magnificent java EE 7 in Wildfly-O-RamaThe Magnificent java EE 7 in Wildfly-O-Rama
The Magnificent java EE 7 in Wildfly-O-RamaAntoine Sabot-Durand
 
1/3 : introduction to CDI - Antoine Sabot-Durand
1/3 : introduction to CDI - Antoine Sabot-Durand1/3 : introduction to CDI - Antoine Sabot-Durand
1/3 : introduction to CDI - Antoine Sabot-DurandSOAT
 
Participate in the Future of Java Oredev
Participate in the Future of Java OredevParticipate in the Future of Java Oredev
Participate in the Future of Java OredevHeather VanCura
 
Using RSS feeds for content curation and social scheduling
Using RSS feeds for content curation and social schedulingUsing RSS feeds for content curation and social scheduling
Using RSS feeds for content curation and social schedulingAnna Hamilton-Gunn
 
How is Java / JVM built ? Back then and now...
How is Java / JVM built ? Back then and now...How is Java / JVM built ? Back then and now...
How is Java / JVM built ? Back then and now...Mani Sarkar
 
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0David Delabassee
 
Fais ce que tu veux avec Java EE - Devoxx France 2014
Fais ce que tu veux avec Java EE - Devoxx France 2014Fais ce que tu veux avec Java EE - Devoxx France 2014
Fais ce que tu veux avec Java EE - Devoxx France 2014Antoine Sabot-Durand
 

Viewers also liked (20)

Mute Java EE DNA with CDI
Mute Java EE DNA with CDI Mute Java EE DNA with CDI
Mute Java EE DNA with CDI
 
Java EE, un ami qui vous veut du bien
Java EE, un ami qui vous veut du bienJava EE, un ami qui vous veut du bien
Java EE, un ami qui vous veut du bien
 
Devoxx Java Social and Agorava
Devoxx Java Social and AgoravaDevoxx Java Social and Agorava
Devoxx Java Social and Agorava
 
Invoke dynamite in Java EE with invoke dynamic
Invoke dynamite in Java EE with invoke dynamicInvoke dynamite in Java EE with invoke dynamic
Invoke dynamite in Java EE with invoke dynamic
 
Going further with CDI 1.2
Going further with CDI 1.2Going further with CDI 1.2
Going further with CDI 1.2
 
Apache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolboxApache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolbox
 
Introduction to cdi given at java one 2014
Introduction to cdi given at java one 2014Introduction to cdi given at java one 2014
Introduction to cdi given at java one 2014
 
CDI mis en pratique avec Seam Social et Weld OSGI
CDI mis en pratique avec Seam Social et Weld OSGICDI mis en pratique avec Seam Social et Weld OSGI
CDI mis en pratique avec Seam Social et Weld OSGI
 
Java EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's QuarrelJava EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's Quarrel
 
Nashorn in the future (Japanese)
Nashorn in the future (Japanese)Nashorn in the future (Japanese)
Nashorn in the future (Japanese)
 
CDI In Real Life
CDI In Real LifeCDI In Real Life
CDI In Real Life
 
The Magnificent java EE 7 in Wildfly-O-Rama
The Magnificent java EE 7 in Wildfly-O-RamaThe Magnificent java EE 7 in Wildfly-O-Rama
The Magnificent java EE 7 in Wildfly-O-Rama
 
1/3 : introduction to CDI - Antoine Sabot-Durand
1/3 : introduction to CDI - Antoine Sabot-Durand1/3 : introduction to CDI - Antoine Sabot-Durand
1/3 : introduction to CDI - Antoine Sabot-Durand
 
Participate in the Future of Java Oredev
Participate in the Future of Java OredevParticipate in the Future of Java Oredev
Participate in the Future of Java Oredev
 
Using RSS feeds for content curation and social scheduling
Using RSS feeds for content curation and social schedulingUsing RSS feeds for content curation and social scheduling
Using RSS feeds for content curation and social scheduling
 
How is Java / JVM built ? Back then and now...
How is Java / JVM built ? Back then and now...How is Java / JVM built ? Back then and now...
How is Java / JVM built ? Back then and now...
 
How to run a hackday
How to run a hackdayHow to run a hackday
How to run a hackday
 
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0
 
Fais ce que tu veux avec Java EE - Devoxx France 2014
Fais ce que tu veux avec Java EE - Devoxx France 2014Fais ce que tu veux avec Java EE - Devoxx France 2014
Fais ce que tu veux avec Java EE - Devoxx France 2014
 
Reactive android
Reactive androidReactive android
Reactive android
 

Similar to Adopt a JSR: CDI 2.0 at Devoxx UK

AngularJSTO presentation
AngularJSTO presentationAngularJSTO presentation
AngularJSTO presentationAlan Hietala
 
Prospectus Editing Tool (PET)
Prospectus Editing Tool (PET)Prospectus Editing Tool (PET)
Prospectus Editing Tool (PET)MrJ1971
 
Prospectus editing at the University of Bristol- an overview:TERMINALFOUR t44...
Prospectus editing at the University of Bristol- an overview:TERMINALFOUR t44...Prospectus editing at the University of Bristol- an overview:TERMINALFOUR t44...
Prospectus editing at the University of Bristol- an overview:TERMINALFOUR t44...Terminalfour
 
Managing Data in Jakarta EE Applications
Managing Data in Jakarta EE ApplicationsManaging Data in Jakarta EE Applications
Managing Data in Jakarta EE ApplicationsBuhake Sindi
 
JavaOne 2014 Java EE 8 Booth Slides
JavaOne 2014 Java EE 8 Booth SlidesJavaOne 2014 Java EE 8 Booth Slides
JavaOne 2014 Java EE 8 Booth SlidesEdward Burns
 
Spring - CDI Interop
Spring - CDI InteropSpring - CDI Interop
Spring - CDI InteropRay Ploski
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as CodePrasant Kumar
 
Using APIs
Using APIsUsing APIs
Using APIsAkana
 
(ATS6-DEV02) Web Application Strategies
(ATS6-DEV02) Web Application Strategies(ATS6-DEV02) Web Application Strategies
(ATS6-DEV02) Web Application StrategiesBIOVIA
 
Rails and iOS with RestKit
Rails and iOS with RestKitRails and iOS with RestKit
Rails and iOS with RestKitAndrew Culver
 
Building an intelligent big data application in 30 minutes
Building an intelligent big data application in 30 minutesBuilding an intelligent big data application in 30 minutes
Building an intelligent big data application in 30 minutesClaudiu Barbura
 
CIS13: OpenStack API Security
CIS13: OpenStack API SecurityCIS13: OpenStack API Security
CIS13: OpenStack API SecurityCloudIDSummit
 
Introduction to KubeDirector - SF Kubernetes Meetup
Introduction to KubeDirector - SF Kubernetes MeetupIntroduction to KubeDirector - SF Kubernetes Meetup
Introduction to KubeDirector - SF Kubernetes MeetupBlueData, Inc.
 
3-Years-of-OpenStack-Intel-IT
3-Years-of-OpenStack-Intel-IT3-Years-of-OpenStack-Intel-IT
3-Years-of-OpenStack-Intel-ITTom Fieldhouse
 
AshishKumarResume2_MVC
AshishKumarResume2_MVCAshishKumarResume2_MVC
AshishKumarResume2_MVCAshish Dwivedi
 
Enterprise Data Governance and Compliance at Scale with Sri Eshasubbiah and S...
Enterprise Data Governance and Compliance at Scale with Sri Eshasubbiah and S...Enterprise Data Governance and Compliance at Scale with Sri Eshasubbiah and S...
Enterprise Data Governance and Compliance at Scale with Sri Eshasubbiah and S...Databricks
 

Similar to Adopt a JSR: CDI 2.0 at Devoxx UK (20)

AngularJSTO presentation
AngularJSTO presentationAngularJSTO presentation
AngularJSTO presentation
 
Prospectus Editing Tool (PET)
Prospectus Editing Tool (PET)Prospectus Editing Tool (PET)
Prospectus Editing Tool (PET)
 
Prospectus editing at the University of Bristol- an overview:TERMINALFOUR t44...
Prospectus editing at the University of Bristol- an overview:TERMINALFOUR t44...Prospectus editing at the University of Bristol- an overview:TERMINALFOUR t44...
Prospectus editing at the University of Bristol- an overview:TERMINALFOUR t44...
 
Managing Data in Jakarta EE Applications
Managing Data in Jakarta EE ApplicationsManaging Data in Jakarta EE Applications
Managing Data in Jakarta EE Applications
 
JavaOne 2014 Java EE 8 Booth Slides
JavaOne 2014 Java EE 8 Booth SlidesJavaOne 2014 Java EE 8 Booth Slides
JavaOne 2014 Java EE 8 Booth Slides
 
Spring - CDI Interop
Spring - CDI InteropSpring - CDI Interop
Spring - CDI Interop
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
 
Using APIs
Using APIsUsing APIs
Using APIs
 
(ATS6-DEV02) Web Application Strategies
(ATS6-DEV02) Web Application Strategies(ATS6-DEV02) Web Application Strategies
(ATS6-DEV02) Web Application Strategies
 
Rails and iOS with RestKit
Rails and iOS with RestKitRails and iOS with RestKit
Rails and iOS with RestKit
 
Building an intelligent big data application in 30 minutes
Building an intelligent big data application in 30 minutesBuilding an intelligent big data application in 30 minutes
Building an intelligent big data application in 30 minutes
 
JavaCro'15 - Web UI best practice integration with Java EE 7 - Peter Lehto
JavaCro'15 - Web UI best practice integration with Java EE 7 - Peter LehtoJavaCro'15 - Web UI best practice integration with Java EE 7 - Peter Lehto
JavaCro'15 - Web UI best practice integration with Java EE 7 - Peter Lehto
 
Apache DeltaSpike: The CDI Toolbox
Apache DeltaSpike: The CDI ToolboxApache DeltaSpike: The CDI Toolbox
Apache DeltaSpike: The CDI Toolbox
 
CIS13: OpenStack API Security
CIS13: OpenStack API SecurityCIS13: OpenStack API Security
CIS13: OpenStack API Security
 
Introduction to KubeDirector - SF Kubernetes Meetup
Introduction to KubeDirector - SF Kubernetes MeetupIntroduction to KubeDirector - SF Kubernetes Meetup
Introduction to KubeDirector - SF Kubernetes Meetup
 
77402_VishalLaljeet
77402_VishalLaljeet77402_VishalLaljeet
77402_VishalLaljeet
 
3-Years-of-OpenStack-Intel-IT
3-Years-of-OpenStack-Intel-IT3-Years-of-OpenStack-Intel-IT
3-Years-of-OpenStack-Intel-IT
 
So, you wanna build a SSO
So, you wanna build a SSOSo, you wanna build a SSO
So, you wanna build a SSO
 
AshishKumarResume2_MVC
AshishKumarResume2_MVCAshishKumarResume2_MVC
AshishKumarResume2_MVC
 
Enterprise Data Governance and Compliance at Scale with Sri Eshasubbiah and S...
Enterprise Data Governance and Compliance at Scale with Sri Eshasubbiah and S...Enterprise Data Governance and Compliance at Scale with Sri Eshasubbiah and S...
Enterprise Data Governance and Compliance at Scale with Sri Eshasubbiah and S...
 

Recently uploaded

Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptrcbcrtm
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineeringssuserb3a23b
 

Recently uploaded (20)

Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.ppt
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineering
 

Adopt a JSR: CDI 2.0 at Devoxx UK

  • 1. @antoine_sd @cdispec#AdoptAJSR Adopt a JSR, why not CDI 2.0 ? Antoine Sabot-Durand Red Hat @antoine_sd @cdispec http://cdi-spec.org
  • 2. @antoine_sd @cdispec#AdoptAJSR • A brief story of CDI • Main Goal of CDI 2.0 • What will be in EDR1 • Adopt CDI Adopt a JSR, why not CDI 2.0 ?
  • 3. @YourTwitterHandle#DVXFR14{session hashtag} @antoine_sd @cdispec#AdoptAJSR A brief history of CDI
  • 4. @antoine_sd @cdispec#AdoptAJSR •CDI stands for Contexts and Dependency Injection •At the origin CDI was thought to fill the gap between Front spec and EJB - All EJB session beans are also CDI beans - CDI integrates Servlet scope as its core built-in contexts •CDI propose a programming model which provides: - A well-defined lifecycle for stateful objects bound to lifecycle contexts, where the set of contexts is extensible - A typesafe dependency injection mechanism - The ability to decorate or to associate interceptors to objects with a typesafe approach - An event notification model - An SPI allowing portable extensions to integrate cleanly with the container What is CDI
  • 5. CDI Timeline Dec 2009 June 2013 Apr 2014 Sep 2014 CDI1.0 (Java EE 6) CDI1.1 (Java EE 7) CDI1.2 (1.1 MR) CDI2.0 Starts 2016 CDI2.0 released
  • 6. @YourTwitterHandle#DVXFR14{session hashtag} @antoine_sd @cdispec#AdoptAJSR M ain Goals of CDI 2.0
  • 7. @antoine_sd @cdispec#AdoptAJSR •We had strong feedback from the community: - Users feedback: - Need CDI to be more widely available in other Java EE specifications as a transverse integration solution - Be able to run CDI outside of a Java EE container. - 3rd parties spec and framework feedback: - Need to have an enhance SPI to ease integration - Need to have a lighter footprint of CDI API / Impl Goals
  • 8. @antoine_sd @cdispec#AdoptAJSR •Java SE support (the spec was renamed Contexts and Dependency Injection for Java): - Use in desktop or alternative containers •Modularity allowing us to work on a CDI light “part”: - Removing parts of spec requiring proxies in implementation - Ease 3rd parties to develop CDI integration - This could make CDI compatible with embedded platform… CDI 2.0 main goals
  • 9. @YourTwitterHandle#DVXFR14{session hashtag} @antoine_sd @cdispec#AdoptAJSR CDI 2.0 Early Draft 1
  • 10. @antoine_sd @cdispec#AdoptAJSR •Early Draft 1 is about to be released •We are a bit late on our schedule but the work was bigger than expected •Some very old and important request were included in it •Features are in the 10 first requested ones by the survey Early Draft
  • 11. @antoine_sd @cdispec#AdoptAJSR •We specified API to boot CDI in Java SE: •Desktop and non Java EE application can now use a standard way to boot CDI Early Draft content, Java SE support public static void main(String... args) {
 CDIProvider provider = CDI.getCDIProvider();
 CDI<Object> cdi = provider.initialize();
 // retrieve a bean and do work with it
 MyBean myBean = cdi.select(MyBean.class).get();
 myBean.doWork();
 // when done
 cdi.shutdown();
 }
  • 12. @antoine_sd @cdispec#AdoptAJSR •The specification is now split in 3 parts - CDI core: the common specification regardless of the platform - CDI for Java SE: specific features for Java SE - Mainly SE boot - CDI for Java EE: specific feature for Java - EJB, servlet, EL, JSF integration •This split was necessary for Java SE support •It’s also the first step for a future CDI light Early Draft content, spec split
  • 13. @antoine_sd @cdispec#AdoptAJSR •One of the oldest user request : •We decided to use the @Priority from commons annotation (JSR 250) •JSR 250 will need a Maintenance Release to have @Priority targeting a parameter Early Draft content, Event Ordering void afterLogin(@Observes @Priority(APPLICATION) LoggedInEvent event) { ... }
  • 14. @antoine_sd @cdispec#AdoptAJSR •The most popular feature in the survey: •Based on Java 8 new Async API •Introducing a new kind of observes for backward compatibility with @ObservesAsync Early Draft content, Asynchronous public interface Event<T> { … public <U extends T> CompletionStage<U> fireAsync(U event); public <U extends T> CompletionStage<U> fireAsync(U event, Executor executor); … }
  • 15. @YourTwitterHandle@antoine_sd @cdispec#AdoptAJSR More info on CDI 2.0 in our talk on Friday 3pm
  • 17. @antoine_sd @cdispec#AdoptAJSR •Reading and checking the spec after the split •Feedback on Java SE and other features •Vote on features on the CDI Jira •Propose new features or IDEAS CDI needs you!
  • 18. @antoine_sd @cdispec#AdoptAJSR •CDI Website: http://cdi-spec.org •Weld website: http://weld.cdi-spec.org •Mailing list: https://lists.jboss.org/mailman/listinfo/cdi- dev •Discussion: IRC / Freenode / #cdispec •Keep in touch: @cdispec Resources
  • 19. Which JSR you’ll use 365 days a year? … JSR 365