SlideShare una empresa de Scribd logo
1 de 43
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティスAmazon Web Services Japan
 
思ったほど怖くない! Haskell on JVM 超入門 #jjug_ccc #ccc_l8
思ったほど怖くない! Haskell on JVM 超入門 #jjug_ccc #ccc_l8思ったほど怖くない! Haskell on JVM 超入門 #jjug_ccc #ccc_l8
思ったほど怖くない! Haskell on JVM 超入門 #jjug_ccc #ccc_l8y_taka_23
 
企業システムにアジャイルは必要か
企業システムにアジャイルは必要か企業システムにアジャイルは必要か
企業システムにアジャイルは必要かHiromasa Oka
 
オンプレミスからクラウドへ:Oracle Databaseの移行ベストプラクティスを解説 (Oracle Cloudウェビナーシリーズ: 2021年2月18日)
オンプレミスからクラウドへ:Oracle Databaseの移行ベストプラクティスを解説 (Oracle Cloudウェビナーシリーズ: 2021年2月18日)オンプレミスからクラウドへ:Oracle Databaseの移行ベストプラクティスを解説 (Oracle Cloudウェビナーシリーズ: 2021年2月18日)
オンプレミスからクラウドへ:Oracle Databaseの移行ベストプラクティスを解説 (Oracle Cloudウェビナーシリーズ: 2021年2月18日)オラクルエンジニア通信
 
