Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Financial Web System
with Java EE 6
Hirofumi Iwasaki
Financial Service Department, Development Unit,
Rakuten, Inc.
http://...
Speaker Biography
 Hirofumi Iwasaki
– Vice Group Manager, Technology Manager
– Financial Service Department, Development ...
Agenda

1. Java EE 6 Specifications
2. Financial Requirements &
Java EE Specifications
3. How to Apply Java EE 6
to Real F...
Agenda

1. Java EE 6 Specifications
2. Financial Requirements &
Java EE Specifications
3. How to Apply Java EE 6
to Real F...
What's Java EE (1/2)
 Standard specifications for application servers (except for MS).

Java EE
Specification
Commercial
...
What's Java EE (2/2)
 For ENTERPRISE systems (Enterprise Edition) specifications (full
profile)
– 'Enterprise' means tran...
The History of Java EE

J2EE
1.2
(1999)

Born!

J2EE
1.3
(2001)

Pandemic
Era

J2EE
1.4
(2003)

Java EE
5
(2006)

Mess Era...
Grouping of the Java EE Servers
App
Engine

WebLogic World
GlassFish &
Compatible Group
Geronimo &
Compatible Group
Copy

...
Java EE Application Servers Versions
Vendor

App Server

EE 1.4
(2003-)

EE 5
(2006-)

EE 6
(2009-)

EE 7
(2013-)

Open So...
Agenda

1. Java EE 6 Specifications
2. Financial Requirements &
Java EE Specifications
3. How to Apply Java EE 6
to Real F...
Financial Services of Rakuten Group

11
Financial Services of Rakuten Group

 Big 6 Services
 Each has huge transactions
 24/7 non-stop services

12
Requirements for Rakuten Financial Systems
Financial
Systems

1. Rapid business logic changeable
as business model changes...
For our 3 Big Targets
Like periodic
re-construction
known as
"Shikinen-Sengu"
in Japan.

E.g.
Re-construct to next
place o...
3 Big Targets for New Architecture

①
sustain
ability

③
System
Transpa
rency

for
new
Arch.

②
Flexibil
ity
15
Typical Usage of EE 6 Specs
Business Logic
(no presentations)

Web Presentation
(no business logics)

Data Access

Call

J...
Applying Service Oriented Architecture
Business Logic
(no presentations)

Web Presentation
(no business logics)

Data Acce...
Simplified Model

Rich Clients
(no business logics)

Web Presentation
(no business logics)

Service
Interfaces

A Shared
F...
Enterprise 'Transactional' Model
Transaction Boundary

Client
(caller,
views or so)

BEGIN
SELECT
DELETE

Transactional
Se...
Enterprise 'Transactional' Model (Error Case)

Client
(caller,
views or so)

BEGIN
SELECT
DELETE

ROLLBACK

Transaction Bo...
Distributed Transaction Model

Database 1

BEGIN

Transactional
Services
Database 2

MQ

Global
Transaction

Other
Transac...
Distributed Transaction Model (Error Case)

BEGIN

ERROR

Transactional
Services

ROLLBACK

Database 1

Database 2

Local
...
Each Technology & Java EE Specs
Core Spec
is EJB

JPA

BEGIN

Transactional
Services

JPA

Database 1

Database 2

EJB
Loc...
Agenda

1. Java EE 6 Specifications
2. Financial Requirements &
Java EE Specifications
3. How to Apply Java EE 6
to Real F...
5 Big Issues to Apply New JEE Architecture

25
1. Policies: Case of Rakuten

 Internal Development First,
not order to external SI vendors. (Group All)
 Financial busi...
2. Education: Read, Read, Read!

Start from HERE
4th Edition

Good & Only
Japanese
EE 6 book

Good Pocket
Reference!

For ...
2. Education: Online Materials
Original Tutorial
for Newbies (Start here!)

NetBeans Java EE docs
for Advanced Information...
3. Architecture: Apply EE 6 Specs
Business Logic
(no presentations)

Web Presentation
(no business logics)

Data Access

C...
3. Architecture: Migrate from Old
Old Arch (e.g. PHP case)

Spring

PHP

DAO

Transaction
Boundary

JSF 2

Logic

View
New...
3. Architecture: Simplified

Web Site A
Web Site B

Internal Site

Batch Exec

Core

Services (aka APIs)

