SlideShare une entreprise Scribd logo
1  sur  154
Télécharger pour lire hors ligne
CDI : How do I ?
by antonio goncalves
@agoncal
2@agoncal
Antonio Goncalves
What is CDI ?
4@agoncal
What is CDI ?
● Dependency injection
● Lose coupling, strong typing
● Context management
● Interceptors and decorators
● Event bus
● Extensions
5@agoncal
History of CDI
6@agoncal
Implementations
Demo
-
Creating a Web App
8@agoncal
Demos with JBoss Forge
● Java EE scaffolding tool
● Shell commands
● CRUD application
● Gets you start quickly
● Takes care of integration
● Plugin based
9@agoncal
Demo: Creating a Web App
Dependency Injection
11@agoncal
How Do I ?
12@agoncal
Use @Inject !
13@agoncal
@Inject on Attributes
public class BookBean implements Serializable {
@Inject
private NumberGenerator numberGenerator;
@Inject
private ItemService itemService;
// ...
}
14@agoncal
@Inject on Constructor
public class BookBean implements Serializable {
private NumberGenerator numberGenerator;
private ItemService itemService;
@Inject
public BookBean(NumberGenerator numberGenerator,
ItemService srv){
this.numberGenerator = numberGenerator;
this.itemService = srv;
}
// ...
}
15@agoncal
@Inject on Setters
public class BookBean implements Serializable {
private NumberGenerator numberGenerator;
private ItemService itemService;
@Inject
public void setNumberGenerator(NumberGenerator numGen){
this.numberGenerator = numGen;
}
@Inject
public void setItemService(ItemService itemService) {
this.itemService = itemService;
}
// ...
}
16@agoncal
Activate CDI
● In CDI 1.0 beans.xml in archive
● Since CDI 1.1 it's activated by default
●
All classes having a bean definition annotation
● beans.xml to deactivate or activate all
●
Archive vs Bean archive
Demo
-
@Inject
18@agoncal
Demo: @Inject One Implementation
Qualifiers
20@agoncal
How Do I ?
21@agoncal
How Do I ?
22@agoncal
How Do I ?
@Default
23@agoncal
Use Qualifiers !
@ThirteenDigits
24@agoncal
Use Qualifiers !
@EightDigits
25@agoncal
A Qualifier
@Qualifier
@Retention(RUNTIME)
@Target({ METHOD, FIELD, PARAMETER, TYPE })
@Documented
public @interface ThirteenDigits {
}
26@agoncal
Qualifying an Injection Point
public class BookBean implements Serializable {
@Inject @ThirteenDigits
private NumberGenerator numberGenerator;
@Inject
private ItemService itemService;
// ...
}
27@agoncal
Qualifying an Injection Point
public class BookBean implements Serializable {
@Inject @ThirteenDigits
private NumberGenerator numberGenerator;
@Inject @Default
private ItemService itemService;
// ...
}
28@agoncal
Qualifying a Bean
@ThirteenDigits
public class IsbnGenerator implements NumberGenerator {
@Override
public String generateNumber() {
return "13-" + Math.abs(new Random().nextInt());
}
}
Demo
-
Qualifiers
30@agoncal
Demo: @Inject One Implementation
Producers
32@agoncal
How Do I ?
public class BookBean implements Serializable {
@Inject
private EntityManager em;
@Inject
private Logger logger;
// ...
}
33@agoncal
How Do I ?
public class BookBean implements Serializable {
@Inject
private EntityManager em;
@Inject
private Logger logger;
// ...
}
34@agoncal
How Do I ?
public class BookBean implements Serializable {
@Inject
private EntityManager em;
@Inject
private Logger logger;
// ...
}
Several persistence units
@PersistenceContext(unitName = "myPU1")
@PersistenceContext(unitName = "myPU2")
35@agoncal
How Do I ?
public class BookBean implements Serializable {
@Inject
private EntityManager em;
@Inject
private Logger logger;
// ...
}
Third party framewok
36@agoncal
Use Producers !
public class BookBean implements Serializable {
@Inject
private EntityManager em;
// ...
}
public class ResourceProducer {
@Produces
@PersistenceContext(unitName = "myPU")
private EntityManager entityManager;
}
37@agoncal
Use Producers !
public class BookBean implements Serializable {
@Inject
private Logger logger;
// ...
}
public class ResourceProducer {
@Produces
private Logger produceLogger(InjectionPoint ip) {
return
Logger.getLogger(ip.getMember().getDeclaringClass().getName());
}
}
Demo
-
Producers
39@agoncal
Demo: Producers
Web tier
&
Service tier
41@agoncal
How Do I ?
42@agoncal
How Do I ?
43@agoncal
Use Expression Language...
44@agoncal
Use Expression Language and Scopes !
45@agoncal
Service Tier
@Transactional
public class BookBean implements Serializable {
@Inject
private EntityManager em;
public void update() {
em.persist(book);
}
}
46@agoncal
Service Tier + Web Tier
@Named
@Transactional
public class BookBean implements Serializable {
@Inject
private EntityManager em;
public void update() {
em.persist(book);
}
}
<h:commandLink value="Create"
action='#{bookBean.update}'/>
47@agoncal
Service Tier + Web Tier
@Named("service")
@Transactional
public class BookBean implements Serializable {
@Inject
private EntityManager em;
public void update() {
em.persist(book);
}
}
<h:commandLink value="Create"
action='#{service.update}'/>
48@agoncal
Several scopes
● @Dependent (default)
● @ApplicationScoped, @SessionScoped,
@RequestScoped
● @ConversationScoped
● Create your own
● @TransactionalScoped
● @ViewScoped
● @ThreadScoped
● @ClusterScoped
49@agoncal
Just choose the right scope
@Named
@RequestScoped
@Transactional
public class BookBean implements Serializable {
public void update() {
}
public void delete() {
}
}
50@agoncal
Just choose the right scope
@Named
@SessionScoped
@Transactional
public class BookBean implements Serializable {
public void update() {
}
public void delete() {
}
}
51@agoncal
Just choose the right scope
@Named
@ConversationScoped
@Transactional
public class BookBean implements Serializable {
@Inject
private Conversation conversation;
public void update() {
conversation.begin();
}
public void delete() {
conversation.end();
}
}
Demo
-
@Named & scope
53@agoncal
Demo: @Named & Scope
</>
Alternatives
56@agoncal
How Do I ?
public class MockGenerator implements NumberGenerator {
public String generateNumber() {
return "mock-" + Math.abs(new Random().nextInt());
}
}
57@agoncal
How Do I ?
@Mock
public class MockGenerator implements NumberGenerator {
public String generateNumber() {
return "mock-" + Math.abs(new Random().nextInt());
}
}
public class BookBean implements Serializable {
@Inject @Mock
private NumberGenerator numberGenerator;
// ...
}
58@agoncal
How Do I ?
@Mock
public class MockGenerator implements NumberGenerator {
public String generateNumber() {
return "mock-" + Math.abs(new Random().nextInt());
}
}
public class BookBean implements Serializable {
@Inject @Mock
private NumberGenerator numberGenerator;
// ...
}
59@agoncal
Use an Alternative !
@Alternative
@EightDigits
public class MockGenerator implements NumberGenerator {
public String generateNumber() {
return "mock-" + Math.abs(new Random().nextInt());
}
}
public class BookBean implements Serializable {
@Inject @EightDigits
private NumberGenerator numberGenerator;
// ...
}
60@agoncal
Activate the Alternative
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
...
version="1.1" bean-discovery-mode="all">
<alternatives>
<class>com.foo.MockGenerator</class>
</alternatives>
</beans>
Demo
-
Alternatives
62@agoncal
Demo: Alternatives
Events
64@agoncal
How Do I ?
65@agoncal
How Do I ?
Still too coupled
66@agoncal
Use Events !




