SlideShare a Scribd company logo
1 of 43
Download to read offline
EJB and CDI
Alignment and Strategy
Linda DeMichiel
Java EE Specification Lead
Oracle
Java Day Tokyo 2015
April 8, 2015
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
4
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
EJB – History, Goals, Evolution
CDI– History, Goals, Evolution
Advantages/disadvantages – when to use EJB/CDI
Java EE – Managed Bean Alignment
What is our strategy for the future
1
2
3
4
5
5
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
EJB
• EJB 1.0 (begun 1996)
– Origins in TP monitors and component-based systems (e.g. Microsoft MTS)
– Designed for remote access and coarse-grained components
• EJB 1.1 (J2EE 1.2)
– First "real" EJB
• EJB 2.0 (J2EE 1.3)
– Updated Entity Beans; EJB QL; Message-driven Beans; IIOP Interoperability
• EJB 2.1 (J2EE 1.4)
– Web services support; Timer service
Some Background and History
6
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
EJB
• EJB 3.0 (Java EE 5)
– First "modern" EJB – Theme is "Ease of Development"
– Annotations; resource injection; simple interfaces; Java Persistence API; interceptors
• EJB 3.1 (Java EE 6)
– No-interface view; asynchronous methods; singletons; EJB Lite; Embedded EJB
– Interceptors separated into own spec; JPA separated into own JSR
• EJB 3.2 (Java EE 7)
– EJB Entity Beans and JAX-RPC now optional
Some Background and History
7
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
EJB Today
• EJBs are POJOs
• Container provides services for ease-of-development
– Injection
– Transactions (declarative with defaults or programmatic)
– Security (declarative with defaults or programmatic)
– Thread management; synchronization; async support
– Timed notifications (declarative or programmatic)
– Integration with JMS, Web Services, IIOP-based clients and services
8
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
EJB – History, Goals, Evolution
CDI– History, Goals, Evolution
Advantages/disadvantages – when to use EJB/CDI
Java EE – Managed Bean Alignment
What is our strategy for the future
1
2
3
4
5
9
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
CDI
• CDI 1.0 (Java EE 6)
– Original goal: direct JSF and EJB integration
– Dependency injection with typed injection points; typesafe resolution
– Annotations, qualifiers, stereotypes for strong typing
– Scopes, contexts for automatic bean lifecycle management
– Producers
– Interceptor bindings; decorators
– Events and observers
– Rich SPI for portable extensions
Some Background and History
10
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
CDI
• CDI 1.1 (Java EE 7)
– Implicit bean archives
– Globally enabled interceptors, decorators, alternatives (with @Priority)
– JTA transactional interceptors; @AroundConstruct interceptors
– Enhancements to SPI and portable extensions
Some Background and History
11
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
CDI Today
• Managed Bean POJOs are central
– @Named qualifier allows direct use in JSF, EL, …
• Container provides services
– Type-safe injection
– Lifecycle management; contexts; scopes; lifecycle callbacks
– Event firing and delivery
– Producers, Alternatives to configure available beans
– Extensible model and rich SPI
12
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
EJB – History, Goals, Evolution
CDI– History, Goals, Evolution
Advantages/disadvantages – when to use EJB/CDI
Java EE – Managed Bean Alignment
What is our strategy for the future
1
2
3
4
5
13
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
CDI Advantages
• Annotation-based programming model; stereotypes
• Type-safe injection, interceptors, decorators
• Context management, scopes, conversations
• Events and observers
• Producers and disposers
• Extensibility
– Custom scopes; programmatically defined beans; etc.
Higher level of abstraction
What does CDI give you that EJB alone does not?
14
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
CDI Advantages
• Automatic context and lifecycle management remove/pooling
• Events+observers callbacks
• Conversations
• Metalevel programming / extensibility
Higher level of abstraction vs EJB
15
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
EJB Advantages
• Remote access
– RMI / CORBA
– Web Services
• MDBs / JMS
• Timers; scheduled events
• Asynchronous methods
• Security intergration
• JPA integration; container-managed extended persistence context
• Locking for concurrent access
What does EJB give you that CDI does not?
16
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
EJB Advantages
• EJBs (session beans) are CDI managed beans
– They have all the benefits of CDI
– Stateless session beans – @Dependent scope
– Stateful session beans – any scope
– Singleton session beans – @ApplicationScoped
– However, need to use @Inject, not @EJB to acquire
• Converse is not true
– CDI beans are not EJBs
– However: We are moving EJB benefits into CDI
What else does EJB give you?
17
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
EJB – History, Goals, Evolution
CDI– History, Goals, Evolution
Advantages/disadvantages – when to use EJB/CDI
Java EE – Managed Bean Alignment
What is our strategy for the future
1
2
3
4
5
18
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
CDI and EJB: Bridging the Gap in Java EE
• @ManagedBean
• Managed Bean spec, introduced in Java EE 6
– Identified commonalities among different components as "managed beans"
– Identified points for extension
• "Managed Bean Alignment" was an important theme of Java EE 7
– Generalize use of injection, interceptors, new scopes
19
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Managed Beans – Java EE 6
20
MATRIX1
Java EE 6
Contextual Support
CDI
injection
into
them
Support
Java EE
Resource
injection
into
them
Injectable
with
@Inject
Injectable
with
@Resource,
@EJB, …
(EE-
defined)
Support
CDI
interceptors
Support EE
interceptors
Support
Decorators
Support
Observer
methods
Can
fire
events
Support
Producer
methods
Can have
Qualifiers
Can
have
Scope
Support
CDI
Constructor
injection
Support
Timers
CDI managed
beans (non-EJBs)
Y Y Y Y Y Y Y(1) Y Y Y Y Y Y Y
Session beans
(CDI-enabled
behavior via
@Inject)
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
Java EE
@ManagedBean
beans (CDI-
enabled behavior
via @Inject)
Y Y Y Y Y Y Y Y Y Y Y Y Y Y
Session beans
obtained via
@EJB or JNDI
lookup (with CDI
enabled)
Y Y Y Y Y Y
Java EE
@ManagedBeans
beans obtained
via @Resource or
JNDI lookup
(with CDI
enabled)
Y Y Y Y Y
MDBs Y Y Y Y Y
JAX-RS Resource
classes
Y Y Y
Servlets Y Y Y
Servlet filters,
listeners
Y Y Y
Other Java EE
component
classes (Table EE.
5-1)
Y Y Y
JPA entities
JPA entity
listeners
Y(4) Y
Interceptors Y Y Y
Decorators Y Y Y
Producer
methods
Y(3) Y(5) Y(5) Y Y (2)(3) Y(2)
Producer fields Y(2) Y(2)
Disposer
methods
Y(3) Y(5) Y(5) Y Y(3)
Observer
methods
Y(3) Y(5) Y(5) Y Y(3)
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
CDI and EJB: Bridging the Gap in Java EE 7
• CDI is enabled by default in "implicit bean archives"
• Use of CDI bean-defining annotations results in implicit bean archives
– @SessionScoped, @Dependent, …
– Bean archives include library jars, EJB jars, WEB-INF classes, …
– No beans.xml required
Enabling CDI by Default
21
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
CDI and EJB: Bridging the Gap in Java EE 7
• CDI injection applies to all Java EE components when CDI is enabled
• Java EE components support resource injection + CDI injection
– Support for constructor injection added as well
• CDI beans support CDI injection + resource injection
• CDI producers can "transform" resource injection into CDI injection, making
it strongly typed
@Produces @Resource(lookup="java:global/env/jdbc/CustomerDatasource")
@CustomerDatabase DataSource customerDatabase;
Injection
22
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
CDI and EJB: Bridging the Gap in Java EE 7
• CDI interceptor-binding interceptors apply to all Java EE components when
CDI is enabled
• EJBs support "EJB interceptors" + CDI interceptor-binding interceptors
• CDI beans support CDI interceptor-binding interceptors + "EJB
interceptors"
• Java EE components also support both
Interceptors
23
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
JTA Transactional Interceptors
@Inherited
@InterceptorBinding
@Target({TYPE, METHOD}) @Retention(RUNTIME)
public @interface Transactional {
TxType value() default TxType.REQUIRED;
Class[] rollbackOn() default{};
Class[] dontRollbackOn() default{};
}
@Transactional(rollbackOn={SQLException.class},
dontRollbackOn={SQLWarning.class})
public class ShoppingCart {...}
Generalization of Container-managed Transactions (Java EE 7)
24
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Bean Validation Interceptors
@Stateless
public class OrderService {
...
@ValidOrder
public Order placeOrder(
@NotNull String productName,
@Max(10) int quantity,
@NotNull String customerName,
@Address String customerAddress) {
...
}
}
Method-level Validation (Bean Validation 1.1, Java EE 7)
25
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
CDI and EJB: Bridging the Gap in Java EE 7
• CDI Scopes are extensible
– @TransactionScope
• Defined in JTA 1.2
• Used by JMS 2.0
– @FlowScoped (JSF 2.2)
– WebSocket expected to define scope for WebSocket endpoints in Java EE 8
Scopes
26
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Managed Beans – Java EE 7
27
MATRIX
Java EE 7
Contextual Support
CDI
injection
into
them
Support
Java EE
Resource
injection
into
them
Injectable
with
@Inject
Injectable
with
@Resource,
@EJB, …
(EE-
defined)
Support
CDI
interceptors
Support EE
interceptors
(1)
Support
Decorators
Support
Observer
methods
Can
fire
events
Support
Producer
methods
Can have
Qualifiers
Can
have
Scope
Support
CDI
Constructor
injection
Support
Timers
CDI managed
beans (non-EJBs)
Y Y Y Y Y Y Y Y Y Y Y Y Y Y
Session beans
(CDI-enabled
behavior via
@Inject)
Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
Java EE
@ManagedBean
beans (CDI-
enabled behavior
via @Inject)
Y Y Y Y Y Y Y Y Y Y Y Y Y Y
Session beans
obtained via
@EJB or JNDI
lookup (with CDI
enabled)
Y Y Y Y Y Y Y Y Y
Java EE
@ManagedBeans
beans obtained
via @Resource or
JNDI lookup
(with CDI
enabled)
Y Y Y Y Y Y Y Y
MDBs Y Y Y(6) Y Y Y Y Y
JAX-RS Resource
classes
Y Y Y(6) Y Y Y Y Y
Servlets Y Y Y(6) Y Y Y Y Y
Servlet filters,
listeners
Y Y Y(6) Y Y Y Y Y
Other Java EE
component
classes (Table EE.
5-1)
Y Y Y(6) Y Y Y Y Y
JPA entities Y(6)
JPA entity
listeners (4)
Y Y(6) Y Y Y Y Y
Interceptors Y Y Y(6) Y Y
Decorators Y Y Y Y
Producer
methods
Y(3) Y(5) Y(5) Y Y (2)(3) Y(2)
Producer fields Y(2) Y(2)
Disposer
methods
Y(3) Y(5) Y(5) Y Y(3)
Observer
methods
Y(3) Y(5) Y(5) Y Y(3)
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
EJB – History, Goals, Evolution
CDI– History, Goals, Evolution
Advantages/disadvantages – when to use EJB/CDI
Java EE – Managed Bean Alignment
What is our strategy for the future
1
2
3
4
5
28
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
CDI and EJB: Bridging the Gap in Java EE 8
• Java EE 8 continues the theme of Managed-Bean Alignment
• Container-managed security: authorization
• Message-driven beans
Expanded use of EJB Container Services
29
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Proposed: Authorization via Security Interceptors
@IsAuthorized("hasRoles('Manager') && schedule.officeHrs")
public void transferFunds() {...}
@IsAuthorized("hasRoles('Manager') && hasAttribute('directReports', employee.id)")
public double getSalary(int employeeId) {...}
@IsAuthorized(ruleSourceName="java:app/payrollAuthRules", rule="report")
public void displayReport() {...};
Java EE Security 1.0 (Java EE 8)
30
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Message-driven Beans
• Alternative to EJB message-driven beans
• Usable by any CDI managed bean
• Simpler JMS-specific annotations
• No need for MessageListener implementation
JMS 2.1: New API to receive messages asynchronously (Java EE 8)
31
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Message-driven Beans
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName="connectionFactoryLookup",
propertyValue="jms/myCF"),
@ActivationConfigProperty(propertyName="destinationLookup",
propertyValue="jms/myQueue"),
@ActivationConfigProperty(propertyName="destinationType",
propertyValue="javax.jms/Queue")}
public class MyMDB implements MessageListener {
public void onMessage(Message message) {
// extract message body
String body = message.getBody(String.class));
// process message body
}
}
EJB MDBs Today (Java EE 7)
32
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Proposed: Message-driven Beans
@RequestScoped
public class MyListenerBean {
@JMSListener(destinationLookup="jms/myQueue")
@Transactional
public void myCallback(Message message) {
...
}
}
JMS 2.1 Tomorrow: Allow any Java EE bean to be a listener (Java EE 8)
33
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Bridging the Gap
• JAX-RS Injection alignment
• Parameter injection
• Scope for WebSocket endpoints
• Extension of Timer Service and Timer notifications (@Schedule)
• …
Other Areas of Alignment
34
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Some Gaps Remain
• Java EE components are CDI managed beans
– They can be injected with @Inject
– But, Java EE components other than session beans lose their Java EE
"componentness"
– E.g., you can inject a servlet into a managed bean, but the injected instance won't still
service web requests
35
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Summary
• Java EE 6
– Interceptors
• Java EE 7
– Container-managed transactions transactional interceptors
• Java EE 8
– Container-managed authorization security interceptors
– Message-driven beans simplified messaging with CDI-based MDBs
• Java EE 9
– Timer Service (?)
– Timed Events (?)
– … (?)
EJB Features made more broadly available through CDI
36
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
What is the Future of EJB?
• Part of EJB becoming Optional
– EJB Entity Beans, EJB QL
• Optional as of Java EE 7; superseded by JPA
– Support for JAX-RPC
• Optional as of Java EE 7; superseded by JAX-WS
– IIOP Interoperability ??
• Java EE 8 Experts will decide on "Proposed Optional" status
– Remote interfaces ??
• Java EE 8 Experts will decide on "Proposed Optional" status
– Optionality process is slow
• Takes 2 Java EE Platform release cycles
37
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
What is the Future of EJB?
• Important EJB features are being made more broadly available
– Interceptors, container-managed txs and security, MDBs, …
– Availability is through mechanisms of CDI
• Will EJB still be relevant ?
• EJB's long-term future depends on the future of remaining features
– Remote access (RMI, Web Services)
– @Schedule'd events and Timer Service
– Singletons - @Startup; @DependsOn; container-managed concurrency
– Asynchronous methods
– Integration with JPA
38
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
How You Can Influence the Discussion
• Adopt a JSR
– http://glassfish.org/adoptajsr
• Join an Expert Group project
– http://javaee-spec.java.net
– https://java.net/projects/javaee-spec/pages/Specifications
• The Aquarium
– http://blogs.oracle.com/theaquarium
• Java EE 8 Reference Implementation
– http://glassfish.org
39
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The preceding is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
40
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 41
EJB and CDI - Alignment and Strategy
EJB and CDI - Alignment and Strategy

