SlideShare a Scribd company logo
1 of 67
@HirofumiIwasaki #jdt65
Seven Points for Applying Java EE 7
Apr 8, 2015
Hirofumi Iwasaki
Financial Service Department, DU, Rakuten, Inc.
@HirofumiIwasaki #jdt65 2
Speaker Biography
 Hirofumi Iwasaki
– Group Manager, Technology Manager
– Financial Service Department, Development Unit,
Rakuten, Inc.
 Carrier
– 16 Years of experience in planning, designing and implementation of Japanese financial,
manufacturing and public enterprise system with emphasis in Java EE and .NET enterprise
middleware.
 Opus, Lectures, etc.
– Conferences: JavaOne 2014, Oracle OpenWorld 2014, Java Day Tokyo 2014, JJUG CCC
Spring & Fall (2014), WebLogic roundtable (2012-2013), Rakuten Tech Conference (2014,
2013) etc.
– Magazine: @IT (2005-2010), CIO Magazine (2009), IT Architect (2005-2009), Web+DB
Press (2005), Java World (2001-2004), etc.
@HirofumiIwasaki #jdt65 3
JCP with Rakuten
Rakuten Joined JCP as a
member of “user company”.
@HirofumiIwasaki #jdt65
UpdateYour Knowledge
JavaEE
To
of
@HirofumiIwasaki #jdt65 5
1. Select the Java EE 7 based application server
2. Use modern IDE to build with Maven instead of text editor
3. Apply JSF for front-end framework
4. Apply EJB for back-end framework
5. Consider remote connectivity
6. Apply JPA for database persistence
7. Consider EE 8 for future-prove
Agenda
@HirofumiIwasaki #jdt65
1. Select the Java EE 7 based
application server
To
@HirofumiIwasaki #jdt65 7
GlassFish &
Compatible Group
WebLogic World
Geronimo &
Compatible Group
JBoss World
Japan
Group
App
Engine
Copy
Java EE World and Others
Korea
Group
Apache
Group
Google
@HirofumiIwasaki #jdt65 8
Details of Java EE Application Servers
Vendor App Server EE 1.4
(2003-)
EE 5
(2006-)
EE 6
(2009-)
EE 7
(2013-)
Open Source GlassFish - 2.x 3.x 4.x
Oracle WebLogic 9.x 10.x 12.x - (Summer, 2015?)
IBM WebSphere 5.1 6.x, 7.x 8.x - (Summer, 2015?)
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 -
Apache Geronimo - 2.x 3.x -
Hitachi Cosminexus 7.x 8.x 9.x 10.0
TmaxSoft JEUS 5.0 6.0 7.0 8.0
Apache TomEE - - 1.x -
Few servers are
available
@HirofumiIwasaki #jdt65 9
Commercial or Free?
Is heavily
SLA required?
Is open source
NOT required?
Is some support
required?
Select Commercial Products Select Free Products
Is there few initial
cost limitation?
Is DIY not acceptable?Is long running
upgrading path required?
@HirofumiIwasaki #jdt65 10
Summary: Select Your Appropriate Server
Consider the policies for your application,
Determine the roadmap and resources,
Select the appropriate Java EE server.
@HirofumiIwasaki #jdt65
2. Use modern IDE to build with
Maven instead of text editor
To
@HirofumiIwasaki #jdt65 12
In 1990’s – early 2000’s
“Great Engineers” never
use such IDEs!
Instead, they use text editor!
*Is Japanese special habit not to use IDEs?
@HirofumiIwasaki #jdt65 13
“Great Engineer” never
use such IDEs!
Instead, use text editor!
We’re now living in 2010’s
NEVER
Apply the latest technologies!
*Is Japanese special habit not to use IDEs?
@HirofumiIwasaki #jdt65 14
Over 10,000 classes in real large systems
Crazy amount of
source codes!
@HirofumiIwasaki #jdt65 15
Manage tons of codes with modern IDE
@HirofumiIwasaki #jdt65 16
Summary: modern IDE for Java EE
@HirofumiIwasaki #jdt65 17
De-Facto standard building tool
 Determined with “pom.xml”
 Automatic library downloading
 Ease of use, script not supported
 Determined with “build.gradle”
 Automatic library downloading
 Complex scripting supported
@HirofumiIwasaki #jdt65 18
Three major IDEs support Maven in default setting
*Additional plugin required
* *
“New Project” Dialogs:
@HirofumiIwasaki #jdt65 19
“Special Project Files” are not required anymore with Maven
Maven Project are used by these three IDEs
@HirofumiIwasaki #jdt65 20
Summary: recommendation to make Java EE 7 project
Make project with ,
Enjoy programming with
(Choose anything you want)
@HirofumiIwasaki #jdt65
3. Apply JSF for front-end framework
To
@HirofumiIwasaki #jdt65 22
Rich Clients
Web Presentation Business Logic
(no presentations)
Typical usage of Java EE 7
JPA
EJBJSF
DBs
Java FX JTA
Automatic
Transaction
JMS MQ
Connection
RMI-IIOP
Other
Servers
EMail
MTAJavaMail
JAX
Call
Call
Call
Call
Call
Call
Data Access
Messaging
@HirofumiIwasaki #jdt65 23
Selection of the front-end frameworks of server side Java
 JavaServer Faces
– Genuine Java EE front-end framework
– Many additional components like “PrimeFaces”.
– View-based operation
 Apache Struts