67@agoncal
Fire and Observe
public class BookBean implements Serializable {
@Inject
private Event<Book> boughtEvent;
public void update() {
boughtEvent.fire(book);
}
}
public class InventoryService {
private void observeBooks (@Observes Book book) {
logger.info("Book recevied " + book.getTitle());
}
}
68@agoncal
Fire and Observe with Qualifier
public class BookBean implements Serializable {
@Inject @Paper
private Event<Book> boughtEvent;
public void update() {
boughtEvent.fire(book);
}
}
public class InventoryService {
private void observeBooks (@Observes @Paper Book book) {
logger.info("Book recevied " + book.getTitle());
}
}
Demo
-
Events
70@agoncal
Demo: Events
CDI : So Much More
72@agoncal
CDI : So Much More
73@agoncal
CDI Extension ecosystem
74@agoncal
CDI Course on PluralSight
http://www.pluralsight.com/courses/context-dependency-injection-1-1
Thanks
www.antoniogoncalves.org
antonio.goncalves@gmail.com
@agoncal
@devoxxfr
@lescastcodeurs
Q & A
77@agoncal
Creative Commons
● Attribution — You must attribute the work in
the manner specified by the author or licensor
(but not in any way that suggests that they
endorse you or your use of the work).
● Noncommercial — You may not use this work for
commercial purposes.
● Share Alike — If you alter, transform, or build
upon this work, you may distribute the resulting
work only under the same or similar license to
this one.
CDI : How do I ?
by antonio goncalves
@agoncal
2@agoncal
Antonio Goncalves
What is CDI ?
4@agoncal
What is CDI ?
●
Dependency injection
● Lose coupling, strong typing
●
Context management
●
Interceptors and decorators
● Event bus
●
Extensions
5@agoncal
History of CDI
6@agoncal
Implementations
Demo
-
Creating a Web App
8@agoncal
Demos with JBoss Forge
●
Java EE scaffolding tool
● Shell commands
●
CRUD application
●
Gets you start quickly
● Takes care of integration
●
Plugin based
9@agoncal
Demo: Creating a Web App
Dependency Injection
11@agoncal
How Do I ?
12@agoncal
Use @Inject !
13@agoncal
@Inject on Attributes
public class BookBean implements Serializable {
@Inject
private NumberGenerator numberGenerator;
@Inject
private ItemService itemService;
// ...
}
14@agoncal
@Inject on Constructor
public class BookBean implements Serializable {
private NumberGenerator numberGenerator;
private ItemService itemService;
@Inject
public BookBean(NumberGenerator numberGenerator,
ItemService srv){
this.numberGenerator = numberGenerator;
this.itemService = srv;
}
// ...
}
15@agoncal
@Inject on Setters
public class BookBean implements Serializable {
private NumberGenerator numberGenerator;
private ItemService itemService;
@Inject
public void setNumberGenerator(NumberGenerator numGen){
this.numberGenerator = numGen;
}
@Inject
public void setItemService(ItemService itemService) {
this.itemService = itemService;
}
// ...
}
16@agoncal
Activate CDI
● In CDI 1.0 beans.xml in archive
● Since CDI 1.1 it's activated by default
●
All classes having a bean definition annotation
● beans.xml to deactivate or activate all
●
Archive vs Bean archive
Demo
-
@Inject
18@agoncal
Demo: @Inject One Implementation
Qualifiers
20@agoncal
How Do I ?
21@agoncal
How Do I ?
22@agoncal
How Do I ?
@Default
23@agoncal
Use Qualifiers !
@ThirteenDigits
24@agoncal
Use Qualifiers !
@EightDigits
25@agoncal
A Qualifier
@Qualifier
@Retention(RUNTIME)
@Target({ METHOD, FIELD, PARAMETER, TYPE })
@Documented
public @interface ThirteenDigits {
}
26@agoncal
Qualifying an Injection Point
public class BookBean implements Serializable {
@Inject @ThirteenDigits
private NumberGenerator numberGenerator;
@Inject
private ItemService itemService;
// ...
}
27@agoncal
Qualifying an Injection Point
public class BookBean implements Serializable {
@Inject @ThirteenDigits
private NumberGenerator numberGenerator;
@Inject @Default
private ItemService itemService;
// ...
}
28@agoncal
Qualifying a Bean
@ThirteenDigits
public class IsbnGenerator implements NumberGenerator {
@Override
public String generateNumber() {
return "13-" + Math.abs(new Random().nextInt());
}
}
Demo
-
Qualifiers
30@agoncal
Demo: @Inject One Implementation
Producers
32@agoncal
How Do I ?
public class BookBean implements Serializable {
@Inject
private EntityManager em;
@Inject
private Logger logger;
// ...
}
33@agoncal
How Do I ?
public class BookBean implements Serializable {
@Inject
private EntityManager em;
@Inject
private Logger logger;
// ...
}
34@agoncal
How Do I ?
public class BookBean implements Serializable {
@Inject
private EntityManager em;
@Inject
private Logger logger;
// ...
}
Several persistence units
@PersistenceContext(unitName = "myPU1")
@PersistenceContext(unitName = "myPU2")
35@agoncal
How Do I ?
public class BookBean implements Serializable {
@Inject
private EntityManager em;
@Inject
private Logger logger;
// ...
}
Third party framewok
36@agoncal
Use Producers !
public class BookBean implements Serializable {
@Inject
private EntityManager em;
// ...
}
public class ResourceProducer {
@Produces
@PersistenceContext(unitName = "myPU")
private EntityManager entityManager;
}
37@agoncal
Use Producers !
public class BookBean implements Serializable {
@Inject
private Logger logger;
// ...
}
public class ResourceProducer {
@Produces
private Logger produceLogger(InjectionPoint ip) {
return
Logger.getLogger(ip.getMember().getDeclaringClass().getName());
}
}
Demo
-
Producers
39@agoncal
Demo: Producers
Web tier
&
Service tier
41@agoncal
How Do I ?
42@agoncal
How Do I ?
43@agoncal
Use Expression Language...
44@agoncal
Use Expression Language and Scopes !
45@agoncal
Service Tier
@Transactional
public class BookBean implements Serializable {
@Inject
private EntityManager em;
public void update() {
em.persist(book);
}
}
46@agoncal
Service Tier + Web Tier
@Named
@Transactional
public class BookBean implements Serializable {
@Inject
private EntityManager em;
public void update() {
em.persist(book);
}
}
<h:commandLink value="Create"
action='#{bookBean.update}'/>
47@agoncal
Service Tier + Web Tier
@Named("service")
@Transactional
public class BookBean implements Serializable {
@Inject
private EntityManager em;
public void update() {
em.persist(book);
}
}
<h:commandLink value="Create"
action='#{service.update}'/>
48@agoncal
Several scopes
● @Dependent (default)
● @ApplicationScoped, @SessionScoped,
@RequestScoped
● @ConversationScoped
● Create your own
● @TransactionalScoped
● @ViewScoped
● @ThreadScoped
● @ClusterScoped
49@agoncal
Just choose the right scope
@Named
@RequestScoped
@Transactional
public class BookBean implements Serializable {
public void update() {
}
public void delete() {
}
}
50@agoncal
Just choose the right scope
@Named
@SessionScoped
@Transactional
public class BookBean implements Serializable {
public void update() {
}
public void delete() {
}
}
51@agoncal
Just choose the right scope
@Named
@ConversationScoped
@Transactional
public class BookBean implements Serializable {
@Inject
private Conversation conversation;
public void update() {
conversation.begin();
}
public void delete() {
conversation.end();
}
}
Demo
-
@Named & scope
53@agoncal
Demo: @Named & Scope
</>
Alternatives
56@agoncal
How Do I ?
public class MockGenerator implements NumberGenerator {
public String generateNumber() {
return "mock-" + Math.abs(new Random().nextInt());
}
}
57@agoncal
How Do I ?
@Mock
public class MockGenerator implements NumberGenerator {
public String generateNumber() {
return "mock-" + Math.abs(new Random().nextInt());
}
}
public class BookBean implements Serializable {
@Inject @Mock
private NumberGenerator numberGenerator;
// ...
}
58@agoncal
How Do I ?
@Mock
public class MockGenerator implements NumberGenerator {
public String generateNumber() {
return "mock-" + Math.abs(new Random().nextInt());
}
}
public class BookBean implements Serializable {
@Inject @Mock
private NumberGenerator numberGenerator;
// ...
}
59@agoncal
Use an Alternative !
@Alternative
@EightDigits
public class MockGenerator implements NumberGenerator {
public String generateNumber() {
return "mock-" + Math.abs(new Random().nextInt());
}
}
public class BookBean implements Serializable {
@Inject @EightDigits
private NumberGenerator numberGenerator;
// ...
}
60@agoncal
Activate the Alternative
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
...
version="1.1" bean-discovery-mode="all">
<alternatives>
<class>com.foo.MockGenerator</class>
</alternatives>
</beans>
Demo
-
Alternatives
62@agoncal
Demo: Alternatives
Events
64@agoncal
How Do I ?
65@agoncal
How Do I ?
Still too coupled
66@agoncal
Use Events !