More Related Content

What's hot

JPAの同時実行制御とロック20140518 #ccc_r15 #jjug_ccc
JPAの同時実行制御とロック20140518 #ccc_r15 #jjug_cccJPAの同時実行制御とロック20140518 #ccc_r15 #jjug_ccc
JPAの同時実行制御とロック20140518 #ccc_r15 #jjug_cccMasatoshi Tada
 
How Booking.com avoids and deals with replication lag
How Booking.com avoids and deals with replication lagHow Booking.com avoids and deals with replication lag
How Booking.com avoids and deals with replication lagJean-François Gagné
 
C#次世代非同期処理概観 - Task vs Reactive Extensions
C#次世代非同期処理概観 - Task vs Reactive ExtensionsC#次世代非同期処理概観 - Task vs Reactive Extensions
C#次世代非同期処理概観 - Task vs Reactive ExtensionsYoshifumi Kawai
 
ヤフーのプライベートクラウドとクラウドエンジニアの業務について
ヤフーのプライベートクラウドとクラウドエンジニアの業務についてヤフーのプライベートクラウドとクラウドエンジニアの業務について
ヤフーのプライベートクラウドとクラウドエンジニアの業務についてYahoo!デベロッパーネットワーク
 
코드리뷰를 시작하려는 그대에게
코드리뷰를 시작하려는 그대에게코드리뷰를 시작하려는 그대에게
코드리뷰를 시작하려는 그대에게Jiyeon Seo
 
