53
2013 © Trivadis BASEL BERN LAUSANNE ZÜRICH DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. HAMBURG MÜNCHEN STUTTGART WIEN Welcome Oracle SOA Suite meets Java – The best of both worlds Guido Schmutz DOAG Konferenz 2013 Nürnberg, 21.11.2013 21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Welcome Oracle SOA Suite meets Java – The best of both worlds

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

BASEL BERN LAUSANNE ZÜRICH DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. HAMBURG MÜNCHEN STUTTGART WIEN

Welcome Oracle SOA Suite meets Java – The best of both worlds Guido Schmutz

DOAG Konferenz 2013

Nürnberg, 21.11.2013

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 2: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Trivadis ist führend bei der IT-Beratung, der Systemintegration, dem Solution-Engineering und der Erbringung von IT-Services mit Fokussierung auf und Technologien im D-A-CH-Raum.

Unsere Leistungen erbringen wir aus den strategischen Geschäftsfeldern: Trivadis Services übernimmt den korrespondierenden Betrieb Ihrer IT Systeme.

Unser Unternehmen

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

B E T R I E B

Page 3: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Mit über 600 IT- und Fachexperten bei Ihnen vor Ort

3

11 Trivadis Niederlassungen mitüber 600 Mitarbeitenden

200 Service Level Agreements

Mehr als 4'000 Trainingsteilnehmer

Forschungs- und Entwicklungs-budget: CHF 5.0 / EUR 4 Mio.

Finanziell unabhängig und nachhaltig profitabel

Erfahrung aus mehr als 1'900 Projekten pro Jahr bei über 800 Kunden

Stand 12/2012

Hamburg

Düsseldorf

Frankfurt

Freiburg München

Wien

Basel

Zürich Bern Lausanne

3

Stuttgart

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 4: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Guido Schmutz

•  Working for Trivadis for more than 16 years

•  Oracle ACE Director for Fusion Middleware and SOA •  Co-Author of different books •  Consultant, Trainer Software Architect for Java, Oracle, SOA,

EDA, BigData und FastData •  Member of Trivadis Architecture Board •  Technology Manager @ Trivadis

•  More than 20 years of software development experience

•  Contact: [email protected] •  Blog: http://guidoschmutz.wordpress.com •  Twitter: gschmutz

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 5: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Agenda

1.  Introduction

2.  How does the Spring component work

3.  The use cases

4.  Summary

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 6: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

SOA Suite 11g Overview

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Unified Runtime

BPMN

Policy Manager Optimized

binding

Human Workflow

(+AMX, AG, Orgn)

Business Rules

Oracle Service Bus

Common JCA-based connectivity infrastructure

Repository

EM console +BPMN Screens

BAM

B2B

Mediator

Workspace Process Portal (WC spaces)

MS Office

BPM Studio (with Business and IT views)

Shared BPMN Model

Business View

BPA BPMN 2.0, BPEL

Rich End User Interaction Web based customization

Process Composer

BPEL

Process Analytics

Proc Cubes

Spring

Page 7: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Service InfrastructureSCA Assembly Model

Oracle SOA Suite meets Java – The best of both worlds

Service §  Entry point to composite

Reference §  Link to services outside of composite

Wire §  Connects references to services

Property §  allow for the configuration of an

implementation with externally set data values

Component/Implementation §  Implements business logic or XML

processing rules

Composite - Overarching description of composite service, composed of:

21.11.2013

Page 8: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Oracle Mediator for „simple“ service virtualization

Oracle SOA Suite meets Java – The best of both worlds 21.11.2013

Page 9: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

BPEL / BPMN for implementing (Business) Processes

Oracle SOA Suite meets Java – The best of both worlds 21.11.2013

Page 10: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Oracle Business Rules for externalizing business logic

Oracle SOA Suite meets Java – The best of both worlds 21.11.2013

Page 11: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Oracle Adapters for accessing external sources

