SlideShare uma empresa Scribd logo
1 de 55
Future of Java EE with SE 8
May 18, 2014
Hirofumi Iwasaki
Financial Service Department, Development Unit,
Rakuten, Inc.
http://www.rakuten.co.jp/
Twitter hashtag: #ccc_r11
2
Speaker Biography
 Hirofumi Iwasaki
– Group Manager, Technology Manager
– Financial Service Department, Development Unit,
Rakuten, Inc. (Fukuoka Office)
 Carrier
– Planning, designing & implements for many huge enterprise
systems for financial, manufacturer, public systems with enterprise
middleware, especially Java EE & .NET in Japan for about 16
years.
 Opus, Lectures, etc.
– Magazine: @IT (2005-2010), CIO Magazine (2009), IT Architect
(2005-2009), Web+DB Press (2005), Java World (2001-2004), etc.
– Lectures: WebLogic key person roundtable (2012-2013), etc.
– twitter: @HirofumiIwasaki (English)
3
Happy Java 8 Release!
But for Java EE ?
Useful for EE?
4
Java EE Overview
5
 Standard specifications for application servers
(except for MS).
What's Java EE (1/2)
Commercial
Open Source
etc.
Java EE
Specification
To make
assurance double
sure
Liberty Profile etc.
+
6
 For ENTERPRISE systems (Enterprise Edition)
specifications (full profile)
– 'Enterprise' means transactional.
– Core architecture is EJB (JTA & CMT) with auto transaction
systems.
– Transactional connectivity for other systems with JPA (JDBC),
JMS, RMI-IIOP.
– Web architecture with JSF (Servlet & Facelet), JAX.
 Each Java EE specification covers general enterprise requirements.