스프링 부트와 로깅
스프링 부트와 로깅스프링 부트와 로깅
스프링 부트와 로깅Keesun Baik
 
MySQLやSSDとかの話 その後
MySQLやSSDとかの話 その後MySQLやSSDとかの話 その後
MySQLやSSDとかの話 その後Takanori Sejima
 
Yahoo! JAPANのサービス開発を10倍早くした社内PaaS構築の今とこれから
Yahoo! JAPANのサービス開発を10倍早くした社内PaaS構築の今とこれからYahoo! JAPANのサービス開発を10倍早くした社内PaaS構築の今とこれから
Yahoo! JAPANのサービス開発を10倍早くした社内PaaS構築の今とこれからYahoo!デベロッパーネットワーク
 
Mpls hacking security Myth
Mpls hacking security MythMpls hacking security Myth
Mpls hacking security Mythidsecconf
 
JavaでWebサービスを作り続けるための戦略と戦術 JJUG-CCC-2018-Spring-g1
JavaでWebサービスを作り続けるための戦略と戦術 JJUG-CCC-2018-Spring-g1JavaでWebサービスを作り続けるための戦略と戦術 JJUG-CCC-2018-Spring-g1
JavaでWebサービスを作り続けるための戦略と戦術 JJUG-CCC-2018-Spring-g1Y Watanabe
 
PHP7ではなくHack/HHVMを選ぶ理由
PHP7ではなくHack/HHVMを選ぶ理由PHP7ではなくHack/HHVMを選ぶ理由
PHP7ではなくHack/HHVMを選ぶ理由Yuji Otani
 
【16E2】New Relic を使ったDevOps 時代のパフォーマンス監視と障害分析入門
【16E2】New Relic を使ったDevOps 時代のパフォーマンス監視と障害分析入門【16E2】New Relic を使ったDevOps 時代のパフォーマンス監視と障害分析入門
【16E2】New Relic を使ったDevOps 時代のパフォーマンス監視と障害分析入門Developers Summit
 
コンテナ時代のOpenStack
コンテナ時代のOpenStackコンテナ時代のOpenStack
コンテナ時代のOpenStackAkira Yoshiyama
 

What's hot (20)

JPAの同時実行制御とロック20140518 #ccc_r15 #jjug_ccc
JPAの同時実行制御とロック20140518 #ccc_r15 #jjug_cccJPAの同時実行制御とロック20140518 #ccc_r15 #jjug_ccc
JPAの同時実行制御とロック20140518 #ccc_r15 #jjug_ccc
 
How Booking.com avoids and deals with replication lag
How Booking.com avoids and deals with replication lagHow Booking.com avoids and deals with replication lag
How Booking.com avoids and deals with replication lag
 
C#次世代非同期処理概観 - Task vs Reactive Extensions
C#次世代非同期処理概観 - Task vs Reactive ExtensionsC#次世代非同期処理概観 - Task vs Reactive Extensions
C#次世代非同期処理概観 - Task vs Reactive Extensions
 
ヤフーのプライベートクラウドとクラウドエンジニアの業務について
ヤフーのプライベートクラウドとクラウドエンジニアの業務についてヤフーのプライベートクラウドとクラウドエンジニアの業務について
ヤフーのプライベートクラウドとクラウドエンジニアの業務について
 
Spring batch
Spring batchSpring batch
Spring batch
 
KafkaとPulsar
KafkaとPulsarKafkaとPulsar
KafkaとPulsar
 
코드리뷰를 시작하려는 그대에게
코드리뷰를 시작하려는 그대에게코드리뷰를 시작하려는 그대에게
코드리뷰를 시작하려는 그대에게
 
스프링 부트와 로깅
스프링 부트와 로깅스프링 부트와 로깅
스프링 부트와 로깅
 