DB Adapter (Inbound – Mediator – Outbound)

JMS Adapter (Dequeue – Mediator – Enqueue)

Oracle SOA Suite meets Java – The best of both worlds 21.11.2013

Page 12: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Different strategies for integrating Java in SOA Suite

Java Embedding in BPEL

Java Callout in Mediator/Oracle Service Bus

Custom BPEL/XPATH Functions

JAX-WS or JAX-RS Web Services (SOAP / REST services)

EJB Services

JMS Adapter/Transport and Message Driven Bean (MDB)

Custom JCA Adapter or Custom OSB Transport

Spring Component

“When Java meets SOA”: https://blogs.oracle.com/rammenon/entry/java_and_soa_suite

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 13: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Spring SCA Component

Spring is a lightweight container using “plain old Java objects” (POJOs)

SCA extends Spring framework capabilities

•  Publish spring beans as SCA component services

•  Provide references to Spring beans wired to services of other components

Following types of component integrations are supported

•  Java components to WSDL components

•  WSDL components to Java components

•  Java components to Java components

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 14: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Agenda

1.  Introduction

2.  How does the Spring component work

3.  The use cases

4.  Summary

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 15: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

The HelloWorldImpl POJO used inside a Spring component

Hello World

Oracle SOA Suite meets Java – The best of both worlds

Lessons learnt: Make sure to compile classes before wiring!

21.11.2013

Page 16: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

<sca:service> Element

Declares a Spring bean that SCA exposes as a service

Takes the following attributes:

•  Name §  the name of the service (required)

•  Type §  The fully qualified Java type of the Java class to be exposed as an SCA service

(required)

•  Target §  The bean to be exposed as a service (required)

Oracle SOA Suite meets Java – The best of both worlds 21.11.2013

Page 17: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

<sca:reference> Element

Declares a Spring bean representing an SCA service external to the Spring application context

Takes the following attributes:

•  Name §  The name of the reference (required)

•  Type §  The fully-qualified Java type of the interface or class representing the remote service

(required)

•  Default §  The target bean for the reference if none is specified (optional)

Oracle SOA Suite meets Java – The best of both worlds 21.11.2013

Page 18: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Using the Predefined Beans

The following spring beans are predefined in SOA Suite:

•  headerHelperBean – for getting an setting header properties

•  instanceHelperBean – for getting Instance ID of composite and component, name of the Spring service component

•  loggerBean – for providing context-aware logging message

You can also define your own Spring beans globally => see use case 3

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 19: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Agenda

1.  Introduction

2.  How does the Spring component work

3.  The use cases §  Case 1 - Configuration

4.  Summary

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 20: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 1 – Configuration: Within SOA Suite

Use Case: Need configuration properties which are changeable at runtime

Within a SCA Composite preferences can be declared

•  Has to start with bpel.preference

Use ora:getPreference('greetingMessage')from within BPEL

Restriction: Only scalar values are supported! Can only be accessed from a BPEL component.

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 21: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 1 – Configuration: Within SOA Suite

Values can be changed through System MBean Browser in EM §  oracle.soa.config > Server : soa_server1 > SCAComposite > your_project >

SCAComposite.SCAComponent > your bpel_process

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 22: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 1 – Configuration: using Spring and JMX

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 23: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 1 – Configuration: using Spring and JMX

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 24: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 1 – Configuration: using Spring and JMX

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 25: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Agenda

1.  Introduction

2.  How does the Spring component work

3.  The use cases §  Case 2 – Dynamic Routing

4.  Summary

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 26: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 2 – Dynamic Routing: Using Spring bean for subscription

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 27: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 2 – Dynamic Routing: Using Spring bean for subscription

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 28: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 2 – Dynamic Routing: Using Spring bean for subscription

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 29: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 2a – Dynamic Routing: Using Spring bean for subscription

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 30: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 2a – Dynamic Routing: Using Spring bean for subscription

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 31: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Agenda

1.  Introduction