L7 Balancer

Rev...
4. Environment: Ease of Dev.

Full Local Programming,
Build & Execute support

=

X

X

32
4. Environment: Easy Startup

2. Download
Code from
Repository
4. Refer the JIRA
as for his today's
task improvement

1. J...
5. Test: Full Auto Testing &Valid.

1. Auto PULL

4. Report
Hourly

ZERO Violations!

3. Auto
Validate

2. Auto
Build
& Te...
Agenda

1. Java EE 6 Specifications
2. Financial Requirements &
Java EE Specifications

3. How to Apply Java EE 6
to Real ...
Is Java EE 6 Useful for Real Projects?

Web Front End

Wait the
Java EE 7

Back End

Not Bad

36
Why you should wait the EE 7 for front-end?

37
1st Issue: JSF Backing bean defectively in EE 6
Java EE 6 (JSF 2.1)

Facelet
Filter

Faces
Servlet

Managed
Bean
@View
Sco...
1st Issue: JSF Backing bean defectively in EE 6
 Not worked these JSF 1.x codes in JSF 2.x properly.
protected FacesConte...
1st Issue: JSF Backing bean defectively in EE 6
Java EE 6 (JSF 2.1)
NG!

CDI
don't have
@View
Scoped

Facelet
Filter

Face...
1st Issue: JSF Backing bean defectively in EE 6
Java EE 7 (JSF 2.2)
OK!
Facelet
Filter

Facelet

New CDI
@View
Scoped

Fac...
2nd Issue: Non-interchangeable Facelet tags in EE 6
Java EE 6 (JSF 2.1)

<input type="text"
jsfc="h:inputText"
name="id"
v...
How's Back End in EE 6?
Business Logic
(no presentations)
Data Access

Call

JPA

DBs

Call

EJB

Messaging
Call

JMS

MQ
...
Agenda

1. Java EE 6 Specifications
2. Financial Requirements &
Java EE Specifications

3. How to Apply Java EE 6
to Real ...
Conclusion
 Java EE 6 is suitable for huge
financial systems.
 We made new financial architecture
with many measurements...
46
Upcoming SlideShare
Loading in …5
×