MySQLやSSDとかの話 その後
MySQLやSSDとかの話 その後MySQLやSSDとかの話 その後
MySQLやSSDとかの話 その後
 
Persistent-memory-native Database High-availability Feature
Persistent-memory-native Database High-availability FeaturePersistent-memory-native Database High-availability Feature
Persistent-memory-native Database High-availability Feature
 
Yahoo! JAPANのサービス開発を10倍早くした社内PaaS構築の今とこれから
Yahoo! JAPANのサービス開発を10倍早くした社内PaaS構築の今とこれからYahoo! JAPANのサービス開発を10倍早くした社内PaaS構築の今とこれから
Yahoo! JAPANのサービス開発を10倍早くした社内PaaS構築の今とこれから
 
Mpls hacking security Myth
Mpls hacking security MythMpls hacking security Myth
Mpls hacking security Myth
 
GraphQLでフロントエンドの複雑性とたたかう
GraphQLでフロントエンドの複雑性とたたかうGraphQLでフロントエンドの複雑性とたたかう
GraphQLでフロントエンドの複雑性とたたかう
 
オンプレML基盤on Kubernetes 〜Yahoo! JAPAN AIPF〜
オンプレML基盤on Kubernetes 〜Yahoo! JAPAN AIPF〜オンプレML基盤on Kubernetes 〜Yahoo! JAPAN AIPF〜
オンプレML基盤on Kubernetes 〜Yahoo! JAPAN AIPF〜
 
JavaでWebサービスを作り続けるための戦略と戦術 JJUG-CCC-2018-Spring-g1
JavaでWebサービスを作り続けるための戦略と戦術 JJUG-CCC-2018-Spring-g1JavaでWebサービスを作り続けるための戦略と戦術 JJUG-CCC-2018-Spring-g1
JavaでWebサービスを作り続けるための戦略と戦術 JJUG-CCC-2018-Spring-g1
 
PHP7ではなくHack/HHVMを選ぶ理由
PHP7ではなくHack/HHVMを選ぶ理由PHP7ではなくHack/HHVMを選ぶ理由
PHP7ではなくHack/HHVMを選ぶ理由
 
【16E2】New Relic を使ったDevOps 時代のパフォーマンス監視と障害分析入門
【16E2】New Relic を使ったDevOps 時代のパフォーマンス監視と障害分析入門【16E2】New Relic を使ったDevOps 時代のパフォーマンス監視と障害分析入門
【16E2】New Relic を使ったDevOps 時代のパフォーマンス監視と障害分析入門
 
Em synchrony について
Em synchrony についてEm synchrony について
Em synchrony について
 
コンテナ時代のOpenStack
コンテナ時代のOpenStackコンテナ時代のOpenStack
コンテナ時代のOpenStack
 
Lombok ハンズオン
Lombok ハンズオンLombok ハンズオン
Lombok ハンズオン
 

Viewers also liked

2015 JavaOne EJB/CDI Alignment
2015 JavaOne EJB/CDI Alignment2015 JavaOne EJB/CDI Alignment
2015 JavaOne EJB/CDI AlignmentDavid Blevins
 
Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015Edward Burns
 
Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]Ryan Cuprak
 
Dependency injection for beginners
Dependency injection for beginnersDependency injection for beginners
Dependency injection for beginnersBhushan Mulmule
 
Solaris 11 Consolidation Tools
Solaris 11 Consolidation ToolsSolaris 11 Consolidation Tools
Solaris 11 Consolidation ToolsRoman Ivanov
 
Business Strategy & Alignment to Project Management
Business Strategy & Alignment to Project ManagementBusiness Strategy & Alignment to Project Management
Business Strategy & Alignment to Project ManagementJonathan Donado
 
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, JohannesburgJava EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, JohannesburgArun Gupta
 
Dependency injection - the right way
Dependency injection - the right wayDependency injection - the right way
Dependency injection - the right wayThibaud Desodt
 
Batching and Java EE (jdk.io)
Batching and Java EE (jdk.io)Batching and Java EE (jdk.io)
Batching and Java EE (jdk.io)Ryan Cuprak
 
JetBrains IDEハンズオン
JetBrains IDEハンズオンJetBrains IDEハンズオン
JetBrains IDEハンズオンYusuke Yamamoto
 
Designing JEE Application Structure
Designing JEE Application StructureDesigning JEE Application Structure
Designing JEE Application Structureodedns
 
Enterprise Java Beans 3 - Business Logic
Enterprise Java Beans 3 - Business LogicEnterprise Java Beans 3 - Business Logic
Enterprise Java Beans 3 - Business LogicEmprovise
 
Java EE 7 for Real Enterprise Systems
Java EE 7 for Real Enterprise SystemsJava EE 7 for Real Enterprise Systems
Java EE 7 for Real Enterprise SystemsHirofumi Iwasaki
 
Java ee 8 + security overview
Java ee 8 + security overviewJava ee 8 + security overview
Java ee 8 + security overviewRudy De Busscher
 
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)Ryan Cuprak
 

Viewers also liked (20)

2015 JavaOne EJB/CDI Alignment
2015 JavaOne EJB/CDI Alignment2015 JavaOne EJB/CDI Alignment
2015 JavaOne EJB/CDI Alignment
 
Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015
 
Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]
 
Dependency injection for beginners
Dependency injection for beginnersDependency injection for beginners
Dependency injection for beginners
 
Solaris 11 Consolidation Tools
Solaris 11 Consolidation ToolsSolaris 11 Consolidation Tools
Solaris 11 Consolidation Tools
 
Oracle RAC 25年の進化
Oracle RAC 25年の進化Oracle RAC 25年の進化
Oracle RAC 25年の進化
 
Business Strategy & Alignment to Project Management
Business Strategy & Alignment to Project ManagementBusiness Strategy & Alignment to Project Management
Business Strategy & Alignment to Project Management
 
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, JohannesburgJava EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
 
Ejb3 Presentation
Ejb3 PresentationEjb3 Presentation
Ejb3 Presentation
 
Dependency injection - the right way
Dependency injection - the right wayDependency injection - the right way
Dependency injection - the right way
 
Batching and Java EE (jdk.io)
Batching and Java EE (jdk.io)Batching and Java EE (jdk.io)
Batching and Java EE (jdk.io)
 
JetBrains IDEハンズオン
JetBrains IDEハンズオンJetBrains IDEハンズオン
JetBrains IDEハンズオン
 
Designing JEE Application Structure
Designing JEE Application StructureDesigning JEE Application Structure
Designing JEE Application Structure
 
EJB 3.1 by Bert Ertman
EJB 3.1 by Bert ErtmanEJB 3.1 by Bert Ertman
EJB 3.1 by Bert Ertman
 
Enterprise Java Beans 3 - Business Logic
Enterprise Java Beans 3 - Business LogicEnterprise Java Beans 3 - Business Logic
Enterprise Java Beans 3 - Business Logic
 