2.  How does the Spring component work

3.  The use cases §  Case 3 – Generic Message Handling through JMS

4.  Summary

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 32: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 3 – Generic Message Handling through JMS

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 33: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 3 – Generic Message Handling through JMS

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 34: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Agenda

1.  Introduction

2.  How does the Spring component work

3.  The use cases §  Case 4 – NoSQL

4.  Summary

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 35: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 4 – NoSQL: What is NoSQL?

NoSQL is a new class of databases

They don‘t use the relational data model and thus don‘t use SQL

Tend to be designed to run on cluster

Schema-Less - Don‘t have a fixed schema, allowing to store any data in any record

Different types of NoSQL databases

•  Key/value

•  Column Family

•  Document

•  Graph

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 36: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 4 – NoSQL: MongoDB Integration through Spring

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 37: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 4 – NoSQL: MongoDB Integration through Spring

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 38: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 4 – NoSQL: MongoDB Integration through Spring

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 39: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 4a – NoSQL: MongoDB Logging Bean

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 40: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 4a – NoSQL: MongoDB Logging Bean

Define bean in the global spring context (custom predefined bean) so that logging is globally available

1.  Add the bean definition here §  SOA_HOME/soa/modules/oracle.soa.ext_11.1.1/classes/ springse-

extension-global-beans.xml

2.  Add the corresponding classes in either the lib or classes directory

3.  Run the ant script and restart server (more information in readme.txt)

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again.

The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again.

Page 41: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 4a – NoSQL: MongoDB Logging Bean

Usage of the custom bean in the global spring context

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 42: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Agenda

1.  Introduction

2.  How does the Spring component work

3.  The use cases §  Case 5 – Twitter

4.  Summary

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Please follow me on twitter to get the full experience J Twitter User: gschmutz

Page 43: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 5 – Twitter: Send an Update Message

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 44: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 5 – Twitter: Send an Update Message

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 45: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 5 – Twitter: Send an Update Message

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 46: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 5a - Send a Twitter message to @gschmutz with hash tags #doag #springtalk …… to get the link to the slides

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

@gschmutz Cool stuff! Das will ich gleich austesten! #doag #springtalk

@gschmutz #doag #springtalk Slides bitte!

@gschmutz #doag #springtalk a piece of crap!

@gschmutz #aoug #springtalk Oracle SOA Suite und Spring ist cool!

@gschmutz #doag #springtalk das ist wirklich cool!

@gschmutz #doag #springtalk

Page 47: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 5a – Twitter: Process Mentioned Messages and send message with link to slides J

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 48: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 5a – Twitter: Process Mentioned Messages and send message with link to slides J

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 49: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Agenda

1.  Introduction

2.  How does the Spring component work

3.  The use cases §  Case 6 – …

4.  Summary

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 50: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Case 6: so many more ideas …. And not enough time

•  Invoking Spring Batch

•  Invoking Hadoop Processing

•  Groovy Script integration (i.e. XML ó JSON)

•  Read/Write Excel

•  Create PDF

•  Submit to Evernote

•  Message Enrichment (Mediator cannot do that)

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 51: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Agenda

1.  Introduction

2.  How does the Spring component work

3.  The use cases

4.  Summary

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 52: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

Summary

The Spring component is a nice way to extend the functionality of the SOA Suite and the other service engines

Use cases for it are endless ….

Only use the Spring component if no out-of-the-box feature in the SOA Suite exists!

Bring your Java people „on board“ …..

Make sure to first test the Java and Spring stuff externally!

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds

Page 53: Welcome Oracle SOA Suite meets Java – The best of both worlds

2013 © Trivadis

BASEL BERN LAUSANNE ZÜRICH DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. HAMBURG MÜNCHEN STUTTGART WIEN

THANK YOU. Trivadis

Guido Schmutz [email protected]

[email protected] www.trivadis.com

21.11.2013 Oracle SOA Suite meets Java – The best of both worlds