– 2000’s older front-end framework (especially 1.x)
– Many results in any industries
– Action-based operations
@HirofumiIwasaki #jdt65 24
<<JSP>>
View1
<<JSP>>
View 2
Action1
+ action()
<<JSP>>
View 3
Action2
+ action()
ActionForm1
- fields
+ validate()
ActionForm2
- fields
+ validate()
Operate
Action
Build
Next View
Operate
Action
Build
Next View
Per Action Operation
struts-config.xml
1.x
@HirofumiIwasaki #jdt65 25
<Facelet>
View 1
Backing1
- fields
+ load()
+ action()
<Facelet>
View 2
Backing2
- fields
+ load()
+ action()
<Facelet>
View 3
Backing3
- fields
+ load()
+ action()
Front View
&
Backing Bean
Per View Operation
@HirofumiIwasaki #jdt65 26
Paradigm Shift:
Action to Page
@HirofumiIwasaki #jdt65 27
Paradigm Changing - Simple
<<JSP>>
View1
<<JSP>>
View 2
Action1
+ action()
<<JSP>>
View 3
Action2
+ action()
ActionForm1
- fields
+ validate()
ActionForm2
- fields
+ validate()
Operate
Action
Build
Next View
Operate
Action
Build
Next View
<Facelet>
View 1
Backing1
- fields
+ load()
+ action()
<Facelet>
View 2
Backing2
- fields
+ load()
+ action()
<Facelet>
View 3 Backing3
- fields
+ load()
+ action()
Front View
& Backing Bean
1.x
@HirofumiIwasaki #jdt65 28
One Action Class
Paradigm Changing - Simple
Event Operation
Next Page
Initialization
Backing Bean
Action Method
Event Operation
Backing Bean
@PostConstruct Method
Page Initialization
Sprit to Two Parts
@HirofumiIwasaki #jdt65 29
JSP vs. Facelet
JavaServer
Pages
Facelet
Compile
Java Servlet
Work
HTML
Rendering
HTML
Rendering
Real-time
Interpreting
&
Work
No Compile,
Rapid Dev.
Re-Deploy
& Compile
Harmful
Dev. Procs
Check
Fix Fix Reload
@HirofumiIwasaki #jdt65 30
HTML Friendly Tags
<input type="text”
jsf:value="#{bean.property}" />
Java EE 7 (JSF 2.2)
Java EE 6 (JSF 2.1)
Simplified
<input type="text"
jsfc="h:inputText"
name="id"
value="#{bean.property}" />
Nice Relationship
with HTML
Design Tools
@HirofumiIwasaki #jdt65 31
Use HTML Friendly Tags
HTML JSF 2.2 HTML Friendly Tags Older JSF Tags
<a> <a jsf:action=“#{cdi.prop}”>~~~</a> <h:commandLink>
<input type=“button”>
<input type=“submit”>
<input type=“button” jsf:value=“#{cdi.prop}”/>
<input type=“submit” jsf:value=“#{cdi.prop}”/>
<h:commandButton>
<input type=“file”> <input type=“file” jsf:value=“#{cdi.prop}”/> <h:inputFile>
<input type=“hidden”> <input type=“hidden” jsf:value=“#{cdi.prop}”/> <h:inputHidden>
<input type=“password”> <input type=“password” jsf:value=“#{cdi.prop}”/> <h:inputSecret>
<textarea> <textarea jsf:value=“#{cdi.prop}”/> <h:inputTextArea>
<input type=“checkbox”> <input type=“checkbox” jsf:value=“#{cdi.prop}”/> <h:selectBooleanCheckbox>
・・・
etc.
@HirofumiIwasaki #jdt65 32
Summary: Recommendation for the Java EE 7 Front-End
Use For your web front-end,
Apply HTML-Friendly Tags for mark-up.
Implement with Facelet,
@HirofumiIwasaki #jdt65
4. Apply EJB for back-end framework
To
@HirofumiIwasaki #jdt65 34
Rich Clients
Web Presentation Business Logic
(no presentations)
Typical usage of Java EE 7
JPA
EJBJSF
DBs
Java FX JTA
Automatic
Transaction
JMS MQ
Connection
RMI-IIOP
Other
Servers
EMail
MTAJavaMail
JAX
Call
Call
Call
Call
Call
Call
Data Access
Messaging
@HirofumiIwasaki #jdt65 35
Review: What’s EJB? Why EJB?
EJBClient
1. Remote Invocation
EJB
2. Automatic Transaction Management
Database
(BEGIN)
(COMMIT)
EJB
EJB
EJB
EJB
Instance
Pool
Activate
3. Instance Pooling for Faster Operation
RMI-IIOP
SOAP
REST
Web Socket
EJB
Client
4. Security Management
@HirofumiIwasaki #jdt65 36
Forget about the past EJB blames of EJB 1.x & 2.x
in 2004
11 years ago!!
@HirofumiIwasaki #jdt65 37
Embedded Container
EJB 3 and beyond – Improved dramatically
EJB
1. Introduced Annotations, POJO
@Stateless
EJB
2. Introduced Injections
@Inject
@EJB
Other
Instance
ejb-jar.xml
4. No Deployment Descriptor (optional)
EJB
EJB
5. Embedded EJB Container
for Testing & etc.
JPA
Database
3. Entity Bean  JPA
@HirofumiIwasaki #jdt65 38
POJO
Java EE ServerJava EE Server
Java Batch
How Design the Batch Logics?
Choice 1: Use EJB,
Call via EJB Remote
from Outside
EJB
Batch
Batch
Kicker Call
Choice 2: Use
Java Batch Framework,
Call from Outside
Batch
Kicker Call
Choice 3: Don’t Use
Java EE Server
[NOT RECOMMENDED]
Batch
Kicker Call
Full automatic transaction,
Able to use embedded server.
If the standard templates
suitable for your app, try it.
Full manual transaction,
management, and everything.
@HirofumiIwasaki #jdt65 39
Limitation: Don’t Use Lambda Parallel Stream inside of the EJB
Java EE 7 spec is not supported
Java SE 8 new functions.
Tested Fork/Join Framework
(basement of the parallel stream) with
WebLogic Server 12.1 (yet Java EE 6)
Not worked.
“weblogic.ejb.container.compliance.
ComplianceException”
@HirofumiIwasaki #jdt65 40
Apply EJB for your enterprise logics
Apply me!
I’ll remotely
manage
transactions
@HirofumiIwasaki #jdt65
5. Consider remote connectivity
To
@HirofumiIwasaki #jdt65 42
Review: What’s EJB? Why EJB?
EJBClient
1. Remote Invocation
EJB
2. Automatic Transaction Management
Database
(BEGIN)
(COMMIT)
EJB
EJB
EJB
EJB
Instance
Pool
Activate
3. Instance Pooling for Faster Operation
RMI-IIOP
SOAP
REST
Web Socket
EJB
Client
4. Security Management
@HirofumiIwasaki #jdt65 43
Supported protocols of Java EE 7 (EJB)
Protocol Supported
From
Annotation Client Stub Value
Marshaling
Global
Transaction
RMI-IIOP J2EE 1.2 @Remote in
remote interface
Remote interface
with auto generate
Auto XA Supported
SOAP Java EE 5 @WebService Auto generate in
development
Auto N/A
REST Java EE 6 @GET, @POST,
etc.
(Nothing special) Work with JSON
or something
(string base)
N/A
Web Socket Java EE 7 @ServerEndpoint @ClientEndpoint
with auto generate
Work with JSON
or something
(string base)
N/A
@HirofumiIwasaki #jdt65 44
Global Transaction
Management
with XA Protocol
For heavy transaction: consider RMI-IIOP
EJB
Session BeanClient RMI-IIOP
Other
System’s
EJB
Database
Other
Enterprise
Information
Systems
IIOP
AUTO
BEGIN
AUTO
COMMIT
@HirofumiIwasaki #jdt65 45
For light-weight usage: consider Web Socket + JSON
Local Transaction
Management
EJB
Session BeanClient Web Socket
Database
AUTO
BEGIN
AUTO
COMMIT
Ultra-Fast,
Ease of Dev.
@HirofumiIwasaki #jdt65 46
EJB Session Bean with RMI-IIOP and Web Socket
@Stateless
@Remote
@ServerEndpoint(value = "/memberlogic")
public class MemberLogic implements MemberLogicRemote {
@OnMessage
public String register(String message, Session session) {
// WRITE TRANSACTIONAL LOGICS HERE!
return xxxx;
}
}
EJB
RMI-IIOP
Web Socket
Some Clients
Transactional
Processing
for RMI-IIOP
for Web Socket
for RMI-IIOP
for Web Socket
@HirofumiIwasaki #jdt65 47
Why do not use SOAP or REST?
SOAP REST
 The improvements are almost stopped