– Not for personal usage.  Use Java SE only.
– Not for build-in usage.  Use Java ME.
– For your enterprise system  Use Java EE with Java SE.
What's Java EE (2/2) To make
assurance double
sure
7
The History of Java EE
J2EE
1.2
(1999)
J2EE
1.3
(2001)
J2EE
1.4
(2003)
Java EE
5
(2006)
Java EE
6
(2009)
Java EE
7
(2013)
Born! Pandemic
Era
Integration
Era
Mess Era
(for EE spec)
Unite to Single
Standard
Again!
8
Combinations of SE and EE
J2EE
1.2
(1999)
J2EE
1.3
(2001)
J2EE
1.4
(2003)
Java
EE 5
(2006)
Java
EE 6
(2009)
Java
EE 7
(2013)
J2SE
1.2
(1998)
J2SE
1.3
(2000)
J2SE
1.4
(2002)
J2SE
5
(2004)
Java
SE 6
(2006)
Java
SE 7
(2011)
Java
SE 8
(2014)
One EE specification, with latest SE version
Java EE 7 relies on SE 7
Java EE 7 is not fit perfectly for SE 8 improved functions
9
Java EE Application Servers Versions
Vendor App Server EE 1.4
(2003-)
EE 5
(2006-)
EE 6
(2009-)
EE 7
(2013-)
Open Source GlassFish - 2.x 3.x 4.0
Oracle WebLogic 9.x 10.x 12.x -
IBM WebSphere 5.1 6.x, 7.x 8.x -
IBM Liberty Profile - - 8.5 -
Open Source Geronimo - 2.x 3.x -
Open Source TomEE+ - - 1.x -
Red Hat JBoss 4.x 5.1 7.1 -
Red Hat WildFly - - - 8.0
Fujitsu Interstage 9.0,9.1 9.2,10.x,11.0 11.1 -
Hitachi Cosminexus 7.x 8.x 9.x -
The de facto
latest version
is still EE 6
10
Java SE Support Status of Java EE App Servers
Vendor App Server EE 6 (2009 -) EE 7 (2013-)
Ver. SE Ver. Ver. SE Ver.
Open Source GlassFish 3.x SE 7 4.0 SE 7
Oracle WebLogic 12.1.x SE 6, SE 7 - -
IBM WebSphere 8.x SE 6, SE 7 - -
Open Source Geronimo 3.x SE 6, SE 7 - -
Open Source TomEE+ 1.x SE 7 - -
Red Hat JBoss 7.x SE 6, SE 7 - -
Red Hat WildFly - - 8.0 SE 7
Fujitsu Interstage 11.1 SE 6, SE 7 - -
Hitachi Cosminexus 9.x SE 7 - -
SE 8 is not
officially
supported yet
*
* WebLogic 12.1.1 only
11
12
Nice!
13
Excellent!
14
By the Way,
15
Java SE 8 Updates Overview
Basic Topics
16
Java SE 8 New Functions
17
Java SE 8 Deleted Functions
So long..
18
SE 8 New Feature – Lambda with Stream API
List<String> aList
= Arrays.asList(new String[]{"a", "b", "c", "d", "e"});
// Normal
for (String x : aList) {
System.out.println(x);
}
// Lambda with parallel stream
aList.parallelStream().forEachOrdered(x -> System.out.println(x));
Stream API
(auto parallel threading)
Lambda Expression
(just a syntax sugar)
Might not work with EE 7
19
SE 8 New Feature – Lambda with Stream API
Don’t worry.
NetBeans supports you!
Automatic Conversion
20
SE 8 New Feature – New Date Time API (Basic)
// Calendar.
Calendar cal = Calendar.getInstance();
// Date.
int year = cal.get(Calendar.YEAR);
int month = cal.get(Calendar.MONTH) + 1;
int day = cal.get(Calendar.DAY_OF_MONTH);
// Time.
int hour = cal.get(Calendar.HOUR);
int minutes = cal.get(Calendar.MINUTE);
int second = cal.get(Calendar.SECOND);
int millisecond = cal.get(Calendar.MILLISECOND);
// Local Date Time.
LocalDateTime dateTime =
LocalDateTime.now();
// Local Date.
LocalDate date = dateTime.toLocalDate();
int year = date.getYear();
int month = date.getMonthValue();
int day = date.getDayOfMonth();
DayOfWeek dayOfWeek = date.getDayOfWeek();
// Local Time.
LocalTime time = dateTime.toLocalTime();
int hour = time.getHour();
int minute = time.getMinute();
int second = time.getSecond();
int nanoSecond = time.getNano();
Java 1.2 – Java 7 Java 8 –
-1
From Millisecond to Nanosecond
(.000  .000000000)
21
SE 8 New Feature – New Date Time API (Calculation)
// Date Calculation
Calendar threeWAfter = Calendar.getInstance();
threeWAfter.setLenient(false);
threeWAfter.add(Calendar.DAY_OF_MONTH, 7 * 3);
Calendar fourMBefore = Calendar.getInstance();
fourMBefore.setLenient(false);
fourMBefore.add(Calendar.MONTH, -4);
// Time Calculation
Calendar sevenHAfter = Calendar.getInstance();
sevenHAfter.setLenient(false);
sevenHAfter.add(Calendar.HOUR, 7);
Calendar threeMBefore = Calendar.getInstance();
threeMBefore.setLenient(false);
threeMBefore.add(Calendar.MINUTE, -3);
// Local Date Time.
LocalDateTime dateTime = LocalDateTime.now();
LocalDate date = dateTime.toLocalDate();
LocalTime time = dateTime.toLocalTime();
// Date Calculation
LocalDate threeWAfter = date.plusWeeks(3);
LocalDate fourMBefore = date.minusMonths(4);
// Time calculation
LocalTime sevenHAfter = time.plusHours(7);
LocalTime threeMBefore = time.minusMinutes(3);
Java 1.2 – Java 7 Java 8 –
Simplified, sophisticated style!
22
SE 8 New Feature – New Date Time API (JDBC)
ANSI SQL Java SE 8
DATE java.time.LocalDate
TIME java.time.LocalDate
TIMESTAMP java.time.LocalDateTime
TIME WITH TIMEZONE java.time.OffsetTime
TIMESTAMP WITH TIMEZONE java.time.OffsetDateTime
http://www.oracle.com/technetwork/articles/java/jf14-date-time-2125367.html
Might not work with EE 7
23
SE 8 New Feature – Type Annotation Improvement
24
SE 8 New Feature – Type Annotation Improvement
25
Java SE 8 applying points
for EE 7
26
Rich Clients
(no business logics)
Web Presentation
(no business logics)
Business Logic
(no presentations)
Typical Usage of EE Specs
Data Access
JPA
EJB
JSF
DBs
Java FX
JTA
Automatic
Transaction
Messaging
JMS MQ
Connection
RMI-IIOP
Other
Servers
EMail
MTAJavaMail
JAX
Call
Call
Call
Call
Call
Call
27
Rich Clients
(no business logics)
Web Presentation
(no business logics)
Business Logic
(no presentations)
Typical Usage of EE Specs
Data Access
JPA
EJB
JSF
DBs
Java FX
JTA
Automatic
Transaction
Messaging
JMS MQ
Connection
RMI-IIOP
Other
Servers
EMail
MTAJavaMail
JAX
Call
Call
Call
Call
Call
Call
Main stage is here!
28
Basic of Applying SE 8 feature in EE 7 Apps
 EE 7 didn’t consider the SE 8 in their specification.