67@agoncal
Fire and Observe
public class BookBean implements Serializable {
@Inject
private Event<Book> boughtEvent;
public void update() {
boughtEvent.fire(book);
}
}
public class InventoryService {
private void observeBooks (@Observes Book book) {
logger.info("Book recevied " + book.getTitle());
}
}
68@agoncal
Fire and Observe with Qualifier
public class BookBean implements Serializable {
@Inject @Paper
private Event<Book> boughtEvent;
public void update() {
boughtEvent.fire(book);
}
}
public class InventoryService {
private void observeBooks (@Observes @Paper Book book) {
logger.info("Book recevied " + book.getTitle());
}
}
Demo
-
Events
70@agoncal
Demo: Events
CDI : So Much More
72@agoncal
CDI : So Much More
73@agoncal
CDI Extension ecosystem
74@agoncal
CDI Course on PluralSight
http://www.pluralsight.com/courses/context-dependency-injection-1-1
Thanks
www.antoniogoncalves.org
antonio.goncalves@gmail.com
@agoncal
@devoxxfr
@lescastcodeurs
Q & A
77@agoncal
Creative Commons
● Attribution — You must attribute the work in
the manner specified by the author or licensor
(but not in any way that suggests that they
endorse you or your use of the work).
●
Noncommercial — You may not use this work for
commercial purposes.
● Share Alike — If you alter, transform, or build
upon this work, you may distribute the resulting
work only under the same or similar license to
this one.