Java EE 7 for Real Enterprise Systems
Java EE 7 for Real Enterprise SystemsJava EE 7 for Real Enterprise Systems
Java EE 7 for Real Enterprise Systems
 
Curso Java Avanzado 5 Ejb
Curso Java Avanzado   5 EjbCurso Java Avanzado   5 Ejb
Curso Java Avanzado 5 Ejb
 
Java ee 8 + security overview
Java ee 8 + security overviewJava ee 8 + security overview
Java ee 8 + security overview
 
Java EE Pattern: The Boundary Layer
Java EE Pattern: The Boundary LayerJava EE Pattern: The Boundary Layer
Java EE Pattern: The Boundary Layer
 
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
 

Similar to EJB and CDI - Alignment and Strategy

Java EE 6 Live Hacking - Java Developer Day 2012
Java EE 6 Live Hacking - Java Developer Day 2012Java EE 6 Live Hacking - Java Developer Day 2012
Java EE 6 Live Hacking - Java Developer Day 2012Martin Fousek
 
JSF 2.3 Adopt-a-JSR 10 Minute Infodeck
JSF 2.3 Adopt-a-JSR 10 Minute InfodeckJSF 2.3 Adopt-a-JSR 10 Minute Infodeck
JSF 2.3 Adopt-a-JSR 10 Minute InfodeckEdward Burns
 
Burns jsf-confess-2015
Burns jsf-confess-2015Burns jsf-confess-2015
Burns jsf-confess-2015Edward Burns
 
How to Thrive on REST/WebSocket-Based Microservices
How to Thrive on REST/WebSocket-Based MicroservicesHow to Thrive on REST/WebSocket-Based Microservices
How to Thrive on REST/WebSocket-Based MicroservicesPavel Bucek
 
Mastering DevOps with Oracle
Mastering DevOps with Oracle Mastering DevOps with Oracle
Mastering DevOps with Oracle jeckels
 
JavaOne2015報告会 in Okinawa
JavaOne2015報告会 in OkinawaJavaOne2015報告会 in Okinawa
JavaOne2015報告会 in OkinawaTakashi Ito
 
Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...
Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...
Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...Bart Jonkers
 
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012Jagadish Prasath
 
Testing Java EE Applications Using Arquillian
Testing Java EE Applications Using ArquillianTesting Java EE Applications Using Arquillian
Testing Java EE Applications Using ArquillianReza Rahman
 
Oracle WebLogic Server 12.2.1 Do More with Less
Oracle WebLogic Server 12.2.1 Do More with LessOracle WebLogic Server 12.2.1 Do More with Less
Oracle WebLogic Server 12.2.1 Do More with LessEd Burns
 
Serverless Java - Challenges and Triumphs
Serverless Java - Challenges and TriumphsServerless Java - Challenges and Triumphs
Serverless Java - Challenges and TriumphsDavid Delabassee
 
Melhore o Desenvolvimento do Time com DevOps na Nuvem
Melhore o Desenvolvimento do Time com DevOps na NuvemMelhore o Desenvolvimento do Time com DevOps na Nuvem
Melhore o Desenvolvimento do Time com DevOps na NuvemBruno Borges
 
Turning Relational Database Tables into Hadoop Datasources by Kuassi Mensah
Turning Relational Database Tables into Hadoop Datasources by Kuassi MensahTurning Relational Database Tables into Hadoop Datasources by Kuassi Mensah
Turning Relational Database Tables into Hadoop Datasources by Kuassi MensahData Con LA
 
Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738]
Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738]Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738]
Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738]David Buck
 
OOW15 - Oracle Enterprise Manager Cloud Control for Managing Oracle E-Busines...
OOW15 - Oracle Enterprise Manager Cloud Control for Managing Oracle E-Busines...OOW15 - Oracle Enterprise Manager Cloud Control for Managing Oracle E-Busines...
OOW15 - Oracle Enterprise Manager Cloud Control for Managing Oracle E-Busines...vasuballa
 

Similar to EJB and CDI - Alignment and Strategy (20)

Java EE 6 Live Hacking - Java Developer Day 2012
Java EE 6 Live Hacking - Java Developer Day 2012Java EE 6 Live Hacking - Java Developer Day 2012
Java EE 6 Live Hacking - Java Developer Day 2012
 
MVC 1.0 / JSR 371
MVC 1.0 / JSR 371MVC 1.0 / JSR 371
MVC 1.0 / JSR 371
 
JSF 2.3 Adopt-a-JSR 10 Minute Infodeck
JSF 2.3 Adopt-a-JSR 10 Minute InfodeckJSF 2.3 Adopt-a-JSR 10 Minute Infodeck
JSF 2.3 Adopt-a-JSR 10 Minute Infodeck
 
Oracle JET overview
Oracle JET overviewOracle JET overview
Oracle JET overview
 
Burns jsf-confess-2015
Burns jsf-confess-2015Burns jsf-confess-2015
Burns jsf-confess-2015
 
How to Thrive on REST/WebSocket-Based Microservices
How to Thrive on REST/WebSocket-Based MicroservicesHow to Thrive on REST/WebSocket-Based Microservices
How to Thrive on REST/WebSocket-Based Microservices
 
JDK versions and OpenJDK
JDK versions and OpenJDKJDK versions and OpenJDK
JDK versions and OpenJDK
 
JDK 10 Java Module System
JDK 10 Java Module SystemJDK 10 Java Module System
JDK 10 Java Module System
 
Mastering DevOps with Oracle
Mastering DevOps with Oracle Mastering DevOps with Oracle
Mastering DevOps with Oracle
 
JavaOne2015報告会 in Okinawa
JavaOne2015報告会 in OkinawaJavaOne2015報告会 in Okinawa
JavaOne2015報告会 in Okinawa
 
Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...
Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...
Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...
 
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
EJB 3.2 - Java EE 7 - Java One Hyderabad 2012
 
Testing Java EE Applications Using Arquillian
Testing Java EE Applications Using ArquillianTesting Java EE Applications Using Arquillian
Testing Java EE Applications Using Arquillian
 
Oracle WebLogic Server 12.2.1 Do More with Less
Oracle WebLogic Server 12.2.1 Do More with LessOracle WebLogic Server 12.2.1 Do More with Less
Oracle WebLogic Server 12.2.1 Do More with Less
 
Serverless Java - Challenges and Triumphs
Serverless Java - Challenges and TriumphsServerless Java - Challenges and Triumphs
Serverless Java - Challenges and Triumphs
 
Java SE Subscription Workshop
Java SE Subscription WorkshopJava SE Subscription Workshop
Java SE Subscription Workshop
 
Melhore o Desenvolvimento do Time com DevOps na Nuvem
Melhore o Desenvolvimento do Time com DevOps na NuvemMelhore o Desenvolvimento do Time com DevOps na Nuvem
Melhore o Desenvolvimento do Time com DevOps na Nuvem
 