– EE 7 spec don’t know the SE 8.
 Many SE 8 new functions might be work correctly if the app server
supported the SE 8 as their VM.
– Lambda expressions
– Stream APIs (limited)
– New date time APIs (limited)
– etc.
29
Basic of Applying SE 8 feature in EE 7 Apps
 But some conflicted specs might not be worked correctly
– Stream API (multithreading with EJB 3.2, e.g. parallel stream)
– New date time APIs (JDBC new mappings with JPA 2.1)
– etc.
 Wait the Java EE 8 for the full support of SE 8
30
Java SE 8 Updates Overview
Advanced Topics
31
Study of Limitation Case
with SE 8 in EE 7
32
Let’s take a look
of EJB 3.2 (EE 7)
with Parallel Stream,
with Glassfish 4.0.1 beta.
33
Downloaded from here.
34
NetBeans 8
detected 4.0.1
35
NetBeans 8
supported JDK 8
36
Startup succeeded
with NetBeans 8.
37
Sample Test Application
<EJB>
LambdaLogic.java
<CDI Bean> *
IndexBean.java
<JSF Facelet> *
index.xhtml
*This is just a workaround due to
not working Web Services / REST tester
in GlassFish 4.0.1b5.
38
Wrote Lambda with (Parallel)Stream in EJB
39
Wrote CDI Bean for Calling EJB
40
Wrote CDI Bean for Calling EJB
41
Results
Both Succeeded.
42
Really?
43
Tested
Fork/Join Framework
with
WebLogic Server 12.1.2
(yet Java EE 6)
44
Just a kidding
codes…
45
???
46
Just removed
the EJB annotation,
turn to POJO
47
Works !?
Why?????
48
Let’s Check
the EJB 3.2 Specification
49
EJB 3.2 Spec don’t allowed Manual Multithreading
Still not allowed.
Oh…
50
Parallel Stream is
implemented with
Fork/Join Framework !
Wow!!
51
Parallel Stream Uses Fork/Join Framework
 Fork/Join framework was introduced in Java SE 7
– Not supported in EJB container.
 Parallel Stream uses fork/join framework in its implementation
– Might not be supported in EJB 3.2 container in EE 7
– Some complicated case might not be worked correctly
 Exception management case
 JTA with container managed transaction in parallel loop case
 @Asynchronous method call in parallel loop
 Differed transaction isolation level method calling
 Security management
 etc.
52
Conclusion
 All Java EE 7 app servers
are not supported SE 8 yet,
but some simple case are
usable with 8.
 Many limitation are still
existing for applying SE to
EE 7, but useful new
functions must be improve
the stage of your enterprise.
Go Ahead!
Ready to apply SE 8
for the Java EE!
53
Information
Come and Join Us!
54
55

Mais conteúdo relacionado

Mais procurados

Ankara JUG Ağustos 2013 - Oracle ADF
Ankara JUG Ağustos 2013 - Oracle ADFAnkara JUG Ağustos 2013 - Oracle ADF
Ankara JUG Ağustos 2013 - Oracle ADF
Ankara JUG
 
Java EE 7 (Hamed Hatami)
Java EE 7 (Hamed Hatami)Java EE 7 (Hamed Hatami)
Java EE 7 (Hamed Hatami)
Hamed Hatami
 
JavaFX and JEE 7
JavaFX and JEE 7JavaFX and JEE 7
JavaFX and JEE 7
Vijay Nair
 

Mais procurados (20)

Java EE 8: On the Horizon
Java EE 8:  On the HorizonJava EE 8:  On the Horizon
Java EE 8: On the Horizon
 
Move from J2EE to Java EE
Move from J2EE to Java EEMove from J2EE to Java EE
Move from J2EE to Java EE
 
Ankara JUG Ağustos 2013 - Oracle ADF
Ankara JUG Ağustos 2013 - Oracle ADFAnkara JUG Ağustos 2013 - Oracle ADF
Ankara JUG Ağustos 2013 - Oracle ADF
 
What's New in WebLogic 12.1.3 and Beyond
What's New in WebLogic 12.1.3 and BeyondWhat's New in WebLogic 12.1.3 and Beyond
What's New in WebLogic 12.1.3 and Beyond
 
Building Java Desktop Apps with JavaFX 8 and Java EE 7
Building Java Desktop Apps with JavaFX 8 and Java EE 7Building Java Desktop Apps with JavaFX 8 and Java EE 7
Building Java Desktop Apps with JavaFX 8 and Java EE 7
 