Contenu connexe

Tendances

Javaslang Talk @ Javaland 2017
Javaslang Talk @ Javaland 2017Javaslang Talk @ Javaland 2017
Javaslang Talk @ Javaland 2017David Schmitz
 
Why Spring <3 Kotlin
Why Spring <3 KotlinWhy Spring <3 Kotlin
Why Spring <3 KotlinVMware Tanzu
 
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)Ontico
 
Daggerate your code - Write your own annotation processor
Daggerate your code - Write your own annotation processorDaggerate your code - Write your own annotation processor
Daggerate your code - Write your own annotation processorBartosz Kosarzycki
 
Quickly Testing Qt Desktop Applications
Quickly Testing Qt Desktop ApplicationsQuickly Testing Qt Desktop Applications
Quickly Testing Qt Desktop ApplicationsClare Macrae
 
Come and Play! with Java EE 7
Come and Play! with Java EE 7Come and Play! with Java EE 7
Come and Play! with Java EE 7Antonio Goncalves
 
Dagger 2. The Right Way to Dependency Injections
Dagger 2. The Right Way to Dependency InjectionsDagger 2. The Right Way to Dependency Injections
Dagger 2. The Right Way to Dependency InjectionsGlobalLogic Ukraine
 
Dagger 2. Right way to do Dependency Injection
Dagger 2. Right way to do Dependency InjectionDagger 2. Right way to do Dependency Injection
Dagger 2. Right way to do Dependency InjectionStfalcon Meetups
 