[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6

19,260 views

Published on

Rakuten Technology Conference 2013
"Financial Web System with Java EE 6"
Hirofumi Iwasaki (Rakuten)

Published in: Technology

[RakutenTechConf2013] [E-3] Financial Web System with Java EE 6

  1. 1. Financial Web System with Java EE 6 Hirofumi Iwasaki Financial Service Department, Development Unit, Rakuten, Inc. http://www.rakuten.co.jp/
  2. 2. Speaker Biography  Hirofumi Iwasaki – Vice Group Manager, Technology Manager – Financial Service Department, Development Unit, Rakuten, Inc.  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 15 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: @rockcape 2
  3. 3. Agenda 1. Java EE 6 Specifications 2. Financial Requirements & Java EE Specifications 3. How to Apply Java EE 6 to Real Financial Systems 3
  4. 4. Agenda 1. Java EE 6 Specifications 2. Financial Requirements & Java EE Specifications 3. How to Apply Java EE 6 to Real Financial Systems 4
  5. 5. What's Java EE (1/2)  Standard specifications for application servers (except for MS). Java EE Specification Commercial etc. Open Source 5
  6. 6. What's Java EE (2/2)  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. 6
  7. 7. The History of Java EE J2EE 1.2 (1999) Born! J2EE 1.3 (2001) Pandemic Era J2EE 1.4 (2003) Java EE 5 (2006) Mess Era (for EE spec) Java EE 6 (2009) Java EE 7 (2013) Integration Era Unite to Single Standard Again! 7
  8. 8. Grouping of the Java EE Servers App Engine WebLogic World GlassFish & Compatible Group Geronimo & Compatible Group Copy Japan Galapagos Group JBoss World 8
  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 - Red Hat JBoss 4.x 5.1 7.1 - Fujitsu Interstage 9.0,9.1 9.2,10.x,11.0 11.1 - Open Source Geronimo - 2.x 3.x - Hitachi Cosminexus 7.x 8.x 9.x - The de facto latest version is EE6 9
  10. 10. Agenda 1. Java EE 6 Specifications 2. Financial Requirements & Java EE Specifications 3. How to Apply Java EE 6 to Real Financial Systems 10
  11. 11. Financial Services of Rakuten Group 11
  12. 12. Financial Services of Rakuten Group  Big 6 Services  Each has huge transactions  24/7 non-stop services 12
  13. 13. Requirements for Rakuten Financial Systems Financial Systems 1. Rapid business logic changeable as business model changes 2. Huge request capacity as business grows 3. Must be transactional 13
  14. 14. For our 3 Big Targets Like periodic re-construction known as "Shikinen-Sengu" in Japan. E.g. Re-construct to next place once every 20 years in Ise-Shrine Re-construct New! Photo by author (2009 in Ise-Shrine) 14
  15. 15. 3 Big Targets for New Architecture ① sustain ability ③ System Transpa rency for new Arch. ② Flexibil ity 15
  16. 16. Typical Usage of EE 6 Specs Business Logic (no presentations) Web Presentation (no business logics) Data Access Call JPA DBs Call JSF EJB Rich Clients (no business logics) Messaging MQ Connection RMI-IIOP Call Java FX Call JMS JAX Automatic Transaction JavaMail Other Servers Call MTA EMail JTA Call 16
  17. 17. Applying Service Oriented Architecture Business Logic (no presentations) Web Presentation (no business logics) Data Access Call JPA DBs Call JSF EJB Messaging Design asJMS Services Connection (aka 'API') Rich Clients (no business logics) RMI-IIOP Call Java FX JAX Automatic Transaction JavaMail MQ Call Other Servers Call MTA EMail JTA Call 17
  18. 18. Simplified Model Rich Clients (no business logics) Web Presentation (no business logics) Service Interfaces A Shared Function Design as Services (aka 'API')  Full Service ('API-nization')  Re-use one business logic for another front-end 18
  19. 19. Enterprise 'Transactional' Model Transaction Boundary Client (caller, views or so) BEGIN SELECT DELETE Transactional Services UPDATE COMMIT 19
  20. 20. Enterprise 'Transactional' Model (Error Case) Client (caller, views or so) BEGIN SELECT DELETE ROLLBACK Transaction Boundary Transactional Services UPDATE ERROR No Data Broken Model 20
  21. 21. Distributed Transaction Model Database 1 BEGIN Transactional Services Database 2 MQ Global Transaction Other Transactional Service 21
  22. 22. Distributed Transaction Model (Error Case) BEGIN ERROR Transactional Services ROLLBACK Database 1 Database 2 Local Transaction MQ Global Transaction Other Transactional Services No Data Broken Model 22
  23. 23. Each Technology & Java EE Specs Core Spec is EJB JPA BEGIN Transactional Services JPA Database 1 Database 2 EJB Local Transaction JMS MQ Automatic EJB Transaction RMI-IIOP Global Transaction = Container Managed JTA Transaction (CMT) Other Transactional Services 23
  24. 24. Agenda 1. Java EE 6 Specifications 2. Financial Requirements & Java EE Specifications 3. How to Apply Java EE 6 to Real Financial Systems 24
  25. 25. 5 Big Issues to Apply New JEE Architecture 25
  26. 26. 1. Policies: Case of Rakuten  Internal Development First, not order to external SI vendors. (Group All)  Financial businesses are also the target for the application of this policy. ORDER NO Educate & Develop 26
  27. 27. 2. Education: Read, Read, Read! Start from HERE 4th Edition Good & Only Japanese EE 6 book Good Pocket Reference! For NetBeans 7 with EE 6 RECOMMENDED for WebLogic 12c 27
  28. 28. 2. Education: Online Materials Original Tutorial for Newbies (Start here!) NetBeans Java EE docs for Advanced Information 28
  29. 29. 3. Architecture: Apply EE 6 Specs Business Logic (no presentations) Web Presentation (no business logics) Data Access Call JPA DBs Call JSF EJB Rich Clients (no business logics) Messaging Call JMS MQ Connection RMI-IIOP Call Java FX There's no rich clients JAX Automatic Transaction JavaMail Other Servers Call MTA EMail JTA Call 29
  30. 30. 3. Architecture: Migrate from Old Old Arch (e.g. PHP case) Spring PHP DAO Transaction Boundary JSF 2 Logic View New Arch EJB 3 + JPA External DB External View Services (aka APIs) DB Fully Re-written 100% API-nized 30
  31. 31. 3. Architecture: Simplified Web Site A Web Site B Internal Site Batch Exec Core Services (aka APIs) L7 Balancer Reverse Proxy Front Real-time System B Gateway Database System C Sub Proc Front Batch 31
  32. 32. 4. Environment: Ease of Dev. Full Local Programming, Build & Execute support = X X 32
  33. 33. 4. Environment: Easy Startup 2. Download Code from Repository 4. Refer the JIRA as for his today's task improvement 1. Join a project. 3. Install JDK with IDE, App servers, build, and run on you local PC 33
  34. 34. 5. Test: Full Auto Testing &Valid. 1. Auto PULL 4. Report Hourly ZERO Violations! 3. Auto Validate 2. Auto Build & Test Management Server 34
  35. 35. Agenda 1. Java EE 6 Specifications 2. Financial Requirements & Java EE Specifications 3. How to Apply Java EE 6 to Real Financial Systems Appendix: Java EE 6 Unveiled 35
  36. 36. Is Java EE 6 Useful for Real Projects? Web Front End Wait the Java EE 7 Back End Not Bad 36
  37. 37. Why you should wait the EE 7 for front-end? 37
  38. 38. 1st Issue: JSF Backing bean defectively in EE 6 Java EE 6 (JSF 2.1) Facelet Filter Faces Servlet Managed Bean @View Scoped Facelet Managed Bean @View Scoped Facelet Managed Bean @View Scoped Phase Listeners Managed Bean @Session Scoped JSF World 38
  39. 39. 1st Issue: JSF Backing bean defectively in EE 6  Not worked these JSF 1.x codes in JSF 2.x properly. protected FacesContext getFacesContext(HttpServletRequest request, HttpServletResponse response) { FacesContext facesContext = FacesContext.getCurrentInstance(); if (facesContext == null) { FacesContextFactory contextFactory = (FacesContextFactory)FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY); LifecycleFactory lifecycleFactory = (LifecycleFactory)FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY); Lifecycle lifecycle = lifecycleFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE); facesContext = contextFactory.getFacesContext(request.getSession().getServletContext(), request, response, lifecycle); // Set using our inner class InnerFacesContext.setFacesContextAsCurrentInstance(facesContext); // set a new viewRoot, otherwise context.getViewRoot returns null UIViewRoot view = facesContext.getApplication().getViewHandler() .createView(facesContext, ""); facesContext.setViewRoot(view); } return facesContext; } 39
  40. 40. 1st Issue: JSF Backing bean defectively in EE 6 Java EE 6 (JSF 2.1) NG! CDI don't have @View Scoped Facelet Filter Faces Servlet Phase Listeners NG! CDI don't have @View Scoped Facelet NG! Facelet Managed Bean @Session Scoped OK! CDI don't have @View Scoped Integrated CDI World 40
  41. 41. 1st Issue: JSF Backing bean defectively in EE 6 Java EE 7 (JSF 2.2) OK! Facelet Filter Facelet New CDI @View Scoped Facelet Faces Servlet New CDI @View Scoped New CDI @View Scoped Phase Listeners CDI @Session Scoped OK! Wait the Java EE 7 if you can Integrated CDI World 41
  42. 42. 2nd Issue: Non-interchangeable Facelet tags in EE 6 Java EE 6 (JSF 2.1) <input type="text" jsfc="h:inputText" name="id" value="#{bean.property}" /> Java EE 7 (JSF 2.2) Changed! <input type="text" jsf:id="id" jsf:value="#{bean.property}" /> Wait the Java EE 7 if you can 42
  43. 43. How's Back End in EE 6? Business Logic (no presentations) Data Access Call JPA DBs Call EJB Messaging Call JMS MQ Connection RMI-IIOP Call JAX Automatic Transaction JavaMail Other Servers Call MTA EMail JTA Call 43
  44. 44. Agenda 1. Java EE 6 Specifications 2. Financial Requirements & Java EE Specifications 3. How to Apply Java EE 6 to Real Financial Systems Appendix: Java EE 6 Unveiled Conclusion 44
  45. 45. Conclusion  Java EE 6 is suitable for huge financial systems.  We made new financial architecture with many measurements  Wait for the EE 7 servers if you can Go Ahead, Ride the Wave! Make our enterprise future with Java EE! 45
  46. 46. 46

×