Turning Relational Database Tables into Hadoop Datasources by Kuassi Mensah
Turning Relational Database Tables into Hadoop Datasources by Kuassi MensahTurning Relational Database Tables into Hadoop Datasources by Kuassi Mensah
Turning Relational Database Tables into Hadoop Datasources by Kuassi Mensah
 
Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738]
Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738]Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738]
Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738]
 
OOW15 - Oracle Enterprise Manager Cloud Control for Managing Oracle E-Busines...
OOW15 - Oracle Enterprise Manager Cloud Control for Managing Oracle E-Busines...OOW15 - Oracle Enterprise Manager Cloud Control for Managing Oracle E-Busines...
OOW15 - Oracle Enterprise Manager Cloud Control for Managing Oracle E-Busines...
 

More from David Delabassee

JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best PracticesDavid Delabassee
 
Serverless Java Challenges & Triumphs
Serverless Java Challenges & TriumphsServerless Java Challenges & Triumphs
Serverless Java Challenges & TriumphsDavid Delabassee
 
Randstad Docker meetup - Serverless
Randstad Docker meetup - ServerlessRandstad Docker meetup - Serverless
Randstad Docker meetup - ServerlessDavid Delabassee
 
Java Serverless in Action - Voxxed Banff
Java Serverless in Action - Voxxed BanffJava Serverless in Action - Voxxed Banff
Java Serverless in Action - Voxxed BanffDavid Delabassee
 
Java EE 8 - February 2017 update
Java EE 8 - February 2017 updateJava EE 8 - February 2017 update
Java EE 8 - February 2017 updateDavid Delabassee
 
Java EE Next - BeJUG JavaOne Afterglow 2016
Java EE Next - BeJUG JavaOne Afterglow 2016Java EE Next - BeJUG JavaOne Afterglow 2016
Java EE Next - BeJUG JavaOne Afterglow 2016David Delabassee
 
Java EE 8 - Work in progress
Java EE 8 - Work in progressJava EE 8 - Work in progress
Java EE 8 - Work in progressDavid Delabassee
 
HTTP/2 comes to Java (Dec. 2015 version)
HTTP/2 comes to Java (Dec. 2015 version)HTTP/2 comes to Java (Dec. 2015 version)
HTTP/2 comes to Java (Dec. 2015 version)David Delabassee
 
Java EE 8 - What’s new on the Web front
Java EE 8 - What’s new on the Web frontJava EE 8 - What’s new on the Web front
Java EE 8 - What’s new on the Web frontDavid Delabassee
 
What's coming in Java EE 8
What's coming in Java EE 8What's coming in Java EE 8
What's coming in Java EE 8David Delabassee
 
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
 
Java EE 8 - An instant snapshot
Java EE 8 - An instant snapshot Java EE 8 - An instant snapshot
Java EE 8 - An instant snapshot David Delabassee
 

More from David Delabassee (20)

JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best Practices
 
JVMs in Containers
JVMs in ContainersJVMs in Containers
JVMs in Containers
 
Serverless Java Challenges & Triumphs
Serverless Java Challenges & TriumphsServerless Java Challenges & Triumphs
Serverless Java Challenges & Triumphs
 
Randstad Docker meetup - Serverless
Randstad Docker meetup - ServerlessRandstad Docker meetup - Serverless
Randstad Docker meetup - Serverless
 
Java Serverless in Action - Voxxed Banff
Java Serverless in Action - Voxxed BanffJava Serverless in Action - Voxxed Banff
Java Serverless in Action - Voxxed Banff
 
Serverless Kotlin
Serverless KotlinServerless Kotlin
Serverless Kotlin
 
REST in an Async World
REST in an Async WorldREST in an Async World
REST in an Async World
 
JAX-RS 2.1 Reloaded
JAX-RS 2.1 ReloadedJAX-RS 2.1 Reloaded
JAX-RS 2.1 Reloaded
 
Java EE 8 - February 2017 update
Java EE 8 - February 2017 updateJava EE 8 - February 2017 update
Java EE 8 - February 2017 update
 
Java EE Next
Java EE NextJava EE Next
Java EE Next
 
Java EE Next - BeJUG JavaOne Afterglow 2016
Java EE Next - BeJUG JavaOne Afterglow 2016Java EE Next - BeJUG JavaOne Afterglow 2016
Java EE Next - BeJUG JavaOne Afterglow 2016
 
HTTP/2 comes to Java
HTTP/2 comes to JavaHTTP/2 comes to Java
HTTP/2 comes to Java
 
Java EE 8 - Work in progress
Java EE 8 - Work in progressJava EE 8 - Work in progress
Java EE 8 - Work in progress
 
HTTP/2 comes to Java (Dec. 2015 version)
HTTP/2 comes to Java (Dec. 2015 version)HTTP/2 comes to Java (Dec. 2015 version)
HTTP/2 comes to Java (Dec. 2015 version)
 
HTTP/2 Comes to Java
HTTP/2 Comes to JavaHTTP/2 Comes to Java
HTTP/2 Comes to Java
 
Java EE 8 - What’s new on the Web front
Java EE 8 - What’s new on the Web frontJava EE 8 - What’s new on the Web front
Java EE 8 - What’s new on the Web front
 
HTTP/2 Comes to Java
HTTP/2 Comes to JavaHTTP/2 Comes to Java
HTTP/2 Comes to Java
 
What's coming in Java EE 8
What's coming in Java EE 8What's coming in Java EE 8
What's coming in Java EE 8
 
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
 
Java EE 8 - An instant snapshot
Java EE 8 - An instant snapshot Java EE 8 - An instant snapshot
Java EE 8 - An instant snapshot
 

Recently uploaded

Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024APNIC
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceDelhi Call girls
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Roomdivyansh0kumar0
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$kojalkojal131
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersDamian Radcliffe
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts servicesonalikaur4
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Roomgirls4nights
 

Recently uploaded (20)

Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
 
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
 