Java EE7 Demystified
Java EE7 DemystifiedJava EE7 Demystified
Java EE7 Demystified
 
2015 JavaOne EJB/CDI Alignment
2015 JavaOne EJB/CDI Alignment2015 JavaOne EJB/CDI Alignment
2015 JavaOne EJB/CDI Alignment
 
Java EE7 in action
Java EE7 in actionJava EE7 in action
Java EE7 in action
 
50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutes50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutes
 
Have You Seen Java EE Lately?
Have You Seen Java EE Lately?Have You Seen Java EE Lately?
Have You Seen Java EE Lately?
 
Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate Framework
 
Java EE 7 - Overview and Status
Java EE 7  - Overview and StatusJava EE 7  - Overview and Status
Java EE 7 - Overview and Status
 
JavaFX Enterprise
JavaFX EnterpriseJavaFX Enterprise
JavaFX Enterprise
 
Sun Java EE 6 Overview
Sun Java EE 6 OverviewSun Java EE 6 Overview
Sun Java EE 6 Overview
 
Java EE 7 (Hamed Hatami)
Java EE 7 (Hamed Hatami)Java EE 7 (Hamed Hatami)
Java EE 7 (Hamed Hatami)
 
Java 7 workshop
Java 7 workshopJava 7 workshop
Java 7 workshop
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
 
JavaFX Uni Parthenope
JavaFX Uni ParthenopeJavaFX Uni Parthenope
JavaFX Uni Parthenope
 
JavaFX and JEE 7
JavaFX and JEE 7JavaFX and JEE 7
JavaFX and JEE 7
 
Overview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGOverview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUG
 

Destaque

J2EE vs JavaEE
J2EE vs JavaEEJ2EE vs JavaEE
J2EE vs JavaEE
eanimou
 
JAVA in Artificial intelligent
JAVA in Artificial intelligentJAVA in Artificial intelligent
JAVA in Artificial intelligent
Virat Andodariya
 
Nine Neins - where Java EE will never take you
Nine Neins - where Java EE will never take youNine Neins - where Java EE will never take you
Nine Neins - where Java EE will never take you
Markus Eisele
 

Destaque (20)

J2EE vs JavaEE
J2EE vs JavaEEJ2EE vs JavaEE
J2EE vs JavaEE
 
Integrity
IntegrityIntegrity
Integrity
 
Come and Play! with Java EE 7
Come and Play! with Java EE 7Come and Play! with Java EE 7
Come and Play! with Java EE 7
 
Branding Modern SharePoint
Branding Modern SharePointBranding Modern SharePoint
Branding Modern SharePoint
 
JAVA in Artificial intelligent
JAVA in Artificial intelligentJAVA in Artificial intelligent
JAVA in Artificial intelligent
 
Java EE Next
Java EE NextJava EE Next
Java EE Next
 
Testing Java EE Applications Using Arquillian
Testing Java EE Applications Using ArquillianTesting Java EE Applications Using Arquillian
Testing Java EE Applications Using Arquillian
 
Nine Neins - where Java EE will never take you
Nine Neins - where Java EE will never take youNine Neins - where Java EE will never take you
Nine Neins - where Java EE will never take you
 
Deep Learning meetup
Deep Learning meetupDeep Learning meetup
Deep Learning meetup
 
Java EE 8 Recipes
Java EE 8 RecipesJava EE 8 Recipes
Java EE 8 Recipes
 
Reactive Java EE - Let Me Count the Ways!
Reactive Java EE - Let Me Count the Ways!Reactive Java EE - Let Me Count the Ways!
Reactive Java EE - Let Me Count the Ways!
 
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 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVCJava EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVC
 
Barreras afectivas
Barreras afectivas Barreras afectivas
Barreras afectivas
 
Ingesting Drone Data into Big Data Platforms
Ingesting Drone Data into Big Data Platforms Ingesting Drone Data into Big Data Platforms
Ingesting Drone Data into Big Data Platforms
 
Java EE 8: What Servlet 4 and HTTP2 Mean
Java EE 8: What Servlet 4 and HTTP2 MeanJava EE 8: What Servlet 4 and HTTP2 Mean
Java EE 8: What Servlet 4 and HTTP2 Mean
 
Modern web application development with java ee 7
Modern web application development with java ee 7Modern web application development with java ee 7
Modern web application development with java ee 7
 
JavaScript Frameworks and Java EE – A Great Match
JavaScript Frameworks and Java EE – A Great MatchJavaScript Frameworks and Java EE – A Great Match
JavaScript Frameworks and Java EE – A Great Match
 
