25
Java FX for Java Batch (JSR-352) and Spring Batch Vijay Nair Architect (OFSSL)

JavaFX and JEE 7

Embed Size (px)

Citation preview

Page 1: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 131

Java FX for Java Batch (JSR-352) and Spring BatchVijay NairArchitect (OFSSL)

Page 2: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 132

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

Page 3: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 133

Program Agenda

Background/Capabilities

Architecture

Server Agent Component – Design and Tools

Client Component – Design and Tools

Short Demo

Page 4: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 134

Background

Batch Operations are among the most critical operations performed by IT staff in a bank

Batch Operators need an easy to use system to help them maintain batch jobs across systems and monitor them in real time

Pilot project utilizing Java FX and JEE 7 to help address this space

Page 5: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 135

Capabilities

Visualize

Job Meta Data (Names/Descriptions/

Thresholds/Definitions/Schedule

Expressions)

Job Step Meta Data (Names/

Descriptions/Thresholds/Failure

Actionable)

Job Process Flows (Hierarchies/

Dependencies/Decisions)

Configure MonitorConfigure

New Jobs (Job Definitions/Step

Definitions/Flows and Schedules)

Authorization of maintenance

Job Testing

Purging Policies (Job/Step Execution Data)

Page 6: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 136

Capabilities

Monitor

Real Time Job Status Monitoring (Running

Jobs/Failed Jobs/Threshold Time Exceeded

Jobs)

Step Monitoring (Running Steps/Failed Steps/

Threshold Time Exceeded Steps)

Diagnosis (Job Failure Reasons/Step

Failure Reasons/What to do ?)

Actions (Stop/Abandon/Restart)

Configure MonitorReport

Job/Step Execution Reports

(Historical/Current)

Time Series Analysis (Job/Step Executions)

Job Hierarchies

Page 7: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 137

Will result in a….

Page 8: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 138

Architecture – JEE 7USER INTERFACE

VIEWS CONTROLLERS

TRANSFORMATIONSERVICE CLIENTSCONNECTORS

DATA SERVICES EXECUTION SERVICES TIMER SERVICES

ORM BATCH RUNTIME INFRASTRUCTURE

MySQL

JavaFX 2.2.7

FXML Layouts

Controllers JAX-RS 2.0 (JSR-339) - RESTful Clients Eclipselink MOXy – JSON Provider

EJB 3.2 (JSR-345) - RESTful/Timer

Services CDI 1.1 (JSR-346) - DI JPA 2.1 (JSR-338) - ORM/PL-SQL Support Java Batch 1.0 (JSR-352) - Batch

Runtime Infrastructure Eclipselink MOXy - JSON Provider

MySQL – Batch Runtime Database

SERVER AGENT

DATABASE/BATCH SYSTEMSEXTERNAL SYSTEMS

RESTful JSON

Page 9: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 139

Architecture - Packaging

FCBSMODEL

MySQL

SERVER AGENT

FCBSWEBAPP

FCBSCLIENTAPP

DEPENDS ON

SHIPS WITH

DE

PE

ND

S O

NSH

IPS

WIT

H

AC

CE

SS

ES

AC

CE

SS

ES

Page 10: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1310

Architecture – Spring BatchUSER INTERFACE

VIEWS CONTROLLERS

TRANSFORMATIONSERVICE CLIENTSCONNECTORS

DATA SERVICES EXECUTION SERVICES TIMER SERVICES

ORM BATCH RUNTIME INFRASTRUCTURE

MySQL

JavaFX 2.2.7

FXML Layouts

Controllers Jersey Client - RESTful Clients Jackson – JSON Provider

Spring MVC + WS – RESTful Services Spring Core - DI JPA 2.0 - ORM/PL-SQL Support Spring Batch - Batch

Runtime Infrastructure Jackson - JSON Provider

MySQL – Batch Runtime Database

SERVER AGENT

DATABASE/BATCH SYSTEMSEXTERNAL SYSTEMS

Page 11: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1311

Server Agent – Java Batch 1.0 (JSR-352)

JEE 7 standard for Batch Jobs Runtime for Batch Operations including start/stop/abandoning and

monitoring of the same

Why Java Batch ?

How have we used Java Batch ? Configure Jobs across systems Spawn Jobs Monitor Jobs

Page 12: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1312

Server Agent – Java Batch 1.0 (JSR-352)

CHECKPOINTDATAEXECUTIONINSTANCEDATA

JOBINSTANCEDATA

JOBSTATUS

STEPEXECUTIONINSTANCEDATA

STEPSTATUS

PROVIDED TABLES

JOBMETADATA

Name Description Definition Threshold ScheduleExpression

STEPMETADATA

Name Description Threshold StepFailureAction

EXTENSIONS

JOBPARAMETERSMETADATA

Parametername Parametervalue

EXECINSTANCEFAILREASON

ExecId ExecDate FailureReason Status

Page 13: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1313

Server Agent – Java Batch 1.0 (JSR-352)

Application Job Process Flow

Job Flow

Decision

Flow

Decision

Steps

StepsSteps

Batchlets

Batchlets

Job Listeners

Step Listeners

Step Listeners

Exit

System A

System B

Page 14: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1314

Server Agent – Java Batch 1.0 (JSR-352)

Page 15: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1315

Server Agent – EJB 3.2 / JAX-RS 2.0

RESTful Services

RESTful Services exposed as Stateless EJBs

Eclipselink MOXy as the JSON Provider

Timer Services

Timer Services exposed as Stateless EJBs

Page 16: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1316

Server Agent – CDI 1.1

Dependency Injection

JEE Resource Injection

Batchlets configured as “Named” resources Batchlets loaded via “Named” references

Page 17: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1317

Server Agent – JPA 2.1

ORM

JPA 2.1 Models

PL/SQL support

Page 18: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1318

User Interface – Why JavaFX ?

Productivity– Rapid Application Development using Tooling (Netbeans and

SceneBuilder)

– Testing and…

– We are coding only in Java

Why JavaFX ?

Page 19: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1319

User Interface – Why JavaFX ?

Capability– Layouts built using WYSIWYG

– Control Set (Basic and Advanced)

– Eventing (e.g. Value Change Listeners, Thread State Listeners)

– CSS styling

Why JavaFX ?

Page 20: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1320

User Interface – Why JavaFX ?

Monitoring using VisualVM Stability and Acceptance

– Extremely Performant

– Class of users are familiar with Desktop Applications

Why JavaFX ?

Page 21: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1321

User Interface – Views

FXML

VIEWS

Screen Building using Scene Builder

which generates FXML– Layout Containers

– Place Controls

– Associate Events

– Style

Map to a Controller Class

FXML

Generates

Controller

Associate

Page 22: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1322

User Interface – Controllers

Java Class which has– Controls injected using “@FXML”

– “Service” threads to load data

– Event listeners to populate data

or respond to other events

Controller Implementation

Page 23: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1323

User Interface – Client Services

Controllers use JAX-RS 2.0 clients to load data with Eclipselink

MOXy as the JSON Provider

JAX-RS 2.0 (JSR-339) Client API

Page 24: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1324

Graphic Section Divider

Page 25: JavaFX and JEE 7

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1325