EJB and CDI - Alignment and Strategy

  • 1.
  • 2.
  • 3. EJB and CDI Alignment and Strategy Linda DeMichiel Java EE Specification Lead Oracle Java Day Tokyo 2015 April 8, 2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
  • 4. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 4
  • 5. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda EJB – History, Goals, Evolution CDI– History, Goals, Evolution Advantages/disadvantages – when to use EJB/CDI Java EE – Managed Bean Alignment What is our strategy for the future 1 2 3 4 5 5
  • 6. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | EJB • EJB 1.0 (begun 1996) – Origins in TP monitors and component-based systems (e.g. Microsoft MTS) – Designed for remote access and coarse-grained components • EJB 1.1 (J2EE 1.2) – First "real" EJB • EJB 2.0 (J2EE 1.3) – Updated Entity Beans; EJB QL; Message-driven Beans; IIOP Interoperability • EJB 2.1 (J2EE 1.4) – Web services support; Timer service Some Background and History 6
  • 7. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | EJB • EJB 3.0 (Java EE 5) – First "modern" EJB – Theme is "Ease of Development" – Annotations; resource injection; simple interfaces; Java Persistence API; interceptors • EJB 3.1 (Java EE 6) – No-interface view; asynchronous methods; singletons; EJB Lite; Embedded EJB – Interceptors separated into own spec; JPA separated into own JSR • EJB 3.2 (Java EE 7) – EJB Entity Beans and JAX-RPC now optional Some Background and History 7
  • 8. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | EJB Today • EJBs are POJOs • Container provides services for ease-of-development – Injection – Transactions (declarative with defaults or programmatic) – Security (declarative with defaults or programmatic) – Thread management; synchronization; async support – Timed notifications (declarative or programmatic) – Integration with JMS, Web Services, IIOP-based clients and services 8
  • 9. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda EJB – History, Goals, Evolution CDI– History, Goals, Evolution Advantages/disadvantages – when to use EJB/CDI Java EE – Managed Bean Alignment What is our strategy for the future 1 2 3 4 5 9
  • 10. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | CDI • CDI 1.0 (Java EE 6) – Original goal: direct JSF and EJB integration – Dependency injection with typed injection points; typesafe resolution – Annotations, qualifiers, stereotypes for strong typing – Scopes, contexts for automatic bean lifecycle management – Producers – Interceptor bindings; decorators – Events and observers – Rich SPI for portable extensions Some Background and History 10
  • 11. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | CDI • CDI 1.1 (Java EE 7) – Implicit bean archives – Globally enabled interceptors, decorators, alternatives (with @Priority) – JTA transactional interceptors; @AroundConstruct interceptors – Enhancements to SPI and portable extensions Some Background and History 11
  • 12. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | CDI Today • Managed Bean POJOs are central – @Named qualifier allows direct use in JSF, EL, … • Container provides services – Type-safe injection – Lifecycle management; contexts; scopes; lifecycle callbacks – Event firing and delivery – Producers, Alternatives to configure available beans – Extensible model and rich SPI 12
  • 13. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda EJB – History, Goals, Evolution CDI– History, Goals, Evolution Advantages/disadvantages – when to use EJB/CDI Java EE – Managed Bean Alignment What is our strategy for the future 1 2 3 4 5 13
  • 14. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | CDI Advantages • Annotation-based programming model; stereotypes • Type-safe injection, interceptors, decorators • Context management, scopes, conversations • Events and observers • Producers and disposers • Extensibility – Custom scopes; programmatically defined beans; etc. Higher level of abstraction What does CDI give you that EJB alone does not? 14
  • 15. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | CDI Advantages • Automatic context and lifecycle management remove/pooling • Events+observers callbacks • Conversations • Metalevel programming / extensibility Higher level of abstraction vs EJB 15
  • 16. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | EJB Advantages • Remote access – RMI / CORBA – Web Services • MDBs / JMS • Timers; scheduled events • Asynchronous methods • Security intergration • JPA integration; container-managed extended persistence context • Locking for concurrent access What does EJB give you that CDI does not? 16
  • 17. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | EJB Advantages • EJBs (session beans) are CDI managed beans – They have all the benefits of CDI – Stateless session beans – @Dependent scope – Stateful session beans – any scope – Singleton session beans – @ApplicationScoped – However, need to use @Inject, not @EJB to acquire • Converse is not true – CDI beans are not EJBs – However: We are moving EJB benefits into CDI What else does EJB give you? 17
  • 18. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda EJB – History, Goals, Evolution CDI– History, Goals, Evolution Advantages/disadvantages – when to use EJB/CDI Java EE – Managed Bean Alignment What is our strategy for the future 1 2 3 4 5 18
  • 19. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | CDI and EJB: Bridging the Gap in Java EE • @ManagedBean • Managed Bean spec, introduced in Java EE 6 – Identified commonalities among different components as "managed beans" – Identified points for extension • "Managed Bean Alignment" was an important theme of Java EE 7 – Generalize use of injection, interceptors, new scopes 19
  • 20. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Managed Beans – Java EE 6 20 MATRIX1 Java EE 6 Contextual Support CDI injection into them Support Java EE Resource injection into them Injectable with @Inject Injectable with @Resource, @EJB, … (EE- defined) Support CDI interceptors Support EE interceptors Support Decorators Support Observer methods Can fire events Support Producer methods Can have Qualifiers Can have Scope Support CDI Constructor injection Support Timers CDI managed beans (non-EJBs) Y Y Y Y Y Y Y(1) Y Y Y Y Y Y Y Session beans (CDI-enabled behavior via @Inject) Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Java EE @ManagedBean beans (CDI- enabled behavior via @Inject) Y Y Y Y Y Y Y Y Y Y Y Y Y Y Session beans obtained via @EJB or JNDI lookup (with CDI enabled) Y Y Y Y Y Y Java EE @ManagedBeans beans obtained via @Resource or JNDI lookup (with CDI enabled) Y Y Y Y Y MDBs Y Y Y Y Y JAX-RS Resource classes Y Y Y Servlets Y Y Y Servlet filters, listeners Y Y Y Other Java EE component classes (Table EE. 5-1) Y Y Y JPA entities JPA entity listeners Y(4) Y Interceptors Y Y Y Decorators Y Y Y Producer methods Y(3) Y(5) Y(5) Y Y (2)(3) Y(2) Producer fields Y(2) Y(2) Disposer methods Y(3) Y(5) Y(5) Y Y(3) Observer methods Y(3) Y(5) Y(5) Y Y(3)
  • 21. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | CDI and EJB: Bridging the Gap in Java EE 7 • CDI is enabled by default in "implicit bean archives" • Use of CDI bean-defining annotations results in implicit bean archives – @SessionScoped, @Dependent, … – Bean archives include library jars, EJB jars, WEB-INF classes, … – No beans.xml required Enabling CDI by Default 21
  • 22. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | CDI and EJB: Bridging the Gap in Java EE 7 • CDI injection applies to all Java EE components when CDI is enabled • Java EE components support resource injection + CDI injection – Support for constructor injection added as well • CDI beans support CDI injection + resource injection • CDI producers can "transform" resource injection into CDI injection, making it strongly typed @Produces @Resource(lookup="java:global/env/jdbc/CustomerDatasource") @CustomerDatabase DataSource customerDatabase; Injection 22
  • 23. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | CDI and EJB: Bridging the Gap in Java EE 7 • CDI interceptor-binding interceptors apply to all Java EE components when CDI is enabled • EJBs support "EJB interceptors" + CDI interceptor-binding interceptors • CDI beans support CDI interceptor-binding interceptors + "EJB interceptors" • Java EE components also support both Interceptors 23
  • 24. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | JTA Transactional Interceptors @Inherited @InterceptorBinding @Target({TYPE, METHOD}) @Retention(RUNTIME) public @interface Transactional { TxType value() default TxType.REQUIRED; Class[] rollbackOn() default{}; Class[] dontRollbackOn() default{}; } @Transactional(rollbackOn={SQLException.class}, dontRollbackOn={SQLWarning.class}) public class ShoppingCart {...} Generalization of Container-managed Transactions (Java EE 7) 24
  • 25. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Bean Validation Interceptors @Stateless public class OrderService { ... @ValidOrder public Order placeOrder( @NotNull String productName, @Max(10) int quantity, @NotNull String customerName, @Address String customerAddress) { ... } } Method-level Validation (Bean Validation 1.1, Java EE 7) 25
  • 26. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | CDI and EJB: Bridging the Gap in Java EE 7 • CDI Scopes are extensible – @TransactionScope • Defined in JTA 1.2 • Used by JMS 2.0 – @FlowScoped (JSF 2.2) – WebSocket expected to define scope for WebSocket endpoints in Java EE 8 Scopes 26
  • 27. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Managed Beans – Java EE 7 27 MATRIX Java EE 7 Contextual Support CDI injection into them Support Java EE Resource injection into them Injectable with @Inject Injectable with @Resource, @EJB, … (EE- defined) Support CDI interceptors Support EE interceptors (1) Support Decorators Support Observer methods Can fire events Support Producer methods Can have Qualifiers Can have Scope Support CDI Constructor injection Support Timers CDI managed beans (non-EJBs) Y Y Y Y Y Y Y Y Y Y Y Y Y Y Session beans (CDI-enabled behavior via @Inject) Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Java EE @ManagedBean beans (CDI- enabled behavior via @Inject) Y Y Y Y Y Y Y Y Y Y Y Y Y Y Session beans obtained via @EJB or JNDI lookup (with CDI enabled) Y Y Y Y Y Y Y Y Y Java EE @ManagedBeans beans obtained via @Resource or JNDI lookup (with CDI enabled) Y Y Y Y Y Y Y Y MDBs Y Y Y(6) Y Y Y Y Y JAX-RS Resource classes Y Y Y(6) Y Y Y Y Y Servlets Y Y Y(6) Y Y Y Y Y Servlet filters, listeners Y Y Y(6) Y Y Y Y Y Other Java EE component classes (Table EE. 5-1) Y Y Y(6) Y Y Y Y Y JPA entities Y(6) JPA entity listeners (4) Y Y(6) Y Y Y Y Y Interceptors Y Y Y(6) Y Y Decorators Y Y Y Y Producer methods Y(3) Y(5) Y(5) Y Y (2)(3) Y(2) Producer fields Y(2) Y(2) Disposer methods Y(3) Y(5) Y(5) Y Y(3) Observer methods Y(3) Y(5) Y(5) Y Y(3)
  • 28. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda EJB – History, Goals, Evolution CDI– History, Goals, Evolution Advantages/disadvantages – when to use EJB/CDI Java EE – Managed Bean Alignment What is our strategy for the future 1 2 3 4 5 28
  • 29. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | CDI and EJB: Bridging the Gap in Java EE 8 • Java EE 8 continues the theme of Managed-Bean Alignment • Container-managed security: authorization • Message-driven beans Expanded use of EJB Container Services 29
  • 30. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Proposed: Authorization via Security Interceptors @IsAuthorized("hasRoles('Manager') && schedule.officeHrs") public void transferFunds() {...} @IsAuthorized("hasRoles('Manager') && hasAttribute('directReports', employee.id)") public double getSalary(int employeeId) {...} @IsAuthorized(ruleSourceName="java:app/payrollAuthRules", rule="report") public void displayReport() {...}; Java EE Security 1.0 (Java EE 8) 30
  • 31. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Message-driven Beans • Alternative to EJB message-driven beans • Usable by any CDI managed bean • Simpler JMS-specific annotations • No need for MessageListener implementation JMS 2.1: New API to receive messages asynchronously (Java EE 8) 31
  • 32. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Message-driven Beans @MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName="connectionFactoryLookup", propertyValue="jms/myCF"), @ActivationConfigProperty(propertyName="destinationLookup", propertyValue="jms/myQueue"), @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms/Queue")} public class MyMDB implements MessageListener { public void onMessage(Message message) { // extract message body String body = message.getBody(String.class)); // process message body } } EJB MDBs Today (Java EE 7) 32
  • 33. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Proposed: Message-driven Beans @RequestScoped public class MyListenerBean { @JMSListener(destinationLookup="jms/myQueue") @Transactional public void myCallback(Message message) { ... } } JMS 2.1 Tomorrow: Allow any Java EE bean to be a listener (Java EE 8) 33
  • 34. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Bridging the Gap • JAX-RS Injection alignment • Parameter injection • Scope for WebSocket endpoints • Extension of Timer Service and Timer notifications (@Schedule) • … Other Areas of Alignment 34
  • 35. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Some Gaps Remain • Java EE components are CDI managed beans – They can be injected with @Inject – But, Java EE components other than session beans lose their Java EE "componentness" – E.g., you can inject a servlet into a managed bean, but the injected instance won't still service web requests 35
  • 36. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Summary • Java EE 6 – Interceptors • Java EE 7 – Container-managed transactions transactional interceptors • Java EE 8 – Container-managed authorization security interceptors – Message-driven beans simplified messaging with CDI-based MDBs • Java EE 9 – Timer Service (?) – Timed Events (?) – … (?) EJB Features made more broadly available through CDI 36
  • 37. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What is the Future of EJB? • Part of EJB becoming Optional – EJB Entity Beans, EJB QL • Optional as of Java EE 7; superseded by JPA – Support for JAX-RPC • Optional as of Java EE 7; superseded by JAX-WS – IIOP Interoperability ?? • Java EE 8 Experts will decide on "Proposed Optional" status – Remote interfaces ?? • Java EE 8 Experts will decide on "Proposed Optional" status – Optionality process is slow • Takes 2 Java EE Platform release cycles 37
  • 38. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What is the Future of EJB? • Important EJB features are being made more broadly available – Interceptors, container-managed txs and security, MDBs, … – Availability is through mechanisms of CDI • Will EJB still be relevant ? • EJB's long-term future depends on the future of remaining features – Remote access (RMI, Web Services) – @Schedule'd events and Timer Service – Singletons - @Startup; @DependsOn; container-managed concurrency – Asynchronous methods – Integration with JPA 38
  • 39. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | How You Can Influence the Discussion • Adopt a JSR – http://glassfish.org/adoptajsr • Join an Expert Group project – http://javaee-spec.java.net – https://java.net/projects/javaee-spec/pages/Specifications • The Aquarium – http://blogs.oracle.com/theaquarium • Java EE 8 Reference Implementation – http://glassfish.org 39
  • 40. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 40
  • 41. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 41