What is tackled in the Java EE Security API (Java EE 8)
What is tackled in the Java EE Security API (Java EE 8)What is tackled in the Java EE Security API (Java EE 8)
What is tackled in the Java EE Security API (Java EE 8)
 
Down-to-Earth Microservices with Java EE
Down-to-Earth Microservices with Java EEDown-to-Earth Microservices with Java EE
Down-to-Earth Microservices with Java EE
 

Semelhante a Future of Java EE with Java SE 8

Java New Evolution
Java New EvolutionJava New Evolution
Java New Evolution
Allan Huang
 
Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010
Codecamp Romania
 
Introduction to-release-11i-part-1-of-2-installation3771
Introduction to-release-11i-part-1-of-2-installation3771Introduction to-release-11i-part-1-of-2-installation3771
Introduction to-release-11i-part-1-of-2-installation3771
Mlx Le
 

Semelhante a Future of Java EE with Java SE 8 (20)

Java EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The FutureJava EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The Future
 
Java EE 6 and GlassFish portfolio
Java EE 6 and GlassFish portfolioJava EE 6 and GlassFish portfolio
Java EE 6 and GlassFish portfolio
 
Case Study of Financial Web System Development and Operations with Oracle Web...
Case Study of Financial Web System Development and Operations with Oracle Web...Case Study of Financial Web System Development and Operations with Oracle Web...
Case Study of Financial Web System Development and Operations with Oracle Web...
 
WebSphere App Server vs JBoss vs WebLogic vs Tomcat
WebSphere App Server vs JBoss vs WebLogic vs TomcatWebSphere App Server vs JBoss vs WebLogic vs Tomcat
WebSphere App Server vs JBoss vs WebLogic vs Tomcat
 
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
 
GlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and FutureGlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and Future
 
Java New Evolution
Java New EvolutionJava New Evolution
Java New Evolution
 
Java EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexusJava EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexus
 
Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010Java EE6 CodeCamp16 oct 2010
Java EE6 CodeCamp16 oct 2010
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 Overview
 
Java Version History.pdf
Java Version History.pdfJava Version History.pdf
Java Version History.pdf
 
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
 
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
 
Making The Move To Java 17 (JConf 2022)
Making The Move To Java 17 (JConf 2022)Making The Move To Java 17 (JConf 2022)
Making The Move To Java 17 (JConf 2022)
 
Java one 2010
Java one 2010Java one 2010
Java one 2010
 
Ejbandjsp 200119145750
Ejbandjsp 200119145750Ejbandjsp 200119145750
Ejbandjsp 200119145750
 