Reactive Programming with JavaScript
Reactive Programming with JavaScriptReactive Programming with JavaScript
Reactive Programming with JavaScriptCodemotion
 
Using hilt in a modularized project
Using hilt in a modularized projectUsing hilt in a modularized project
Using hilt in a modularized projectFabio Collini
 
A friend in need - A JS indeed
A friend in need - A JS indeedA friend in need - A JS indeed
A friend in need - A JS indeedYonatan Levin
 
CDI do básico ao avançado
CDI do básico ao avançadoCDI do básico ao avançado
CDI do básico ao avançadoAlberto Souza
 
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
 
Testing Java Code Effectively
Testing Java Code EffectivelyTesting Java Code Effectively
Testing Java Code EffectivelyAndres Almiray
 
RSpec 3.0: Under the Covers
RSpec 3.0: Under the CoversRSpec 3.0: Under the Covers
RSpec 3.0: Under the CoversBrian Gesiak
 

Tendances (20)

Javaslang @ Devoxx
Javaslang @ DevoxxJavaslang @ Devoxx
Javaslang @ Devoxx
 
Javaslang Talk @ Javaland 2017
Javaslang Talk @ Javaland 2017Javaslang Talk @ Javaland 2017
Javaslang Talk @ Javaland 2017
 
Why Spring <3 Kotlin
Why Spring <3 KotlinWhy Spring <3 Kotlin
Why Spring <3 Kotlin
 
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
 