実践!OpenTelemetry と OSS を使った Observability 基盤の構築(CloudNative Days Tokyo 2022 発...
実践!OpenTelemetry と OSS を使った Observability 基盤の構築(CloudNative Days Tokyo 2022 発...実践!OpenTelemetry と OSS を使った Observability 基盤の構築(CloudNative Days Tokyo 2022 発...
実践!OpenTelemetry と OSS を使った Observability 基盤の構築(CloudNative Days Tokyo 2022 発...NTT DATA Technology & Innovation
 
グラフデータベース入門
グラフデータベース入門グラフデータベース入門
グラフデータベース入門Masaya Dake
 
マイクロサービス化設計入門 - AWS Dev Day Tokyo 2017
マイクロサービス化設計入門 - AWS Dev Day Tokyo 2017マイクロサービス化設計入門 - AWS Dev Day Tokyo 2017
マイクロサービス化設計入門 - AWS Dev Day Tokyo 2017Yusuke Suzuki
 
分散トレーシングAWS:X-Rayとの上手い付き合い方
分散トレーシングAWS:X-Rayとの上手い付き合い方分散トレーシングAWS:X-Rayとの上手い付き合い方
分散トレーシングAWS:X-Rayとの上手い付き合い方Recruit Lifestyle Co., Ltd.
 
Requirements Analysis And Design Ddefinition
Requirements Analysis And Design DdefinitionRequirements Analysis And Design Ddefinition
Requirements Analysis And Design DdefinitionOD Ali
 
エンタープライズ、アーキテクチャ、アジャイルのこれから
エンタープライズ、アーキテクチャ、アジャイルのこれからエンタープライズ、アーキテクチャ、アジャイルのこれから
エンタープライズ、アーキテクチャ、アジャイルのこれからYusuke Suzuki
 
VCL ユーザーのための FireMonkey 入門
VCL ユーザーのための FireMonkey 入門VCL ユーザーのための FireMonkey 入門
VCL ユーザーのための FireMonkey 入門Jun Hosokawa
 
5.6 以前の InnoDB Flushing
5.6 以前の InnoDB Flushing5.6 以前の InnoDB Flushing
5.6 以前の InnoDB FlushingTakanori Sejima
 
しばちょう先生が語る!オラクルデータベースの進化の歴史と最新技術動向#2
しばちょう先生が語る!オラクルデータベースの進化の歴史と最新技術動向#2しばちょう先生が語る!オラクルデータベースの進化の歴史と最新技術動向#2
しばちょう先生が語る!オラクルデータベースの進化の歴史と最新技術動向#2オラクルエンジニア通信
 
JVMのGCアルゴリズムとチューニング
JVMのGCアルゴリズムとチューニングJVMのGCアルゴリズムとチューニング
JVMのGCアルゴリズムとチューニング佑哉 廣岡
 
Zabbix最新情報 ~Zabbix 6.0に向けて~ @OSC2021 Online/Fall
Zabbix最新情報 ~Zabbix 6.0に向けて~ @OSC2021 Online/FallZabbix最新情報 ~Zabbix 6.0に向けて~ @OSC2021 Online/Fall
Zabbix最新情報 ~Zabbix 6.0に向けて~ @OSC2021 Online/FallAtsushi Tanaka
 
dbt Cloud intro 日本語 202206
dbt Cloud intro 日本語 202206dbt Cloud intro 日本語 202206
dbt Cloud intro 日本語 202206Paul Hallaste
 
さらに上を目指すための iOS アプリ設計
さらに上を目指すための iOS アプリ設計さらに上を目指すための iOS アプリ設計
さらに上を目指すための iOS アプリ設計Taketo Sano
 
SI現場のテスト自動化への挑戦〜フルコンテナ構成のCI/CD環境〜
SI現場のテスト自動化への挑戦〜フルコンテナ構成のCI/CD環境〜SI現場のテスト自動化への挑戦〜フルコンテナ構成のCI/CD環境〜
SI現場のテスト自動化への挑戦〜フルコンテナ構成のCI/CD環境〜Daiki Kawanuma
 
iOS WKWebViewの魔改造 - iOSDC 2018
iOS WKWebViewの魔改造 - iOSDC 2018iOS WKWebViewの魔改造 - iOSDC 2018
iOS WKWebViewの魔改造 - iOSDC 2018Shingo Fukuyama
 
ソフトウェア アーキテクチャ基礎 輪読会資料 第2章 アーキテクチャ思考
ソフトウェア アーキテクチャ基礎 輪読会資料 第2章 アーキテクチャ思考 ソフトウェア アーキテクチャ基礎 輪読会資料 第2章 アーキテクチャ思考
ソフトウェア アーキテクチャ基礎 輪読会資料 第2章 アーキテクチャ思考 琢磨 三浦
 

La actualidad más candente (20)

[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
 
思ったほど怖くない! Haskell on JVM 超入門 #jjug_ccc #ccc_l8
思ったほど怖くない! Haskell on JVM 超入門 #jjug_ccc #ccc_l8思ったほど怖くない! Haskell on JVM 超入門 #jjug_ccc #ccc_l8
思ったほど怖くない! Haskell on JVM 超入門 #jjug_ccc #ccc_l8
 
企業システムにアジャイルは必要か
企業システムにアジャイルは必要か企業システムにアジャイルは必要か
企業システムにアジャイルは必要か
 
オンプレミスからクラウドへ:Oracle Databaseの移行ベストプラクティスを解説 (Oracle Cloudウェビナーシリーズ: 2021年2月18日)
オンプレミスからクラウドへ:Oracle Databaseの移行ベストプラクティスを解説 (Oracle Cloudウェビナーシリーズ: 2021年2月18日)オンプレミスからクラウドへ:Oracle Databaseの移行ベストプラクティスを解説 (Oracle Cloudウェビナーシリーズ: 2021年2月18日)
オンプレミスからクラウドへ:Oracle Databaseの移行ベストプラクティスを解説 (Oracle Cloudウェビナーシリーズ: 2021年2月18日)
 
実践!OpenTelemetry と OSS を使った Observability 基盤の構築(CloudNative Days Tokyo 2022 発...
実践!OpenTelemetry と OSS を使った Observability 基盤の構築(CloudNative Days Tokyo 2022 発...実践!OpenTelemetry と OSS を使った Observability 基盤の構築(CloudNative Days Tokyo 2022 発...
実践!OpenTelemetry と OSS を使った Observability 基盤の構築(CloudNative Days Tokyo 2022 発...
 
グラフデータベース入門
グラフデータベース入門グラフデータベース入門
グラフデータベース入門
 
マイクロサービス化設計入門 - AWS Dev Day Tokyo 2017
マイクロサービス化設計入門 - AWS Dev Day Tokyo 2017マイクロサービス化設計入門 - AWS Dev Day Tokyo 2017
マイクロサービス化設計入門 - AWS Dev Day Tokyo 2017
 
分散トレーシングAWS:X-Rayとの上手い付き合い方
分散トレーシングAWS:X-Rayとの上手い付き合い方分散トレーシングAWS:X-Rayとの上手い付き合い方
分散トレーシングAWS:X-Rayとの上手い付き合い方
 
Requirements Analysis And Design Ddefinition
Requirements Analysis And Design DdefinitionRequirements Analysis And Design Ddefinition
Requirements Analysis And Design Ddefinition
 
エンタープライズ、アーキテクチャ、アジャイルのこれから
エンタープライズ、アーキテクチャ、アジャイルのこれからエンタープライズ、アーキテクチャ、アジャイルのこれから
エンタープライズ、アーキテクチャ、アジャイルのこれから
 
VCL ユーザーのための FireMonkey 入門
VCL ユーザーのための FireMonkey 入門VCL ユーザーのための FireMonkey 入門
VCL ユーザーのための FireMonkey 入門
 
5.6 以前の InnoDB Flushing
5.6 以前の InnoDB Flushing5.6 以前の InnoDB Flushing
5.6 以前の InnoDB Flushing
 
しばちょう先生が語る!オラクルデータベースの進化の歴史と最新技術動向#2
しばちょう先生が語る!オラクルデータベースの進化の歴史と最新技術動向#2しばちょう先生が語る!オラクルデータベースの進化の歴史と最新技術動向#2
しばちょう先生が語る!オラクルデータベースの進化の歴史と最新技術動向#2
 
JVMのGCアルゴリズムとチューニング
JVMのGCアルゴリズムとチューニングJVMのGCアルゴリズムとチューニング
JVMのGCアルゴリズムとチューニング
 
Zabbix最新情報 ~Zabbix 6.0に向けて~ @OSC2021 Online/Fall
Zabbix最新情報 ~Zabbix 6.0に向けて~ @OSC2021 Online/FallZabbix最新情報 ~Zabbix 6.0に向けて~ @OSC2021 Online/Fall
Zabbix最新情報 ~Zabbix 6.0に向けて~ @OSC2021 Online/Fall
 
dbt Cloud intro 日本語 202206
dbt Cloud intro 日本語 202206dbt Cloud intro 日本語 202206
dbt Cloud intro 日本語 202206
 
さらに上を目指すための iOS アプリ設計
さらに上を目指すための iOS アプリ設計さらに上を目指すための iOS アプリ設計
さらに上を目指すための iOS アプリ設計
 
SI現場のテスト自動化への挑戦〜フルコンテナ構成のCI/CD環境〜
SI現場のテスト自動化への挑戦〜フルコンテナ構成のCI/CD環境〜SI現場のテスト自動化への挑戦〜フルコンテナ構成のCI/CD環境〜
SI現場のテスト自動化への挑戦〜フルコンテナ構成のCI/CD環境〜
 
iOS WKWebViewの魔改造 - iOSDC 2018
iOS WKWebViewの魔改造 - iOSDC 2018iOS WKWebViewの魔改造 - iOSDC 2018
iOS WKWebViewの魔改造 - iOSDC 2018
 
ソフトウェア アーキテクチャ基礎 輪読会資料 第2章 アーキテクチャ思考
ソフトウェア アーキテクチャ基礎 輪読会資料 第2章 アーキテクチャ思考 ソフトウェア アーキテクチャ基礎 輪読会資料 第2章 アーキテクチャ思考
ソフトウェア アーキテクチャ基礎 輪読会資料 第2章 アーキテクチャ思考
 

Destacado

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
 

Destacado (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 a 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 a 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...
 

Más de 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
 

Más de 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
 

Último

VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...singhpriety023
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...Escorts Call Girls
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...nirzagarg
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.soniya singh
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋nirzagarg
 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...SUHANI PANDEY
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableSeo
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)Delhi Call girls
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtrahman018755
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge GraphsEleniIlkou
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftAanSulistiyo
 
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...roncy bisnoi
 
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...tanu pandey
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...Neha Pandey
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...nilamkumrai
 
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...nilamkumrai
 

Último (20)

VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
 
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
 
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
 

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