[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6
[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6
[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6
 
Introduction to-release-11i-part-1-of-2-installation3771
Introduction to-release-11i-part-1-of-2-installation3771Introduction to-release-11i-part-1-of-2-installation3771
Introduction to-release-11i-part-1-of-2-installation3771
 
J2 Ee Overview
J2 Ee OverviewJ2 Ee Overview
J2 Ee Overview
 
EJB 3.0 Java Persistence with Oracle TopLink
EJB 3.0 Java Persistence with Oracle TopLinkEJB 3.0 Java Persistence with Oracle TopLink
EJB 3.0 Java Persistence with Oracle TopLink
 

Mais de Hirofumi Iwasaki

Mais de Hirofumi Iwasaki (12)

MicroProfileの正しい使い方 (Java Developer Summit 2023)
MicroProfileの正しい使い方 (Java Developer Summit 2023)MicroProfileの正しい使い方 (Java Developer Summit 2023)
MicroProfileの正しい使い方 (Java Developer Summit 2023)
 
MicroProfile 5で超手軽に始める今どきのクラウド完全対応エンタープライズシステム
MicroProfile 5で超手軽に始める今どきのクラウド完全対応エンタープライズシステムMicroProfile 5で超手軽に始める今どきのクラウド完全対応エンタープライズシステム
MicroProfile 5で超手軽に始める今どきのクラウド完全対応エンタープライズシステム
 
Jakarta EEとMicroprofileの上手な付き合い方と使い方 - JakartaOne Livestream Japan 2020
Jakarta EEとMicroprofileの上手な付き合い方と使い方 - JakartaOne Livestream Japan 2020Jakarta EEとMicroprofileの上手な付き合い方と使い方 - JakartaOne Livestream Japan 2020
Jakarta EEとMicroprofileの上手な付き合い方と使い方 - JakartaOne Livestream Japan 2020
 
Jakarta EE + MicroProfile との付き合い方
Jakarta EE + MicroProfile との付き合い方Jakarta EE + MicroProfile との付き合い方
Jakarta EE + MicroProfile との付き合い方
 
45分で作る Java EE 8 システム
45分で作る Java EE 8 システム45分で作る Java EE 8 システム
45分で作る Java EE 8 システム
 
Java EE 7 with Apache Spark for the World’s Largest Credit Card Core Systems ...
Java EE 7 with Apache Spark for the World’s Largest Credit Card Core Systems ...Java EE 7 with Apache Spark for the World’s Largest Credit Card Core Systems ...
Java EE 7 with Apache Spark for the World’s Largest Credit Card Core Systems ...
 
Case Study: Credit Card Core System with Exalogic, Exadata, Oracle Cloud Mach...
Case Study: Credit Card Core System with Exalogic, Exadata, Oracle Cloud Mach...Case Study: Credit Card Core System with Exalogic, Exadata, Oracle Cloud Mach...
Case Study: Credit Card Core System with Exalogic, Exadata, Oracle Cloud Mach...
 
Java EE 6 Adoption in One of the World's Largest Online Financial Systems (fo...
Java EE 6 Adoption in One of the World's Largest Online Financial Systems (fo...Java EE 6 Adoption in One of the World's Largest Online Financial Systems (fo...
Java EE 6 Adoption in One of the World's Largest Online Financial Systems (fo...
 
Case Study of Financial Web System Development and Operations with Oracle Web...
Case Study of Financial Web System Development and Operations with Oracle Web...Case Study of Financial Web System Development and Operations with Oracle Web...
Case Study of Financial Web System Development and Operations with Oracle Web...
 
Java EE 6 Adoption in One of the World’s Largest Online Financial Systems [Ja...
Java EE 6 Adoption in One of the World’s Largest Online Financial Systems [Ja...Java EE 6 Adoption in One of the World’s Largest Online Financial Systems [Ja...
Java EE 6 Adoption in One of the World’s Largest Online Financial Systems [Ja...
 
Future of Java EE with SE 8 (revised)
Future of Java EE with SE 8 (revised)Future of Java EE with SE 8 (revised)
Future of Java EE with SE 8 (revised)
 
Java EE 7技術アップデート & 逆引き JSF 2.2
Java EE 7技術アップデート & 逆引き JSF 2.2 Java EE 7技術アップデート & 逆引き JSF 2.2
Java EE 7技術アップデート & 逆引き JSF 2.2
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

Future of Java EE with Java SE 8

  • 1. Future of Java EE with SE 8 May 18, 2014 Hirofumi Iwasaki Financial Service Department, Development Unit, Rakuten, Inc. http://www.rakuten.co.jp/ Twitter hashtag: #ccc_r11
  • 2. 2 Speaker Biography  Hirofumi Iwasaki – Group Manager, Technology Manager – Financial Service Department, Development Unit, Rakuten, Inc. (Fukuoka Office)  Carrier – Planning, designing & implements for many huge enterprise systems for financial, manufacturer, public systems with enterprise middleware, especially Java EE & .NET in Japan for about 16 years.  Opus, Lectures, etc. – Magazine: @IT (2005-2010), CIO Magazine (2009), IT Architect (2005-2009), Web+DB Press (2005), Java World (2001-2004), etc. – Lectures: WebLogic key person roundtable (2012-2013), etc. – twitter: @HirofumiIwasaki (English)
  • 3. 3 Happy Java 8 Release! But for Java EE ? Useful for EE?
  • 5. 5  Standard specifications for application servers (except for MS). What's Java EE (1/2) Commercial Open Source etc. Java EE Specification To make assurance double sure Liberty Profile etc. +
  • 6. 6  For ENTERPRISE systems (Enterprise Edition) specifications (full profile) – 'Enterprise' means transactional. – Core architecture is EJB (JTA & CMT) with auto transaction systems. – Transactional connectivity for other systems with JPA (JDBC), JMS, RMI-IIOP. – Web architecture with JSF (Servlet & Facelet), JAX.  Each Java EE specification covers general enterprise requirements. – Not for personal usage.  Use Java SE only. – Not for build-in usage.  Use Java ME. – For your enterprise system  Use Java EE with Java SE. What's Java EE (2/2) To make assurance double sure
  • 7. 7 The History of Java EE J2EE 1.2 (1999) J2EE 1.3 (2001) J2EE 1.4 (2003) Java EE 5 (2006) Java EE 6 (2009) Java EE 7 (2013) Born! Pandemic Era Integration Era Mess Era (for EE spec) Unite to Single Standard Again!
  • 8. 8 Combinations of SE and EE J2EE 1.2 (1999) J2EE 1.3 (2001) J2EE 1.4 (2003) Java EE 5 (2006) Java EE 6 (2009) Java EE 7 (2013) J2SE 1.2 (1998) J2SE 1.3 (2000) J2SE 1.4 (2002) J2SE 5 (2004) Java SE 6 (2006) Java SE 7 (2011) Java SE 8 (2014) One EE specification, with latest SE version Java EE 7 relies on SE 7 Java EE 7 is not fit perfectly for SE 8 improved functions
  • 9. 9 Java EE Application Servers Versions Vendor App Server EE 1.4 (2003-) EE 5 (2006-) EE 6 (2009-) EE 7 (2013-) Open Source GlassFish - 2.x 3.x 4.0 Oracle WebLogic 9.x 10.x 12.x - IBM WebSphere 5.1 6.x, 7.x 8.x - IBM Liberty Profile - - 8.5 - Open Source Geronimo - 2.x 3.x - Open Source TomEE+ - - 1.x - Red Hat JBoss 4.x 5.1 7.1 - Red Hat WildFly - - - 8.0 Fujitsu Interstage 9.0,9.1 9.2,10.x,11.0 11.1 - Hitachi Cosminexus 7.x 8.x 9.x - The de facto latest version is still EE 6
  • 10. 10 Java SE Support Status of Java EE App Servers Vendor App Server EE 6 (2009 -) EE 7 (2013-) Ver. SE Ver. Ver. SE Ver. Open Source GlassFish 3.x SE 7 4.0 SE 7 Oracle WebLogic 12.1.x SE 6, SE 7 - - IBM WebSphere 8.x SE 6, SE 7 - - Open Source Geronimo 3.x SE 6, SE 7 - - Open Source TomEE+ 1.x SE 7 - - Red Hat JBoss 7.x SE 6, SE 7 - - Red Hat WildFly - - 8.0 SE 7 Fujitsu Interstage 11.1 SE 6, SE 7 - - Hitachi Cosminexus 9.x SE 7 - - SE 8 is not officially supported yet * * WebLogic 12.1.1 only
  • 11. 11
  • 15. 15 Java SE 8 Updates Overview Basic Topics
  • 16. 16 Java SE 8 New Functions
  • 17. 17 Java SE 8 Deleted Functions So long..
  • 18. 18 SE 8 New Feature – Lambda with Stream API List<String> aList = Arrays.asList(new String[]{"a", "b", "c", "d", "e"}); // Normal for (String x : aList) { System.out.println(x); } // Lambda with parallel stream aList.parallelStream().forEachOrdered(x -> System.out.println(x)); Stream API (auto parallel threading) Lambda Expression (just a syntax sugar) Might not work with EE 7
  • 19. 19 SE 8 New Feature – Lambda with Stream API Don’t worry. NetBeans supports you! Automatic Conversion
  • 20. 20 SE 8 New Feature – New Date Time API (Basic) // Calendar. Calendar cal = Calendar.getInstance(); // Date. int year = cal.get(Calendar.YEAR); int month = cal.get(Calendar.MONTH) + 1; int day = cal.get(Calendar.DAY_OF_MONTH); // Time. int hour = cal.get(Calendar.HOUR); int minutes = cal.get(Calendar.MINUTE); int second = cal.get(Calendar.SECOND); int millisecond = cal.get(Calendar.MILLISECOND); // Local Date Time. LocalDateTime dateTime = LocalDateTime.now(); // Local Date. LocalDate date = dateTime.toLocalDate(); int year = date.getYear(); int month = date.getMonthValue(); int day = date.getDayOfMonth(); DayOfWeek dayOfWeek = date.getDayOfWeek(); // Local Time. LocalTime time = dateTime.toLocalTime(); int hour = time.getHour(); int minute = time.getMinute(); int second = time.getSecond(); int nanoSecond = time.getNano(); Java 1.2 – Java 7 Java 8 – -1 From Millisecond to Nanosecond (.000  .000000000)
  • 21. 21 SE 8 New Feature – New Date Time API (Calculation) // Date Calculation Calendar threeWAfter = Calendar.getInstance(); threeWAfter.setLenient(false); threeWAfter.add(Calendar.DAY_OF_MONTH, 7 * 3); Calendar fourMBefore = Calendar.getInstance(); fourMBefore.setLenient(false); fourMBefore.add(Calendar.MONTH, -4); // Time Calculation Calendar sevenHAfter = Calendar.getInstance(); sevenHAfter.setLenient(false); sevenHAfter.add(Calendar.HOUR, 7); Calendar threeMBefore = Calendar.getInstance(); threeMBefore.setLenient(false); threeMBefore.add(Calendar.MINUTE, -3); // Local Date Time. LocalDateTime dateTime = LocalDateTime.now(); LocalDate date = dateTime.toLocalDate(); LocalTime time = dateTime.toLocalTime(); // Date Calculation LocalDate threeWAfter = date.plusWeeks(3); LocalDate fourMBefore = date.minusMonths(4); // Time calculation LocalTime sevenHAfter = time.plusHours(7); LocalTime threeMBefore = time.minusMinutes(3); Java 1.2 – Java 7 Java 8 – Simplified, sophisticated style!
  • 22. 22 SE 8 New Feature – New Date Time API (JDBC) ANSI SQL Java SE 8 DATE java.time.LocalDate TIME java.time.LocalDate TIMESTAMP java.time.LocalDateTime TIME WITH TIMEZONE java.time.OffsetTime TIMESTAMP WITH TIMEZONE java.time.OffsetDateTime http://www.oracle.com/technetwork/articles/java/jf14-date-time-2125367.html Might not work with EE 7
  • 23. 23 SE 8 New Feature – Type Annotation Improvement
  • 24. 24 SE 8 New Feature – Type Annotation Improvement
  • 25. 25 Java SE 8 applying points for EE 7
  • 26. 26 Rich Clients (no business logics) Web Presentation (no business logics) Business Logic (no presentations) Typical Usage of EE Specs Data Access JPA EJB JSF DBs Java FX JTA Automatic Transaction Messaging JMS MQ Connection RMI-IIOP Other Servers EMail MTAJavaMail JAX Call Call Call Call Call Call
  • 27. 27 Rich Clients (no business logics) Web Presentation (no business logics) Business Logic (no presentations) Typical Usage of EE Specs Data Access JPA EJB JSF DBs Java FX JTA Automatic Transaction Messaging JMS MQ Connection RMI-IIOP Other Servers EMail MTAJavaMail JAX Call Call Call Call Call Call Main stage is here!
  • 28. 28 Basic of Applying SE 8 feature in EE 7 Apps  EE 7 didn’t consider the SE 8 in their specification. – EE 7 spec don’t know the SE 8.  Many SE 8 new functions might be work correctly if the app server supported the SE 8 as their VM. – Lambda expressions – Stream APIs (limited) – New date time APIs (limited) – etc.
  • 29. 29 Basic of Applying SE 8 feature in EE 7 Apps  But some conflicted specs might not be worked correctly – Stream API (multithreading with EJB 3.2, e.g. parallel stream) – New date time APIs (JDBC new mappings with JPA 2.1) – etc.  Wait the Java EE 8 for the full support of SE 8
  • 30. 30 Java SE 8 Updates Overview Advanced Topics
  • 31. 31 Study of Limitation Case with SE 8 in EE 7
  • 32. 32 Let’s take a look of EJB 3.2 (EE 7) with Parallel Stream, with Glassfish 4.0.1 beta.
  • 37. 37 Sample Test Application <EJB> LambdaLogic.java <CDI Bean> * IndexBean.java <JSF Facelet> * index.xhtml *This is just a workaround due to not working Web Services / REST tester in GlassFish 4.0.1b5.
  • 38. 38 Wrote Lambda with (Parallel)Stream in EJB
  • 39. 39 Wrote CDI Bean for Calling EJB
  • 40. 40 Wrote CDI Bean for Calling EJB
  • 46. 46 Just removed the EJB annotation, turn to POJO
  • 48. 48 Let’s Check the EJB 3.2 Specification
  • 49. 49 EJB 3.2 Spec don’t allowed Manual Multithreading Still not allowed. Oh…
  • 50. 50 Parallel Stream is implemented with Fork/Join Framework ! Wow!!
  • 51. 51 Parallel Stream Uses Fork/Join Framework  Fork/Join framework was introduced in Java SE 7 – Not supported in EJB container.  Parallel Stream uses fork/join framework in its implementation – Might not be supported in EJB 3.2 container in EE 7 – Some complicated case might not be worked correctly  Exception management case  JTA with container managed transaction in parallel loop case  @Asynchronous method call in parallel loop  Differed transaction isolation level method calling  Security management  etc.
  • 52. 52 Conclusion  All Java EE 7 app servers are not supported SE 8 yet, but some simple case are usable with 8.  Many limitation are still existing for applying SE to EE 7, but useful new functions must be improve the stage of your enterprise. Go Ahead! Ready to apply SE 8 for the Java EE!
  • 54. 54
  • 55. 55