Daggerate your code - Write your own annotation processor
Daggerate your code - Write your own annotation processorDaggerate your code - Write your own annotation processor
Daggerate your code - Write your own annotation processor
 
Quickly Testing Qt Desktop Applications
Quickly Testing Qt Desktop ApplicationsQuickly Testing Qt Desktop Applications
Quickly Testing Qt Desktop Applications
 
Come and Play! with Java EE 7
Come and Play! with Java EE 7Come and Play! with Java EE 7
Come and Play! with Java EE 7
 
Dagger 2. The Right Way to Dependency Injections
Dagger 2. The Right Way to Dependency InjectionsDagger 2. The Right Way to Dependency Injections
Dagger 2. The Right Way to Dependency Injections
 
Dagger 2. Right way to do Dependency Injection
Dagger 2. Right way to do Dependency InjectionDagger 2. Right way to do Dependency Injection
Dagger 2. Right way to do Dependency Injection
 
Reactive Programming with JavaScript
Reactive Programming with JavaScriptReactive Programming with JavaScript
Reactive Programming with JavaScript
 
Open sourcing the store
Open sourcing the storeOpen sourcing the store
Open sourcing the store
 
Angular2 + rxjs
Angular2 + rxjsAngular2 + rxjs
Angular2 + rxjs
 
Using hilt in a modularized project
Using hilt in a modularized projectUsing hilt in a modularized project
Using hilt in a modularized project
 
A friend in need - A JS indeed
A friend in need - A JS indeedA friend in need - A JS indeed
A friend in need - A JS indeed
 
CDI do básico ao avançado
CDI do básico ao avançadoCDI do básico ao avançado
CDI do básico ao avançado
 
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
 
Testing Java Code Effectively
Testing Java Code EffectivelyTesting Java Code Effectively
Testing Java Code Effectively
 
RSpec 3.0: Under the Covers
RSpec 3.0: Under the CoversRSpec 3.0: Under the Covers
RSpec 3.0: Under the Covers
 
Vue next
Vue nextVue next
Vue next
 
Unit Testing in Kotlin
Unit Testing in KotlinUnit Testing in Kotlin
Unit Testing in Kotlin
 

Similaire à CDI: How do I ?

Breaking Dependencies Legacy Code - Cork Software Crafters - September 2019
Breaking Dependencies Legacy Code -  Cork Software Crafters - September 2019Breaking Dependencies Legacy Code -  Cork Software Crafters - September 2019
Breaking Dependencies Legacy Code - Cork Software Crafters - September 2019Paulo Clavijo
 
Using and contributing to the next Guice
Using and contributing to the next GuiceUsing and contributing to the next Guice
Using and contributing to the next GuiceAdrian Cole
 
Java onguice20070426
Java onguice20070426Java onguice20070426
Java onguice20070426Ratul Ray
 
Java EE changes design pattern implementation: JavaDays Kiev 2015
Java EE changes design pattern implementation: JavaDays Kiev 2015Java EE changes design pattern implementation: JavaDays Kiev 2015
Java EE changes design pattern implementation: JavaDays Kiev 2015Alex Theedom
 
Factory method pattern (Virtual Constructor)
Factory method pattern (Virtual Constructor)Factory method pattern (Virtual Constructor)
Factory method pattern (Virtual Constructor)Sameer Rathoud
 
Web technologies-course 12.pptx
Web technologies-course 12.pptxWeb technologies-course 12.pptx
Web technologies-course 12.pptxStefan Oprea
 
Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to javaciklum_ods
 
Microservices Chaos Testing at Jet
Microservices Chaos Testing at JetMicroservices Chaos Testing at Jet
Microservices Chaos Testing at JetC4Media
 
