Huge Enterprise Systems Architecture Design with Java EE
-
Upload
rakuten-inc -
Category
Technology
-
view
82 -
download
0
Transcript of Huge Enterprise Systems Architecture Design with Java EE
![Page 1: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/1.jpg)
@HirofumiIwasaki 1
Huge Enterprise Systems Architecture Design
with Java EE
Oct 22, 2016
Hirofumi Iwasaki
Group Manager, Rakuten Card Co., Ltd.
![Page 2: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/2.jpg)
@HirofumiIwasaki 2
Speaker Biography
Hirofumi Iwasaki
– Group Manager
– New System Technology Group, New System Development Department, Rakuten Card Co., Ltd. (seconded from Rakuten, Inc.)
Carrier
– 17 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 2015, 2014, Oracle OpenWorld 2014, Java Day Tokyo 2016 - 2014, JJUG CCC Spring & Fall (2014), WebLogic roundtable (2012-2013), Rakuten Tech Conference 2016 – 2013, etc.
– Book: デベロッパーのキャリアと働き方を語ろうVol.1 (2016)
– Magazine: 日経コンピュータ 2015年8月号@IT (2005-2010), CIO Magazine (2009), IT Architect (2005-2009), Web+DB Press (2005), Java World (2001-2004), etc.
![Page 3: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/3.jpg)
@HirofumiIwasaki 3
Agenda
1. Enterprise Systems and its Features
2. Java EE Specifications for Enterprise Systems
3. Java EE Applying Points for Real Enterprise Systems
a) Start Application Design with Java EE
b) Specify IDE for Modern Development Style
c) Web Front-End with JSF
d) Business Logic with EJB or CDI
e) Data Access with JPA
f) Connectivity with RMI-IIOP, REST and WebSocket
![Page 4: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/4.jpg)
@HirofumiIwasaki 4
About the Enterprise Systems
Enterprise systems (ES) are large-scale application software
packages that support business processes, information flows,
reporting, and data analytics in complex organizations.
-(from Wikipedia "Enterprise Systems")
![Page 5: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/5.jpg)
@HirofumiIwasaki 5
Enterprise Software on Enterprise Systems
Enterprise software, also known as enterprise application
software (EAS), is computer software used to satisfy the needs
of an organization rather than individual users. Such
organizations would include businesses, schools, interest-based
user groups, clubs, charities, or governments.[1] Enterprise
software is an integral part of a (computer-based) information
system.
Enterprise
Systems
Enterprise
Software
![Page 6: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/6.jpg)
@HirofumiIwasaki 6
Non-Functional Requirements of Enterprise Software
Enterprise Software
ACID Transaction Management
Distributed
Transaction
Management
Efficient Database
& MQ Connectivity
Variety of
Communication
Protocols
Frameworks of
Web Systems and
Mobile Apps
Efficient
Development
EnvironmentSecurity
Management, etc.
![Page 7: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/7.jpg)
@HirofumiIwasaki 7
Custom? or Packaged? on Enterprise Systems
Packaging Software
Approach
Custom Software
Approach
For strong area of the
enterprise.
Specialties of the
competitiveness,
depends on each
industries.
For non strong area of
the enterprise.
E.g. HR, accounting,
information sharing
systems, etc.
![Page 8: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/8.jpg)
@HirofumiIwasaki 8
Custom? or Packaged? on Enterprise Systems
Packaging Software
Approach
Custom Software
Approach
For strong area of the
enterprise.
Specialties of the
competitiveness,
depends on each
industries.
For non strong area of
the enterprise.
E.g. HR, accounting,
information sharing
systems, etc.
![Page 9: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/9.jpg)
@HirofumiIwasaki 9
For Start Making Custom Enterprise Software
Maturity for Huge Mission Critical Systems
Open S
tandard
, C
om
munity P
ow
er
Microsoft .NET
Framework
Java EE
Open Source Platform
like PHP, etc.
Vendor Locked-In
Platform, like ABAP,
etc.
![Page 10: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/10.jpg)
@HirofumiIwasaki 10
For Start Making Custom Enterprise Software
Maturity for Huge Mission Critical Systems
Open S
tandard
, C
om
munity P
ow
er
Microsoft .NET
Framework
Java EE
Open Source Platform
like PHP, etc.
Vendor Locked-In
Platform, like ABAP,
etc.
![Page 11: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/11.jpg)
@HirofumiIwasaki 11
Summary: Select Java EE for Enterprise Apps
is even better platform for
Huge, mission critical systems.
Vendor free.
Larger community power.
Amount of engineers.
![Page 12: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/12.jpg)
@HirofumiIwasaki 12
Agenda
1. Enterprise Systems and its Features
2. Java EE Specifications for Enterprise Systems
3. Java EE Applying Points for Real Enterprise Systems
a) Start Application Design with Java EE
b) Specify IDE for Modern Development Style
c) Web Front-End with JSF
d) Business Logic with EJB or CDI
e) Data Access with JPA
f) Connectivity with RMI-IIOP, REST and WebSocket
![Page 13: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/13.jpg)
@HirofumiIwasaki 13
Java EE Overview
Java EE = Java Platform, Enterprise Edition
Java specification for enterprise systems, not light weight
systems.
– For other matured mission critical systems.
– Especially for financial industry systems.
![Page 14: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/14.jpg)
@HirofumiIwasaki 14
Java EE Spec & App Servers
Java EE specification is managed by
Java community process (JCP).
Many vendors are making
Java EE app server
not only for commercial usage
but also for free. Specification
Java EE
App Servers
![Page 15: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/15.jpg)
@HirofumiIwasaki 15
History of Java EE Specification
1999 2001 2003 2006 2009 2013 2017
J2EE 1.2 (Dec, 1999)
J2EE 1.3 (Sep, 2001)
J2EE 1.4 (Nov, 2003)
Java EE 5 (May, 2006)
Java EE 6 (May, 2006)
Project
JPE
Java EE 7
(June, 2013)
![Page 16: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/16.jpg)
@HirofumiIwasaki 16
1999 2001 2003 2006 2009 2013
Java EE 7 Svrs
J2EE 1.2 Servers
Pre-J2EE
J2EE 1.3 Servers
J2EE 1.4 Servers
Java EE 5 Servers
Java EE 6 Servers
2017
History of Java EE Spec Servers
![Page 17: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/17.jpg)
@HirofumiIwasaki 17
Combination of Java EE and Java SE
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)
J2SE1.3
(2000)
J2SE1.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
Sun
Microsystems Oracle
![Page 18: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/18.jpg)
@HirofumiIwasaki 18
Enterprise Systems
Web Front End Business Logic Back End
![Page 19: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/19.jpg)
@HirofumiIwasaki 19
Enterprise Systems and Java EE Specifications
JSF
Servlet
Web Front End Business Logic
JTA
CDI
EJB
Back End
JDBCRMI-
IIOP
JAX-
RSJPA
JMS
JAX-
WSWeb
Socket
JBatchJava
![Page 20: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/20.jpg)
@HirofumiIwasaki 20
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
JD
BC
EJB
/JT
A/X
A/IIO
P
Serv
let/J
SP
JM
S
RM
I
SO
AP JP
A
JS
F/F
acele
t
RE
ST
CD
I
Java B
atc
h
Project JPE
or earlier
Web S
ocket
…
…
WebLogic
Hibernate
Spring Framework
![Page 21: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/21.jpg)
@HirofumiIwasaki 21
New Specs of Java EE
J2EE 1.2
J2EE 1.3
J2EE 1.4
Java EE 5
Java EE 6
Java EE 7
Java EE 8
JD
BC
EJB
JS
P JM
S
RM
I
SO
AP JP
A
JS
F/F
acele
t
RE
ST
CD
I
Java B
atc
h
Project JPE
or earlier
Web S
ocket
EJB
Entity
Bean
JS
P
…
…
![Page 22: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/22.jpg)
@HirofumiIwasaki 22
2017: Java EE 8 – Now RevisingO
rigin
al P
lan:
Fin
al R
ele
ase:
H1 2
017
Revis
ed
Pla
n:
Fin
al R
ele
ase:
Q3 2
017
Early
Draft
Public
Review
Propos
ed Final
Draft
Final
Release
2016 2017
Q3, 2017
1H, 2017, canceled
Public
Survey
Propos
ed Final
Draft
Final
Release
![Page 23: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/23.jpg)
@HirofumiIwasaki 23
Agenda
1. Enterprise Systems and its Features
2. Java EE Specifications for Enterprise Systems
3. Java EE Applying Points for Real Enterprise Systems
a) Start Application Design with Java EE
b) Specify IDE for Modern Development Style
c) Web Front-End with JSF
d) Business Logic with EJB or CDI
e) Data Access with JPA
f) Connectivity with RMI-IIOP, REST and WebSocket
![Page 24: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/24.jpg)
@HirofumiIwasaki 24
Application Design with Java EE: Keywords
App Server and
Version
Vendor
Selection
Java EE
Version
Commercial or
Free
Product
Roadmap
![Page 25: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/25.jpg)
@HirofumiIwasaki 25
Rich Clients
Web Presentation Business Logic
(no presentations)
Typical Enterprise Systems
DBs
MQ
ConnectionOther
Servers
EMailMTA
Call
Call
Call
Call
Call
Call
Data Access
Messaging
![Page 26: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/26.jpg)
@HirofumiIwasaki 26
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-IIOPOther
Servers
EMailMTAJavaMail
JAX
Call
Call
Call
Call
Call
Call
Data Access
Messaging
CDI
![Page 27: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/27.jpg)
@HirofumiIwasaki 27
Use Latest Product, Latest Spec
I'll start my new project with
Java EE.
Which version should use?
Use latest product version,
with latest Java EE specification.
Because latest version is free of EOL,
greater APIs for ease of development.
![Page 28: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/28.jpg)
@HirofumiIwasaki 28
GlassFish
& Payara
WebLogic
WebSphere
JBoss
Japan
Group
App
Engine
Copy
Java EE World and Others
Apache
Group
Interstage
Cosminexus
Microsoft
.NET
![Page 29: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/29.jpg)
@HirofumiIwasaki 29
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 / Payara - 2.x 3.x 4.x
Oracle WebLogic 9.x 10.x 12.1 12.2
IBM WebSphere 5.1-6.x 7.0 8.5 8.5.5
Red Hat JBoss 4.x 5.1 6.0 7.0
Red Hat WildFly - - - 8.0-10.0
Hitachi Cosminexus 7.x 8.x 9.x 10.0
TmaxSoft JEUS 5.0 6.0 7.0 8.0
Fujitsu Interstage 9.0,9.1 9.2-11.0 11.1 -
Apache Geronimo - 2.x 3.x -
Apache TomEE - - 1.x -
![Page 30: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/30.jpg)
@HirofumiIwasaki 30
Commercial or Free?
Is heavily
SLA required?
Is open source
required?
Some supports
required?
Select Commercial Products Select Free Products
Is there few initial
cost limitation?Is DIY acceptable?Is long running
upgrading path required?
WebLogic WebSphere JBoss
Cosminexus/Payara
![Page 31: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/31.jpg)
@HirofumiIwasaki 31
Summary: Select Your Appropriate Server
Select the appropriate Java EE server.
Vendor
Applied Java EE version
Free or Commercial
Commercial support required or not
![Page 32: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/32.jpg)
@HirofumiIwasaki 32
Agenda
1. Enterprise Systems and its Features
2. Java EE Specifications for Enterprise Systems
3. Java EE Applying Points for Real Enterprise Systems
a) Start Application Design with Java EE
b) Specify IDE for Modern Development Style
c) Web Front-End with JSF
d) Business Logic with EJB or CDI
e) Data Access with JPA
f) Connectivity with RMI-IIOP, REST and WebSocket
![Page 33: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/33.jpg)
@HirofumiIwasaki 33
IDE: Keywords
IDE or Not
Repository
Building System
Productivity
Development
Standard
![Page 34: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/34.jpg)
@HirofumiIwasaki 34
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?
![Page 35: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/35.jpg)
@HirofumiIwasaki 35
“Great Engineer” never
use such IDEs!
Instead, use text editor!
We’re now living in 2010’s
NEVER
Not good for productivity on
enterprise development.
Apply the latest technologies!
*Is Japanese special habit not to use IDEs?
![Page 36: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/36.jpg)
@HirofumiIwasaki 36
Over 10,000 classes in real large systems
Crazy amount of
source codes!
![Page 37: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/37.jpg)
@HirofumiIwasaki 37
Manage tons of codes with modern IDE
![Page 38: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/38.jpg)
@HirofumiIwasaki 38
Summary: modern IDE for Java EE
![Page 39: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/39.jpg)
@HirofumiIwasaki 39
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
![Page 40: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/40.jpg)
@HirofumiIwasaki 40
Three major IDEs support Maven in default setting
*Additional plugin required
* *“New Project” Dialogs:
![Page 41: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/41.jpg)
@HirofumiIwasaki 41
“Special Project Files” are not required anymore with Maven
Maven Project are used by these three IDEs
![Page 42: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/42.jpg)
@HirofumiIwasaki 42
Summary: recommendation to make Java EE project
Make project with ,
Enjoy programming with
(Choose anything you want)
![Page 43: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/43.jpg)
@HirofumiIwasaki 43
Agenda
1. Enterprise Systems and its Features
2. Java EE Specifications for Enterprise Systems
3. Java EE Applying Points for Real Enterprise Systems
a) Start Application Design with Java EE
b) Specify IDE for Modern Development Style
c) Web Front-End with JSF
d) Business Logic with EJB or CDI
e) Data Access with JPA
f) Connectivity with RMI-IIOP, REST and WebSocket
![Page 44: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/44.jpg)
@HirofumiIwasaki 44
Web Front-End: Keywords
Security
JavaServer
Faces (JSF)
Page Flow
HTTP
Facelet
Post Back
![Page 45: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/45.jpg)
@HirofumiIwasaki 45
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-IIOPOther
Servers
EMailMTAJavaMail
JAX
Call
Call
Call
Call
Call
Call
Data Access
Messaging
CDI
![Page 46: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/46.jpg)
@HirofumiIwasaki 46
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
– Security countermeasures already
implemented like XSS, XSRF.
![Page 47: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/47.jpg)
@HirofumiIwasaki 47
<Facelet>
View 1
Backing1- fields+ load()
+ action()
<Facelet>
View 2
Backing2- fields+ load()
+ action()
<Facelet>
View 3Backing3- fields+ load()
+ action()
Front View
&
Backing BeanPer View Operation
![Page 48: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/48.jpg)
@HirofumiIwasaki 48
Paradigm Changes: From 2000's to 2010's
<<JSP>>
View1
<<JSP>>
View 2
Action1
+ action()
<<JSP>>
View 3Action2
+ action()
ActionForm1- fields+ validate()
ActionForm2- fields+ validate()
Operate
Action
Build
Next View
Operate
Action
Build
Next View
<Facelet>
View 1Backing1- fields+ load()
+ action()
<Facelet>
View 2Backing2- fields+ load()
+ action()
<Facelet>
View 3Backing3- fields+ load()
+ action()
Front View
& Backing Bean
1.x
![Page 49: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/49.jpg)
@HirofumiIwasaki 49
Older JSP vs. New Facelet
JavaServer
PagesFacelet
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
![Page 50: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/50.jpg)
@HirofumiIwasaki 50
Security Countermeasures and JSF
Cross Site
Scripting
(XSS)
Cross Site
Request Forgery
(CSRF)
Output values to
HTML with escaping.
Requirement
Output one time
token for next page
transitions.
JSF
Automatically
operated
Automatically
operated
![Page 51: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/51.jpg)
@HirofumiIwasaki 51
Summary: Recommendation for the Java EE 7 Front-End
Use For your web front-end,
Implement with Facelet.
![Page 52: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/52.jpg)
@HirofumiIwasaki 52
Agenda
1. Enterprise Systems and its Features
2. Java EE Specifications for Enterprise Systems
3. Java EE Applying Points for Real Enterprise Systems
a) Start Application Design with Java EE
b) Specify IDE for Modern Development Style
c) Web Front-End with JSF
d) Business Logic with EJB or CDI
e) Data Access with JPA
f) Connectivity with RMI-IIOP, REST and WebSocket
![Page 53: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/53.jpg)
@HirofumiIwasaki 53
Business Logic: Keywords
Enterprise
JavaBeans
(EJB)
Context and
Dependency
Injection (CDI)
JBatch
Transaction
Management
Container
Managed
Transaction
(CMT)
![Page 54: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/54.jpg)
@HirofumiIwasaki 54
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-IIOPOther
Servers
EMailMTAJavaMail
JAX
Call
Call
Call
Call
Call
Call
Data Access
Messaging
CDI
![Page 55: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/55.jpg)
@HirofumiIwasaki 55
Two Solutions for Realtime Logics: EJB or CDI
For Heavy & Mission-Critical
Business Logics
CDIEJB
Context and Dependency
Injection
For Light-weight Logics,
Rapid, Ease of Development
![Page 56: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/56.jpg)
@HirofumiIwasaki 56
Review: What’s EJB? Why EJB?
EJBClient
1. Remote Invocation
EJB
2. Automatic Transaction Management
Database
(BEGIN)
(COMMIT)
EJB
EJBEJB
EJB
Instance
Pool
Activate
3. Instance Pooling for Faster Operation
RMI-IIOP
SOAP
REST
Web Socket
EJBClient
4. Security Management
![Page 57: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/57.jpg)
@HirofumiIwasaki 57
Review: CDI – Light Version of EJB
CDIClient
1. Remote Invocation
CDI
2. Automatic Transaction Management
Database
(BEGIN)
(COMMIT)
EJB
EJB
Instance
Pool
Activate
3. Instance Pooling for Faster Operation
RMI-IIOP
SOAP
REST
Web Socket
Client
4. Security Management
Few Functions, Faster Deployment
![Page 58: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/58.jpg)
@HirofumiIwasaki 58
POJO
Java EE ServerJava EE Server
Java Batch
How Design the Batch Logics?
Choice 1: Use EJB/CDI,
Call via EJB/CDI Remote
from Outside
EJB
Batch
Batch
Kicker Call
Choice 2: Use
Java Batch Framework,
Call from Outside
Batch
Kicker Call
Choice 3:
Micro Service
(Java EE 9 style)
Batch
Kicker Call
Full automatic transaction,
Able to use embedded server.
If the standard templates
suitable for your app, try it.
Not released yet, but you can
try with Payara Micro now.
![Page 59: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/59.jpg)
@HirofumiIwasaki 59
Summary: Recommendation for the Java EE 7 Front-End
Use for your real-time logics,
Consider batch logics design.
CDI
![Page 60: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/60.jpg)
@HirofumiIwasaki 60
Agenda
1. Enterprise Systems and its Features
2. Java EE Specifications for Enterprise Systems
3. Java EE Applying Points for Real Enterprise Systems
a) Start Application Design with Java EE
b) Specify IDE for Modern Development Style
c) Web Front-End with JSF
d) Business Logic with EJB or CDI
e) Data Access with JPA
f) Connectivity with RMI-IIOP, REST and WebSocket
![Page 61: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/61.jpg)
@HirofumiIwasaki 61
Data Access: Keywords
Java
Persistence API
(JPA)
Data Access
Object (DAO)
JDBC
Auto
Generation
Java
Persistence
Query
Language
(JPQL)
![Page 62: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/62.jpg)
@HirofumiIwasaki 62
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-IIOPOther
Servers
EMailMTAJavaMail
JAX
Call
Call
Call
Call
Call
Call
Messaging
Data Access
CDI
![Page 63: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/63.jpg)
@HirofumiIwasaki 63
About JPA – Java Persistence API
Java Persistence API
(from Java EE 5)
![Page 64: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/64.jpg)
@HirofumiIwasaki 64
JPA – Simple Database Mapper
Relational Database
(E-R Diagram)
One by One
JPA Entity
(Class Diagram)
Auto Generate
With Bean Validation
![Page 65: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/65.jpg)
@HirofumiIwasaki 65
JPA – Simple Database Mapper
JPA Entity
JPA Data Access Object (DAO)
Auto CRUD
to Database
Access to RDB
![Page 66: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/66.jpg)
@HirofumiIwasaki 66
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 QueryJPQL:
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();
}
![Page 67: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/67.jpg)
@HirofumiIwasaki 67
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
PoolSelf-Managed
JDBC Connection
JPA
Entity Manager
JNDI
JDBC
Driver Manager
RAW
?
?No Global Transaction
No Connection Management
![Page 68: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/68.jpg)
@HirofumiIwasaki 68
Combination with EJB Session Bean
Business Logic
(no presentations)
JPAEJB
DBs
JTA
Automatic
Transaction
Call
Full automatic
transaction management
with EJB session bean
JPA entity manager
automatically join
the CMT of EJB
Data Access
![Page 69: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/69.jpg)
@HirofumiIwasaki 69
Summary: Use JPA, Instead of Raw JDBC.
Apply JPA ordinarily for data,
within the EJB / CDI
Container
Managed Transaction
(CMT)
![Page 70: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/70.jpg)
@HirofumiIwasaki 70
Agenda
1. Enterprise Systems and its Features
2. Java EE Specifications for Enterprise Systems
3. Java EE Applying Points for Real Enterprise Systems
a) Start Application Design with Java EE
b) Specify IDE for Modern Development Style
c) Web Front-End with JSF
d) Business Logic with EJB or CDI
e) Data Access with JPA
f) Connectivity with RMI-IIOP, REST and WebSocket
![Page 71: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/71.jpg)
@HirofumiIwasaki 71
Connectivity: Keywords
RMI over IIOP
(RMI-IIOP)
Web Services
JAX-WS
Web Socket
+ JSON
Remote Method
Invocation
(RMI)
REST + JSONGlobal
Transaction
(XA)
![Page 72: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/72.jpg)
@HirofumiIwasaki 72
Review: What’s EJB? Why EJB?
EJBClient
1. Remote Invocation
EJB
2. Automatic Transaction Management
Database
(BEGIN)
(COMMIT)
EJB
EJBEJB
EJB
Instance
Pool
Activate
3. Instance Pooling for Faster Operation
RMI-IIOP
SOAP
REST
Web Socket
EJBClient
4. Security Management
![Page 73: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/73.jpg)
@HirofumiIwasaki 73
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
![Page 74: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/74.jpg)
@HirofumiIwasaki 74
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
![Page 75: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/75.jpg)
@HirofumiIwasaki 75
For light-weight usage: consider Web Socket / REST + JSON
Local Transaction
Management
EJB
Session BeanClient Web Socket or REST
Database
AUTO
BEGIN
AUTO
COMMIT
Ultra-Fast,
Ease of Dev.
![Page 76: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/76.jpg)
@HirofumiIwasaki 76
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 ClientsTransactional
Processing
for RMI-IIOP
for Web Socket
for RMI-IIOPfor Web Socket
![Page 77: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/77.jpg)
@HirofumiIwasaki 77
Summary: Recommendation of Protocols
Select the RMI-IIOP
for heavy transactional distributed systems.
Select the Web Socket or REST
for system that requires light-weight and
faster speed.
![Page 78: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/78.jpg)
@HirofumiIwasaki 78
Summary
Enterprise systems require many mission critical basement.
Java EE is one of the best platform on the aspect of the vendor free.
Consider many critical points when Java EE design & development start.
![Page 79: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/79.jpg)
@HirofumiIwasaki 79
Contact
Hirofumi Iwasaki (@HirofumiIwasaki)
![Page 80: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/80.jpg)
![Page 81: Huge Enterprise Systems Architecture Design with Java EE](https://reader031.fdocuments.us/reader031/viewer/2022030306/58ce9b601a28ab8c3b8b76b3/html5/thumbnails/81.jpg)
We’re Hiring!!
Rakuten.Careers