in both specs and Java EE support.
 Heavy auto generating codes.
 Buggy interoperability.
 Slower marshaling and unmarshaling.
 It does not have good support
in Java EE, especially for client-side.
 No marshaling and unmarshaling
support in Java EE.
 Slower protocol than web socket.
@HirofumiIwasaki #jdt65 48
Summary: Recommendation of Protocols
Select the RMI-IIOP
for heavy transactional distributed systems.
Select the Web Socket
for system that requires light-weight and
faster speed.
@HirofumiIwasaki #jdt65
6. Apply JPA for database persistence
To
@HirofumiIwasaki #jdt65 50
Rich Clients
Web Presentation Business Logic
(no presentations)
Typical usage of Java EE 7
JPA
EJBJSF
DBs
Java FX JTA
Automatic
Transaction
JMS MQ
Connection
RMI-IIOP
Other
Servers
EMail
MTAJavaMail
JAX
Call
Call
Call
Call
Call
Call
Messaging
Data Access
@HirofumiIwasaki #jdt65 51
About JPA – Java Persistence API
Java Persistence API
(from Java EE 5)
@HirofumiIwasaki #jdt65 52
JPA – Simple Database Mapper
Relational Database
(E-R Diagram)
One by One
JPA Entity
(Class Diagram)
Auto Generate
With Bean Validation
@HirofumiIwasaki #jdt65 53
JPA – Simple Database Mapper
JPA Entity
JPA Data Access Object (DAO)
Auto CRUD
to Database
Access to RDB
@HirofumiIwasaki #jdt65 54
public List<Member> findMemberByName(String name) {
String queryString = "SELECT a FROM Member m " +
"WHERE m.name = LOWER(:name)";
Query query = getEntityManager().createQuery(queryString);
query.setParameter("name", name);
List<Member> result = query.getResultList();
}
JPA Custom Queries – JPQL and Criteria Query
JPQL:
Criteria Query:
public List<Member> findMemberByName(String name) {
CriteriaBuilder builder = this.em.getCriteriaBuilder();
CriteriaQuery query = builder.createQuery();
Root<Member> member = query.from(Member.class);
query.select(member);
query.where(builder.equal(member.get(”name"), name));
List<Member> result = this.em.createQuery(query).getResultList();
}
@HirofumiIwasaki #jdt65 55
JTA Transaction
Management
Java EE Application
EJB Business Logic
Why You Should Not Use Raw JDBC in Java EE?
Java EE Application Server
Java VM
Connection
Pool
EJB Object
Pool
Thread
Pool
Self-Managed
JDBC Connection
JPA
Entity Manager
JNDI
JDBC
Driver Manager
RAW
?
?
No Global Transaction
No Connection Management
@HirofumiIwasaki #jdt65 56
Combination with EJB Session Bean
Business Logic
(no presentations)
JPA
EJB
DBs
JTA
Automatic
Transaction
Call
Full automatic
transaction management
with EJB session bean
JPA entity manager
automatically join
the CMT of EJB
Data Access
@HirofumiIwasaki #jdt65 57
Summary: Use JPA, Instead of Raw JDBC.
Apply JPA ordinarily,
within the EJB Container
Managed Transaction (CMT)
@HirofumiIwasaki #jdt65
7. Consider EE 8 for future-prove
To
@HirofumiIwasaki #jdt65 59
Beyond of the Java EE 7
CDI 2.0
JSON-B 1.0
JMS 2.1
Servlet4.0
JAX-RS2.1
MVC 1.0
JSF 2.3
Java EE Management API 1.0
JSON-P 1.1
Java EE Security API 1.0
@HirofumiIwasaki #jdt65 60
Recommendation
Apply
Standard APIs
@HirofumiIwasaki #jdt65 61
Standardization History of Java EE
J2EE 1.2
J2EE 1.3
J2EE 1.4
Java EE 5
Java EE 6
Java EE 7
Java EE 8
JDBC
EJB/JTA/XA/IIOP
Servlet/JSP
JMS
RMI
SOAP
JPA
JSF/Facelet
REST
CDI
JavaBatch
Project JPE
or earlier
WebSocket
MVC
…
@HirofumiIwasaki #jdt65 62
Terminated Technologies of Java EE
J2EE 1.2
J2EE 1.3
J2EE 1.4
Java EE 5
Java EE 6
Java EE 7
Java EE 8
JDBC
EJB
JSP
JMS
RMI
SOAP
JPA
JSF/Facelet
REST
CDI
JavaBatch
Project JPE
or earlier
WebSocket
EJBEntityBean
JSP
MVC
…
@HirofumiIwasaki #jdt65 63
Summary
is the world
open specification De-Facto standard.
“Standard” has many
pros & cons, but it can keep
your assets and knowledge.
@HirofumiIwasaki #jdt65
standardization history:
• From vendor special functions
• From open source functions
Java EE 7 Updates:
Standardized and long term support
@HirofumiIwasaki #jdt65
Java EE has
many world-wide
people and company support.
your application will have
long-life guaranteed.
@HirofumiIwasaki #jdt65
Apply Java EE 7
today and
be
ready for EE 8.
@HirofumiIwasaki #jdt65

More Related Content

What's hot

What's hot (16)

Have You Seen Java EE Lately?
Have You Seen Java EE Lately?Have You Seen Java EE Lately?
Have You Seen Java EE Lately?
 
Testing Java EE Applications Using Arquillian
Testing Java EE Applications Using ArquillianTesting Java EE Applications Using Arquillian
Testing Java EE Applications Using Arquillian
 
Java EE 8: On the Horizon
Java EE 8:  On the HorizonJava EE 8:  On the Horizon
Java EE 8: On the Horizon
 
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
 
2015 JavaOne EJB/CDI Alignment
2015 JavaOne EJB/CDI Alignment2015 JavaOne EJB/CDI Alignment
2015 JavaOne EJB/CDI Alignment
 
Java EE 6 Adoption in One of the World’s Largest Online Financial Systems
Java EE 6 Adoption in One of the World’s Largest Online Financial SystemsJava EE 6 Adoption in One of the World’s Largest Online Financial Systems
Java EE 6 Adoption in One of the World’s Largest Online Financial Systems
 
Finally, EE Security API JSR 375
Finally, EE Security API JSR 375Finally, EE Security API JSR 375
Finally, EE Security API JSR 375
 
Best Way to Write SQL in Java
Best Way to Write SQL in JavaBest Way to Write SQL in Java
Best Way to Write SQL in Java
 
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
 
[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
 
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
 
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!
 
Burns jsf-confess-2015
Burns jsf-confess-2015Burns jsf-confess-2015
Burns jsf-confess-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]
 
Java on Azure
Java on AzureJava on Azure
Java on Azure
 
JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6
 

Viewers also liked

Introduction to CDI and DI in Java EE 6
Introduction to CDI and DI in Java EE 6Introduction to CDI and DI in Java EE 6
Introduction to CDI and DI in Java EE 6
Ray Ploski
 

Viewers also liked (15)

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
 
Java Küche 2016 LT 在室状況自動通知ボット #JavaKueche
Java Küche 2016 LT 在室状況自動通知ボット #JavaKuecheJava Küche 2016 LT 在室状況自動通知ボット #JavaKueche
Java Küche 2016 LT 在室状況自動通知ボット #JavaKueche
 
Introduction to CDI and DI in Java EE 6
Introduction to CDI and DI in Java EE 6Introduction to CDI and DI in Java EE 6
Introduction to CDI and DI in Java EE 6
 
JavaOne2015報告会 Java EE アップデート #j1jp
JavaOne2015報告会 Java EE アップデート #j1jpJavaOne2015報告会 Java EE アップデート #j1jp
JavaOne2015報告会 Java EE アップデート #j1jp
 
JavaOne 2016 - Photo Edition -
JavaOne 2016 - Photo Edition - JavaOne 2016 - Photo Edition -
JavaOne 2016 - Photo Edition -
 
JBoss.org – SwitchYardコミュニティ開発者の日常 - JJUG CCC 2014 Spring - R1-4 - #ccc_r14
JBoss.org – SwitchYardコミュニティ開発者の日常 - JJUG CCC 2014 Spring - R1-4 - #ccc_r14JBoss.org – SwitchYardコミュニティ開発者の日常 - JJUG CCC 2014 Spring - R1-4 - #ccc_r14
JBoss.org – SwitchYardコミュニティ開発者の日常 - JJUG CCC 2014 Spring - R1-4 - #ccc_r14
 
JetBrains IDEハンズオン
JetBrains IDEハンズオンJetBrains IDEハンズオン
JetBrains IDEハンズオン
 
What's New in Java SE 9
What's New in Java SE 9What's New in Java SE 9
What's New in Java SE 9
 
JPA Best Practices
JPA Best PracticesJPA Best Practices
JPA Best Practices
 
複雑さに挑む!カンバンによるプロジェクト マネジメント
複雑さに挑む!カンバンによるプロジェクト マネジメント複雑さに挑む!カンバンによるプロジェクト マネジメント
複雑さに挑む!カンバンによるプロジェクト マネジメント
 
プレゼン基礎講座 2016.11
プレゼン基礎講座 2016.11プレゼン基礎講座 2016.11
プレゼン基礎講座 2016.11
 
CDI2.0アップデート&クックブック #JavaDayTokyo #jdt2016_4c
CDI2.0アップデート&クックブック #JavaDayTokyo #jdt2016_4cCDI2.0アップデート&クックブック #JavaDayTokyo #jdt2016_4c
CDI2.0アップデート&クックブック #JavaDayTokyo #jdt2016_4c
 
Construindo aplicações com HTML5, WebSockets, e Java EE 7
Construindo aplicações com HTML5, WebSockets, e Java EE 7Construindo aplicações com HTML5, WebSockets, e Java EE 7
Construindo aplicações com HTML5, WebSockets, e Java EE 7
 
Java garbage collection & GC friendly coding
Java garbage collection  & GC friendly codingJava garbage collection  & GC friendly coding
Java garbage collection & GC friendly coding
 
Евгений Капинос "Advanced JPA (Java Persistent API)"
Евгений Капинос "Advanced JPA (Java Persistent API)"Евгений Капинос "Advanced JPA (Java Persistent API)"
Евгений Капинос "Advanced JPA (Java Persistent API)"
 

Similar to Seven Points for Applying Java EE 7

Newfeaturesincontext 130911052709-phpapp01
Newfeaturesincontext 130911052709-phpapp01Newfeaturesincontext 130911052709-phpapp01
Newfeaturesincontext 130911052709-phpapp01
Frank Rodriguez
 

Similar to Seven Points for Applying Java EE 7 (20)

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...
 
Huge Enterprise Systems Architecture Design with Java EE
Huge Enterprise Systems Architecture Design with Java EEHuge Enterprise Systems Architecture Design with Java EE
Huge Enterprise Systems Architecture Design with Java EE
 
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...
 
[Rakuten TechConf2014] [Fukuoka] Case Study of Financial Web Systems Developm...
[Rakuten TechConf2014] [Fukuoka] Case Study of Financial Web Systems Developm...[Rakuten TechConf2014] [Fukuoka] Case Study of Financial Web Systems Developm...
[Rakuten TechConf2014] [Fukuoka] Case Study of Financial Web Systems Developm...
 
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 (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...
 
Resume & CV
Resume & CVResume & CV
Resume & CV
 
Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Future of Java EE with Java SE 8
Future of Java EE with Java SE 8
 
MicroProfile and Jakarta EE - What's Next?
MicroProfile and Jakarta EE - What's Next?MicroProfile and Jakarta EE - What's Next?
MicroProfile and Jakarta EE - What's Next?
 
2008_478_Lyons_ppt.ppt
2008_478_Lyons_ppt.ppt2008_478_Lyons_ppt.ppt
2008_478_Lyons_ppt.ppt
 
Project report for final year project
Project report for final year projectProject report for final year project
Project report for final year project
 
Developing Web Application Using J2EE - Nex
Developing Web Application Using J2EE - NexDeveloping Web Application Using J2EE - Nex
Developing Web Application Using J2EE - Nex
 
AJ.pptx
AJ.pptxAJ.pptx
AJ.pptx
 
What's New in IBM Java 8 SE?
What's New in IBM Java 8 SE?What's New in IBM Java 8 SE?
What's New in IBM Java 8 SE?
 
009586150.pdf
009586150.pdf009586150.pdf
009586150.pdf
 
JSF 2.2
JSF 2.2JSF 2.2
JSF 2.2
 
Newfeaturesincontext 130911052709-phpapp01
Newfeaturesincontext 130911052709-phpapp01Newfeaturesincontext 130911052709-phpapp01
Newfeaturesincontext 130911052709-phpapp01
 
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
 
J2EE Introduction
J2EE IntroductionJ2EE Introduction
J2EE Introduction
 
Developing Enterprise Applications Using Java Technology
Developing Enterprise Applications Using Java TechnologyDeveloping Enterprise Applications Using Java Technology
Developing Enterprise Applications Using Java Technology
 

More from Hirofumi Iwasaki

More from Hirofumi Iwasaki (9)

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...
 
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
 

Recently uploaded

Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 
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
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 

Recently uploaded (20)

WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
 
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
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 

Seven Points for Applying Java EE 7

  • 1. @HirofumiIwasaki #jdt65 Seven Points for Applying Java EE 7 Apr 8, 2015 Hirofumi Iwasaki Financial Service Department, DU, Rakuten, Inc.
  • 2. @HirofumiIwasaki #jdt65 2 Speaker Biography  Hirofumi Iwasaki – Group Manager, Technology Manager – Financial Service Department, Development Unit, Rakuten, Inc.  Carrier – 16 Years of experience in planning, designing and implementation of Japanese financial, manufacturing and public enterprise system with emphasis in Java EE and .NET enterprise middleware.  Opus, Lectures, etc. – Conferences: JavaOne 2014, Oracle OpenWorld 2014, Java Day Tokyo 2014, JJUG CCC Spring & Fall (2014), WebLogic roundtable (2012-2013), Rakuten Tech Conference (2014, 2013) etc. – Magazine: @IT (2005-2010), CIO Magazine (2009), IT Architect (2005-2009), Web+DB Press (2005), Java World (2001-2004), etc.
  • 3. @HirofumiIwasaki #jdt65 3 JCP with Rakuten Rakuten Joined JCP as a member of “user company”.
  • 5. @HirofumiIwasaki #jdt65 5 1. Select the Java EE 7 based application server 2. Use modern IDE to build with Maven instead of text editor 3. Apply JSF for front-end framework 4. Apply EJB for back-end framework 5. Consider remote connectivity 6. Apply JPA for database persistence 7. Consider EE 8 for future-prove Agenda
  • 6. @HirofumiIwasaki #jdt65 1. Select the Java EE 7 based application server To
  • 7. @HirofumiIwasaki #jdt65 7 GlassFish & Compatible Group WebLogic World Geronimo & Compatible Group JBoss World Japan Group App Engine Copy Java EE World and Others Korea Group Apache Group Google
  • 8. @HirofumiIwasaki #jdt65 8 Details of Java EE Application Servers Vendor App Server EE 1.4 (2003-) EE 5 (2006-) EE 6 (2009-) EE 7 (2013-) Open Source GlassFish - 2.x 3.x 4.x Oracle WebLogic 9.x 10.x 12.x - (Summer, 2015?) IBM WebSphere 5.1 6.x, 7.x 8.x - (Summer, 2015?) 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 - Apache Geronimo - 2.x 3.x - Hitachi Cosminexus 7.x 8.x 9.x 10.0 TmaxSoft JEUS 5.0 6.0 7.0 8.0 Apache TomEE - - 1.x - Few servers are available
  • 9. @HirofumiIwasaki #jdt65 9 Commercial or Free? Is heavily SLA required? Is open source NOT required? Is some support required? Select Commercial Products Select Free Products Is there few initial cost limitation? Is DIY not acceptable?Is long running upgrading path required?
  • 10. @HirofumiIwasaki #jdt65 10 Summary: Select Your Appropriate Server Consider the policies for your application, Determine the roadmap and resources, Select the appropriate Java EE server.
  • 11. @HirofumiIwasaki #jdt65 2. Use modern IDE to build with Maven instead of text editor To
  • 12. @HirofumiIwasaki #jdt65 12 In 1990’s – early 2000’s “Great Engineers” never use such IDEs! Instead, they use text editor! *Is Japanese special habit not to use IDEs?
  • 13. @HirofumiIwasaki #jdt65 13 “Great Engineer” never use such IDEs! Instead, use text editor! We’re now living in 2010’s NEVER Apply the latest technologies! *Is Japanese special habit not to use IDEs?
  • 14. @HirofumiIwasaki #jdt65 14 Over 10,000 classes in real large systems Crazy amount of source codes!
  • 15. @HirofumiIwasaki #jdt65 15 Manage tons of codes with modern IDE
  • 16. @HirofumiIwasaki #jdt65 16 Summary: modern IDE for Java EE
  • 17. @HirofumiIwasaki #jdt65 17 De-Facto standard building tool  Determined with “pom.xml”  Automatic library downloading  Ease of use, script not supported  Determined with “build.gradle”  Automatic library downloading  Complex scripting supported
  • 18. @HirofumiIwasaki #jdt65 18 Three major IDEs support Maven in default setting *Additional plugin required * * “New Project” Dialogs:
  • 19. @HirofumiIwasaki #jdt65 19 “Special Project Files” are not required anymore with Maven Maven Project are used by these three IDEs
  • 20. @HirofumiIwasaki #jdt65 20 Summary: recommendation to make Java EE 7 project Make project with , Enjoy programming with (Choose anything you want)
  • 21. @HirofumiIwasaki #jdt65 3. Apply JSF for front-end framework To
  • 22. @HirofumiIwasaki #jdt65 22 Rich Clients Web Presentation Business Logic (no presentations) Typical usage of Java EE 7 JPA EJBJSF DBs Java FX JTA Automatic Transaction JMS MQ Connection RMI-IIOP Other Servers EMail MTAJavaMail JAX Call Call Call Call Call Call Data Access Messaging
  • 23. @HirofumiIwasaki #jdt65 23 Selection of the front-end frameworks of server side Java  JavaServer Faces – Genuine Java EE front-end framework – Many additional components like “PrimeFaces”. – View-based operation  Apache Struts – 2000’s older front-end framework (especially 1.x) – Many results in any industries – Action-based operations
  • 24. @HirofumiIwasaki #jdt65 24 <<JSP>> View1 <<JSP>> View 2 Action1 + action() <<JSP>> View 3 Action2 + action() ActionForm1 - fields + validate() ActionForm2 - fields + validate() Operate Action Build Next View Operate Action Build Next View Per Action Operation struts-config.xml 1.x
  • 25. @HirofumiIwasaki #jdt65 25 <Facelet> View 1 Backing1 - fields + load() + action() <Facelet> View 2 Backing2 - fields + load() + action() <Facelet> View 3 Backing3 - fields + load() + action() Front View & Backing Bean Per View Operation
  • 26. @HirofumiIwasaki #jdt65 26 Paradigm Shift: Action to Page
  • 27. @HirofumiIwasaki #jdt65 27 Paradigm Changing - Simple <<JSP>> View1 <<JSP>> View 2 Action1 + action() <<JSP>> View 3 Action2 + action() ActionForm1 - fields + validate() ActionForm2 - fields + validate() Operate Action Build Next View Operate Action Build Next View <Facelet> View 1 Backing1 - fields + load() + action() <Facelet> View 2 Backing2 - fields + load() + action() <Facelet> View 3 Backing3 - fields + load() + action() Front View & Backing Bean 1.x
  • 28. @HirofumiIwasaki #jdt65 28 One Action Class Paradigm Changing - Simple Event Operation Next Page Initialization Backing Bean Action Method Event Operation Backing Bean @PostConstruct Method Page Initialization Sprit to Two Parts
  • 29. @HirofumiIwasaki #jdt65 29 JSP vs. Facelet JavaServer Pages Facelet Compile Java Servlet Work HTML Rendering HTML Rendering Real-time Interpreting & Work No Compile, Rapid Dev. Re-Deploy & Compile Harmful Dev. Procs Check Fix Fix Reload
  • 30. @HirofumiIwasaki #jdt65 30 HTML Friendly Tags <input type="text” jsf:value="#{bean.property}" /> Java EE 7 (JSF 2.2) Java EE 6 (JSF 2.1) Simplified <input type="text" jsfc="h:inputText" name="id" value="#{bean.property}" /> Nice Relationship with HTML Design Tools
  • 31. @HirofumiIwasaki #jdt65 31 Use HTML Friendly Tags HTML JSF 2.2 HTML Friendly Tags Older JSF Tags <a> <a jsf:action=“#{cdi.prop}”>~~~</a> <h:commandLink> <input type=“button”> <input type=“submit”> <input type=“button” jsf:value=“#{cdi.prop}”/> <input type=“submit” jsf:value=“#{cdi.prop}”/> <h:commandButton> <input type=“file”> <input type=“file” jsf:value=“#{cdi.prop}”/> <h:inputFile> <input type=“hidden”> <input type=“hidden” jsf:value=“#{cdi.prop}”/> <h:inputHidden> <input type=“password”> <input type=“password” jsf:value=“#{cdi.prop}”/> <h:inputSecret> <textarea> <textarea jsf:value=“#{cdi.prop}”/> <h:inputTextArea> <input type=“checkbox”> <input type=“checkbox” jsf:value=“#{cdi.prop}”/> <h:selectBooleanCheckbox> ・・・ etc.
  • 32. @HirofumiIwasaki #jdt65 32 Summary: Recommendation for the Java EE 7 Front-End Use For your web front-end, Apply HTML-Friendly Tags for mark-up. Implement with Facelet,
  • 33. @HirofumiIwasaki #jdt65 4. Apply EJB for back-end framework To
  • 34. @HirofumiIwasaki #jdt65 34 Rich Clients Web Presentation Business Logic (no presentations) Typical usage of Java EE 7 JPA EJBJSF DBs Java FX JTA Automatic Transaction JMS MQ Connection RMI-IIOP Other Servers EMail MTAJavaMail JAX Call Call Call Call Call Call Data Access Messaging
  • 35. @HirofumiIwasaki #jdt65 35 Review: What’s EJB? Why EJB? EJBClient 1. Remote Invocation EJB 2. Automatic Transaction Management Database (BEGIN) (COMMIT) EJB EJB EJB EJB Instance Pool Activate 3. Instance Pooling for Faster Operation RMI-IIOP SOAP REST Web Socket EJB Client 4. Security Management
  • 36. @HirofumiIwasaki #jdt65 36 Forget about the past EJB blames of EJB 1.x & 2.x in 2004 11 years ago!!
  • 37. @HirofumiIwasaki #jdt65 37 Embedded Container EJB 3 and beyond – Improved dramatically EJB 1. Introduced Annotations, POJO @Stateless EJB 2. Introduced Injections @Inject @EJB Other Instance ejb-jar.xml 4. No Deployment Descriptor (optional) EJB EJB 5. Embedded EJB Container for Testing & etc. JPA Database 3. Entity Bean  JPA
  • 38. @HirofumiIwasaki #jdt65 38 POJO Java EE ServerJava EE Server Java Batch How Design the Batch Logics? Choice 1: Use EJB, Call via EJB Remote from Outside EJB Batch Batch Kicker Call Choice 2: Use Java Batch Framework, Call from Outside Batch Kicker Call Choice 3: Don’t Use Java EE Server [NOT RECOMMENDED] Batch Kicker Call Full automatic transaction, Able to use embedded server. If the standard templates suitable for your app, try it. Full manual transaction, management, and everything.
  • 39. @HirofumiIwasaki #jdt65 39 Limitation: Don’t Use Lambda Parallel Stream inside of the EJB Java EE 7 spec is not supported Java SE 8 new functions. Tested Fork/Join Framework (basement of the parallel stream) with WebLogic Server 12.1 (yet Java EE 6) Not worked. “weblogic.ejb.container.compliance. ComplianceException”
  • 40. @HirofumiIwasaki #jdt65 40 Apply EJB for your enterprise logics Apply me! I’ll remotely manage transactions
  • 41. @HirofumiIwasaki #jdt65 5. Consider remote connectivity To
  • 42. @HirofumiIwasaki #jdt65 42 Review: What’s EJB? Why EJB? EJBClient 1. Remote Invocation EJB 2. Automatic Transaction Management Database (BEGIN) (COMMIT) EJB EJB EJB EJB Instance Pool Activate 3. Instance Pooling for Faster Operation RMI-IIOP SOAP REST Web Socket EJB Client 4. Security Management
  • 43. @HirofumiIwasaki #jdt65 43 Supported protocols of Java EE 7 (EJB) Protocol Supported From Annotation Client Stub Value Marshaling Global Transaction RMI-IIOP J2EE 1.2 @Remote in remote interface Remote interface with auto generate Auto XA Supported SOAP Java EE 5 @WebService Auto generate in development Auto N/A REST Java EE 6 @GET, @POST, etc. (Nothing special) Work with JSON or something (string base) N/A Web Socket Java EE 7 @ServerEndpoint @ClientEndpoint with auto generate Work with JSON or something (string base) N/A
  • 44. @HirofumiIwasaki #jdt65 44 Global Transaction Management with XA Protocol For heavy transaction: consider RMI-IIOP EJB Session BeanClient RMI-IIOP Other System’s EJB Database Other Enterprise Information Systems IIOP AUTO BEGIN AUTO COMMIT
  • 45. @HirofumiIwasaki #jdt65 45 For light-weight usage: consider Web Socket + JSON Local Transaction Management EJB Session BeanClient Web Socket Database AUTO BEGIN AUTO COMMIT Ultra-Fast, Ease of Dev.
  • 46. @HirofumiIwasaki #jdt65 46 EJB Session Bean with RMI-IIOP and Web Socket @Stateless @Remote @ServerEndpoint(value = "/memberlogic") public class MemberLogic implements MemberLogicRemote { @OnMessage public String register(String message, Session session) { // WRITE TRANSACTIONAL LOGICS HERE! return xxxx; } } EJB RMI-IIOP Web Socket Some Clients Transactional Processing for RMI-IIOP for Web Socket for RMI-IIOP for Web Socket
  • 47. @HirofumiIwasaki #jdt65 47 Why do not use SOAP or REST? SOAP REST  The improvements are almost stopped in both specs and Java EE support.  Heavy auto generating codes.  Buggy interoperability.  Slower marshaling and unmarshaling.  It does not have good support in Java EE, especially for client-side.  No marshaling and unmarshaling support in Java EE.  Slower protocol than web socket.
  • 48. @HirofumiIwasaki #jdt65 48 Summary: Recommendation of Protocols Select the RMI-IIOP for heavy transactional distributed systems. Select the Web Socket for system that requires light-weight and faster speed.
  • 49. @HirofumiIwasaki #jdt65 6. Apply JPA for database persistence To
  • 50. @HirofumiIwasaki #jdt65 50 Rich Clients Web Presentation Business Logic (no presentations) Typical usage of Java EE 7 JPA EJBJSF DBs Java FX JTA Automatic Transaction JMS MQ Connection RMI-IIOP Other Servers EMail MTAJavaMail JAX Call Call Call Call Call Call Messaging Data Access
  • 51. @HirofumiIwasaki #jdt65 51 About JPA – Java Persistence API Java Persistence API (from Java EE 5)
  • 52. @HirofumiIwasaki #jdt65 52 JPA – Simple Database Mapper Relational Database (E-R Diagram) One by One JPA Entity (Class Diagram) Auto Generate With Bean Validation
  • 53. @HirofumiIwasaki #jdt65 53 JPA – Simple Database Mapper JPA Entity JPA Data Access Object (DAO) Auto CRUD to Database Access to RDB
  • 54. @HirofumiIwasaki #jdt65 54 public List<Member> findMemberByName(String name) { String queryString = "SELECT a FROM Member m " + "WHERE m.name = LOWER(:name)"; Query query = getEntityManager().createQuery(queryString); query.setParameter("name", name); List<Member> result = query.getResultList(); } JPA Custom Queries – JPQL and Criteria Query JPQL: Criteria Query: public List<Member> findMemberByName(String name) { CriteriaBuilder builder = this.em.getCriteriaBuilder(); CriteriaQuery query = builder.createQuery(); Root<Member> member = query.from(Member.class); query.select(member); query.where(builder.equal(member.get(”name"), name)); List<Member> result = this.em.createQuery(query).getResultList(); }
  • 55. @HirofumiIwasaki #jdt65 55 JTA Transaction Management Java EE Application EJB Business Logic Why You Should Not Use Raw JDBC in Java EE? Java EE Application Server Java VM Connection Pool EJB Object Pool Thread Pool Self-Managed JDBC Connection JPA Entity Manager JNDI JDBC Driver Manager RAW ? ? No Global Transaction No Connection Management
  • 56. @HirofumiIwasaki #jdt65 56 Combination with EJB Session Bean Business Logic (no presentations) JPA EJB DBs JTA Automatic Transaction Call Full automatic transaction management with EJB session bean JPA entity manager automatically join the CMT of EJB Data Access
  • 57. @HirofumiIwasaki #jdt65 57 Summary: Use JPA, Instead of Raw JDBC. Apply JPA ordinarily, within the EJB Container Managed Transaction (CMT)
  • 58. @HirofumiIwasaki #jdt65 7. Consider EE 8 for future-prove To
  • 59. @HirofumiIwasaki #jdt65 59 Beyond of the Java EE 7 CDI 2.0 JSON-B 1.0 JMS 2.1 Servlet4.0 JAX-RS2.1 MVC 1.0 JSF 2.3 Java EE Management API 1.0 JSON-P 1.1 Java EE Security API 1.0
  • 61. @HirofumiIwasaki #jdt65 61 Standardization History of Java EE J2EE 1.2 J2EE 1.3 J2EE 1.4 Java EE 5 Java EE 6 Java EE 7 Java EE 8 JDBC EJB/JTA/XA/IIOP Servlet/JSP JMS RMI SOAP JPA JSF/Facelet REST CDI JavaBatch Project JPE or earlier WebSocket MVC …
  • 62. @HirofumiIwasaki #jdt65 62 Terminated Technologies of Java EE J2EE 1.2 J2EE 1.3 J2EE 1.4 Java EE 5 Java EE 6 Java EE 7 Java EE 8 JDBC EJB JSP JMS RMI SOAP JPA JSF/Facelet REST CDI JavaBatch Project JPE or earlier WebSocket EJBEntityBean JSP MVC …
  • 63. @HirofumiIwasaki #jdt65 63 Summary is the world open specification De-Facto standard. “Standard” has many pros & cons, but it can keep your assets and knowledge.
  • 64. @HirofumiIwasaki #jdt65 standardization history: • From vendor special functions • From open source functions Java EE 7 Updates: Standardized and long term support
  • 65. @HirofumiIwasaki #jdt65 Java EE has many world-wide people and company support. your application will have long-life guaranteed.
  • 66. @HirofumiIwasaki #jdt65 Apply Java EE 7 today and be ready for EE 8.

Editor's Notes

  1. This is Hirofumi Iwasaki speaking. I'm a financial system group manager of Rakuten. And a professional of enterprise financial system management, planning and development.
  2. Then let's see the typical usage of Java EE 6 specs. Almost all enterprise systems requires data source, and each source type requires suitable framework, JPA, JMS, RMI-IIOP and JAX, and Java Mail. And these data connectivity framework operated transactionaly by EJB. Finally front-end frameworks like JSF & JavaFX call EJB. These are the basic Java EE structure.
  3. Then let's see the typical usage of Java EE 6 specs. Almost all enterprise systems requires data source, and each source type requires suitable framework, JPA, JMS, RMI-IIOP and JAX, and Java Mail. And these data connectivity framework operated transactionaly by EJB. Finally front-end frameworks like JSF & JavaFX call EJB. These are the basic Java EE structure.
  4. Then let's see the typical usage of Java EE 6 specs. Almost all enterprise systems requires data source, and each source type requires suitable framework, JPA, JMS, RMI-IIOP and JAX, and Java Mail. And these data connectivity framework operated transactionaly by EJB. Finally front-end frameworks like JSF & JavaFX call EJB. These are the basic Java EE structure.