Context and Dependency Injection
Context and Dependency InjectionContext and Dependency Injection
Context and Dependency InjectionWerner Keil
 
The Basic Concept Of IOC
The Basic Concept Of IOCThe Basic Concept Of IOC
The Basic Concept Of IOCCarl Lu
 
Test Driven Development with JavaFX
Test Driven Development with JavaFXTest Driven Development with JavaFX
Test Driven Development with JavaFXHendrik Ebbers
 
Dependency injection using dagger2
Dependency injection using dagger2Dependency injection using dagger2
Dependency injection using dagger2Javad Hashemi
 
Arquillian Constellation
Arquillian ConstellationArquillian Constellation
Arquillian ConstellationAlex Soto
 
Building maintainable app #droidconzg
Building maintainable app #droidconzgBuilding maintainable app #droidconzg
Building maintainable app #droidconzgKristijan Jurković
 
Writing testable Android apps
Writing testable Android appsWriting testable Android apps
Writing testable Android appsTomáš Kypta
 
PVS-Studio in the Clouds: Azure DevOps
PVS-Studio in the Clouds: Azure DevOpsPVS-Studio in the Clouds: Azure DevOps
PVS-Studio in the Clouds: Azure DevOpsAndrey Karpov
 

Similaire à CDI: How do I ? (20)

Breaking Dependencies Legacy Code - Cork Software Crafters - September 2019
Breaking Dependencies Legacy Code -  Cork Software Crafters - September 2019Breaking Dependencies Legacy Code -  Cork Software Crafters - September 2019
Breaking Dependencies Legacy Code - Cork Software Crafters - September 2019
 
Using and contributing to the next Guice
Using and contributing to the next GuiceUsing and contributing to the next Guice
Using and contributing to the next Guice
 
Java onguice20070426
Java onguice20070426Java onguice20070426
Java onguice20070426
 
S313937 cdi dochez
S313937 cdi dochezS313937 cdi dochez
S313937 cdi dochez
 
Java EE changes design pattern implementation: JavaDays Kiev 2015
Java EE changes design pattern implementation: JavaDays Kiev 2015Java EE changes design pattern implementation: JavaDays Kiev 2015
Java EE changes design pattern implementation: JavaDays Kiev 2015
 
Factory method pattern (Virtual Constructor)
Factory method pattern (Virtual Constructor)Factory method pattern (Virtual Constructor)
Factory method pattern (Virtual Constructor)
 
Web technologies-course 12.pptx
Web technologies-course 12.pptxWeb technologies-course 12.pptx
Web technologies-course 12.pptx
 
Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to java
 
Microservices Chaos Testing at Jet
Microservices Chaos Testing at JetMicroservices Chaos Testing at Jet
Microservices Chaos Testing at Jet
 
Context and Dependency Injection
Context and Dependency InjectionContext and Dependency Injection
Context and Dependency Injection
 
The Basic Concept Of IOC
The Basic Concept Of IOCThe Basic Concept Of IOC
The Basic Concept Of IOC
 
Test Driven Development with JavaFX
Test Driven Development with JavaFXTest Driven Development with JavaFX
Test Driven Development with JavaFX
 
Dependency injection using dagger2
Dependency injection using dagger2Dependency injection using dagger2
Dependency injection using dagger2
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
Arquillian Constellation
Arquillian ConstellationArquillian Constellation
Arquillian Constellation
 
jDays Sweden 2016
jDays Sweden 2016jDays Sweden 2016
jDays Sweden 2016
 
Building maintainable app #droidconzg
Building maintainable app #droidconzgBuilding maintainable app #droidconzg
Building maintainable app #droidconzg
 
Writing testable Android apps
Writing testable Android appsWriting testable Android apps
Writing testable Android apps
 
PVS-Studio in the Clouds: Azure DevOps
PVS-Studio in the Clouds: Azure DevOpsPVS-Studio in the Clouds: Azure DevOps
PVS-Studio in the Clouds: Azure DevOps
 
Need 4 Speed FI
Need 4 Speed FINeed 4 Speed FI
Need 4 Speed FI
 

Dernier

Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 

Dernier (20)

Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 

CDI: How do I ?