SlideShare a Scribd company logo
1 of 43
Download to read offline
Spring Web Service, Spring
   Integration and Spring Batch

                                   Eberhard Wolff
                            Principal & Regional Director
                               SpringSource Germany




Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
About the presentation...
•  Take a concrete project...
•  How can you solve your problems (using the Spring
   Portfolio)?

•    You will see new Spring technologies in action...
•    You will get a different impression about Spring...
•    You will see how to do Web Services, EAI...
•    ...and even batches




       Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   2
The Case




Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
Build an Application
•  Should process orders
•  Orders may come in as a file
•  Or with a web service
•  Express orders are processed immediately
•  Other orders in a batch at night for the
   next day




   Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   4
Architecture

•  I don't do Model Driven Development
  –  Sorry, Markus
•  I don’t do PowerPoint architectures

•  I have something far better...




   Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   5
Architecture




  Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   6
Web Services




Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
How you could have done it...

•  Generate a service POJO using Java
•  Export it via XFire
•  Clients use WSDL generated from the interface


•  Drawbacks:
   –  XFire is deprecated and you depend on how it generates the
      WSDL
   –  Exposes an interface that might be used internally
   –  ...and makes it unchangeable because external clients depend
      on it
   –  Types like java.util.Map cannot be expressed in WSDL, so
      work arounds must be used



     Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   8
Contract First


•  Contract First: Define the interface before the
   implementation
•  Contract First is the key to interoperability
•  Web Services are used for interoperability
•  Not using Contract First with Web Services is therefore
   unwise (almost a contradiction)
•  Also good to organize projects
   –  Decide about the interface
   –  Start coding the implementation
   –  ...and the client
•  That used to work well for CORBA in the last century...


    Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   9
So let’s use WSDL
<?xml version="1.0" encoding="UTF-8"?>	
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"	
xmlns:sch="http://www.springsource.com/order"	
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"	
xmlns:tns="http://www.springsource.com/order"	
targetNamespace="http://www.springsource.com/order">	
<wsdl:types>	
<schema xmlns="http://www.w3.org/2001/XMLSchema"	
elementFormDefault="qualified"	




                                                                          •  Send an order with some
targetNamespace="http://www.springsource.com/order">	
<complexType name="Order">	
<sequence>	
<element maxOccurs="1" minOccurs="0" name="express"	
type="boolean" />	
<element maxOccurs="unbounded" minOccurs="1"	
name="order-item" type="tns:OrderElement" />	




                                                                             order items
</sequence>	
</complexType>	
<complexType name="OrderElement">	
<all>	
<element maxOccurs="1" minOccurs="1" name="count"	
nillable="false" type="positiveInteger" />	
<element maxOccurs="1" minOccurs="1" name="item"	
nillable="false" type="string" />	




                                                                          •  80 lines of WSDL in Eclipse
</all>	
</complexType>	
<element name="orderRequest">	
<complexType>	
<sequence>	
<element name="order" type="tns:Order" />	
</sequence>	




                                                                             formatting
</complexType>	
</element>	
<element name="orderResponse">	
<complexType>	
<sequence>	
<element name="result" type="string" />	
</sequence>	
</complexType>	




                                                                          •  Show in 5 point font here
</element>	
</schema>	
</wsdl:types>	
<wsdl:message name="orderResponse">	
<wsdl:part element="tns:orderResponse" name="orderResponse">	
</wsdl:part>	
</wsdl:message>	
<wsdl:message name="orderRequest">	
<wsdl:part element="tns:orderRequest" name="orderRequest">	
</wsdl:part>	
</wsdl:message>	
<wsdl:portType name="Order">	
<wsdl:operation name="order">	
<wsdl:input message="tns:orderRequest"	
name="orderRequest">	
</wsdl:input>	
<wsdl:output message="tns:orderResponse"	




                                                                          •  Just too much code
name="orderResponse">	
</wsdl:output>	
</wsdl:operation>	
</wsdl:portType>	
<wsdl:binding name="OrderSoap11" type="tns:Order">	
<soap:binding style="document"	
transport="http://schemas.xmlsoap.org/soap/http" />	
<wsdl:operation name="order">	
<soap:operation soapAction="" />	
<wsdl:input name="orderRequest">	
<soap:body use="literal" />	
</wsdl:input>	
<wsdl:output name="orderResponse">	
<soap:body use="literal" />	
</wsdl:output>	
</wsdl:operation>	
</wsdl:binding>	
<wsdl:service name="OrderService">	
<wsdl:port binding="tns:OrderSoap11" name="OrderSoap11">	
<soap:address	
location="http://localhost:8080/order-handling/services" />	
</wsdl:port>	
</wsdl:service>	
</wsdl:definitions>	




                             Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   10
So?

•  We want Contract First...
•  ...but not with WSDL
•  We mostly care about the data format
•  ...which is defined with XML Schema


•  Spring Web Services lets you focus on the
   XML Schema



   Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   11
WSDL vs. XSD
                                                                   •  34 lines are XSD
<?xml version="1.0" encoding="UTF-8"?>	
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"	
xmlns:sch="http://www.springsource.com/order"	
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"	
xmlns:tns="http://www.springsource.com/order"	
targetNamespace="http://www.springsource.com/order">	




                                                                   •  These actually define the data on the
<wsdl:types>	
<schema xmlns="http://www.w3.org/2001/XMLSchema"	
elementFormDefault="qualified"	
targetNamespace="http://www.springsource.com/order">	
<complexType name="Order">	
<sequence>	



                                                                      wire
<element maxOccurs="1" minOccurs="0" name="express"	
type="boolean" />	
<element maxOccurs="unbounded" minOccurs="1"	
name="order-item" type="tns:OrderElement" />	
</sequence>	
</complexType>	
<complexType name="OrderElement">	



                                                                   •  Easy to deduce from XML sample
<all>	
<element maxOccurs="1" minOccurs="1" name="count"	
nillable="false" type="positiveInteger" />	
<element maxOccurs="1" minOccurs="1" name="item"	
nillable="false" type="string" />	
</all>	



                                                                      messages
</complexType>	
<element name="orderRequest">	
<complexType>	
<sequence>	
<element name="order" type="tns:Order" />	
</sequence>	


                                                                              –  Tool support: XML Spy, Trang, Microsoft XML
</complexType>	
</element>	
<element name="orderResponse">	
<complexType>	
<sequence>	
<element name="result" type="string" />	
</sequence>	
</complexType>	
</element>	
                                                                                 to Schema …
</schema>	




                                                                   •  ...and can be used for POX (Plain Old
</wsdl:types>	
<wsdl:message name="orderResponse">	
<wsdl:part element="tns:orderResponse" name="orderResponse">	
</wsdl:part>	
</wsdl:message>	
<wsdl:message name="orderRequest">	



                                                                      XML) without SOAP as well
<wsdl:part element="tns:orderRequest" name="orderRequest">	
</wsdl:part>	
</wsdl:message>	
<wsdl:portType name="Order">	
<wsdl:operation name="order">	
<wsdl:input message="tns:orderRequest"	
name="orderRequest">	
</wsdl:input>	
<wsdl:output message="tns:orderResponse"	
name="orderResponse">	
</wsdl:output>	
</wsdl:operation>	
</wsdl:portType>	
<wsdl:binding name="OrderSoap11" type="tns:Order">	



                                                                   •  The rest is SOAP binding/ports/
<soap:binding style="document"	
transport="http://schemas.xmlsoap.org/soap/http" />	
<wsdl:operation name="order">	
<soap:operation soapAction="" />	
<wsdl:input name="orderRequest">	



                                                                      operations
<soap:body use="literal" />	
</wsdl:input>	
<wsdl:output name="orderResponse">	
<soap:body use="literal" />	
</wsdl:output>	
</wsdl:operation>	
</wsdl:binding>	



                                                                   •  Can the WSDL be generated?
<wsdl:service name="OrderService">	
<wsdl:port binding="tns:OrderSoap11" name="OrderSoap11">	
<soap:address	
location="http://localhost:8080/order-handling/services" />	
</wsdl:port>	
</wsdl:service>	
</wsdl:definitions>	




                             Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   12
XSD: Domain Types


<schema ...>	
  <complexType name="Order">	
    <sequence>	
      <element name="customer-number" type="integer" />	
      <element name="express" type="boolean" minOccurs="0" />	
      <element name="order-item" type="tns:OrderElement"	
       maxOccurs="unbounded" />	
    </sequence>	                             Note: Optional elements
  </complexType>	                            and positive integers
  <complexType name="OrderElement">	
    <all>	                                   cannot be expressed in
      <element name="count"	                 Java i.e. this is more
       type="positiveInteger" />	
      <element name="item" type="string" />	 expressive
    </all>	
  </complexType>	




       Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   13
XSD: Request and Response
  <element name="orderRequest">	
    <complexType>	
      <sequence>	
        <element name="order" type="tns:Order" />	
      </sequence>	
    </complexType>	
  </element>	
  <element name="orderResponse">	
    <complexType>	
      <sequence>	
        <element name="result" type="string" />	
      </sequence>	
    </complexType>	
  </element>	
</schema>	               WSDL can now be easily                                      generated:
                                                           The operation is essentially defined


    Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   14
Benefits
•  Contract First becomes an option

•  You can define the data format on the wire
   –  Interoperability
   –  Full power of XML Schema


•  You are not tied to SOAP but can also use POX
•  ...potentially with different transport like JMS




    Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   15
How do you handle the
message?
•  Use a Object / XML mapper (OXM)
   –  I.e. JAXB, XStream, ...
•  ...and make the request / response a Java Object
•  Then handle it (much like a controller in MVC)


•  Easy
•  Adapter between external representation and internal
•  Benefit: Decoupling business logic from changes of interface




    Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   16
How do you handle the
message?
•  Class for Endpoint needs only some annotations
•  Will be instantiated as a Spring Bean
•  (Almost) no Spring configuration needed (Spring!=XML)
•  ...but can be done in XML as well
•  Spring==Freedom of Choice
@Endpoint	
public class OrderEndpoint {	
   @PayloadRoot(localPart = "orderRequest",	
    namespace = "http://www.springsource.com/order")	
   public OrderResponse handleOrder(OrderRequest req) {	
   ...	
   }	
}




     Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   17
Problems...

•  Robustness Principle (aka Postel’s Law):
  –  Be conservative in what you do; be liberal in what
     you accept from others.
  –  I.e. try to accept every message sent to you
  –  I.e. only require the data filled that you really need
  –  ...but only send complete and totally valid responses
•  Some Object / XML support this
  –  but for some the XML must be deserializable into
     objects




   Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   18
XPath to the Rescue


•  Only needed XML parts are read

@Endpoint	
public class OrderEndpoint {	
   @PayloadRoot(localPart = "orderRequest", 	
    namespace = "http://www.springsource.com/order")	
   public Source handleOrder(	
    @XPathParam("/tns:orderRequest/tns:order/tns:order-item")	
    NodeList orderItemNodeList,	
    @XPathParam("/tns:orderRequest/tns:order/tns:express/text()")	
    Boolean expressAsBoolean,	
    @XPathParam("/tns:orderRequest/tns:order/tns:customer/text()")	
    double customer) {	
      ...	
   }	
}	

        Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   19
Web Services
•  Using Spring Web Services you can...
   –    ...use Contract First without the WSDL overhead
   –    ...decouple the business logic from interface and clients
   –    ...implement robust Web Services using XPath easily
   –    ...or with an Object/XML mapper (less robust but easier)


•  Currently in 1.5.6
   –  1.5 introduced jms-namespace, email transport, JMS
      transport...




    Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   20
Architecture




  Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   21
The core




Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
The core


•  Essentially an integration issues
•  A Batch or JMS online output
•  A Web Services or File input
•  Internal routing and handling


•  Best practice: Pipes and Filter
   –  Pipes transfer messages
   –  ...and store / buffer them
   –  Filter handle them (routing, etc.)


•  Spring Integration supports this

    Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   23
Pipes and Filter:
 Frontend


          Was just
           covered
Web Service                                                                                                               fulfillment



    File                               incomingfile                                                  FileParser




     Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.                 24
Spring Integration
  Configuration for Frontend
<file:inbound-channel-adapter id="incomingfilename"	
 directory="file:/tmp/files">	
  <poller>	
    <interval-trigger interval="1000" />	
  </poller>	
</file:inbound-channel-adapter>	

<file:file-to-string-transformer	
  delete-files="true" input-channel="incomingfilename"	
  output-channel="incomingfile" />	



Web Service polled, file name read
 Directory is                                        fulfillment
 Then content is put as a string in the incomingfile
 channel
   File         incomingfile          FileParser
       Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   25
Parsing the file
@MessageEndpoint	 Class automatically instantiated as a Spring Bean
public class FileParser {	
 @Resource	     MessageChannel with matching name is injected
 private MessageChannel fulfillment;	

 @ServiceActivator(inputChannel =	
   "incomingfile")	                      Method called each
 public void handleFile(String content){	time a message is
   Order order = ...;	                   available on the
   GenericMessage<Order> orderMessage =	 channel incomingfile
    new GenericMessage<Order>(order);	
   fulfillment.send(orderMessage);	
 }	
Web Service                                    fulfillment
}	


     File                               incomingfile                                                 FileParser
        Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   26
Pipes and Filter:
  Backend



This channel has a queue
Further processing is async                                                                  express
                                                                                                                               JMS
                                                                                            fulfillment

                                           FulFillment
  fulfillment
                                             Router

                                                                                               normal                        Normal
                                                                                             fulfillment                    FulFillment


       Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.            27
FulFillmentRouter:
 express or normal?
                     Class automatically instantiated as a Spring Bean

@MessageEndpoint	
public class FulFillmentRouter {	

  @Router(inputChannel="fulfillment")	
  public String routeOrder(Order order) {	
     if (order.isExpress()) {	
        return "expressfulfillment";	
     } else {	
        return "normalfulfillment";	
     }	
  }	
}	
     Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   28
JMS Adapter
for express orders
<beans ...>	
  <bean id="connectionFactory"	
   class="org.apache.activemq.ActiveMQConnectionFactory">	
    ...	
  </bean>	

  <jms:outbound-gateway id="jmsout"	
   request-channel="expressfulfillment"	
   request-destination="fulfillment-queue" />	
</beans>	



 JMS adapter handles JMS replies transparently i.e. they are
 sent to correct Spring Integration response channel
 Adapters allow the integration of external systems
 with FTP, RMI, HttpInvoker, File, Web Services etc.

     Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   29
Database for normal orders

@MessageEndpoint	
public class NormalFulFillment {	

  private OrderDao orderDao;	
  @Autowired	
  public void setOrderDao(OrderDao orderDao) {	
     this.orderDao = orderDao;	
  }	

  @ServiceActivator(inputChannel = "normalfulfillment")	
  public Order execute(Order order) {	
  ...	
  }	
      RendezvousChannel is used to feed back the success
}	    Passed in as reply to header in the message

     Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   30
Other remarks
•  Sending a message can be asynchronous using a queue
•  I.e. a different thread will take it and actually handle it
•  Spring Integration can also be used with:
   –  Plain XML Spring configuration
   –  By setting up the environment with Java


•  Spring Integration is currently in 1.0.2




     Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   31
Architecture




  Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   32
The Order Processing Batch




Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
Batches

•  Typically consists of steps
•  Steps read and write data
•  In this case only one step: Read the orders,
   process them, write them back

•  Typical issues:
  –  Restarts
  –  Optimizations (i.e. commits)
  –  Large volumes of data cannot be loaded at once



   Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   34
How to read the data...

•  Load data using a cursor

•  Alternative: Only read the primary keys
•  Alternative: Load chunks of data
•  No option: Load all data (just too much
   data)




   Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   35
Spring Batch Configuration:
 Processing and Invoices
<job id="fulfillmentjob">	
  <step id="process" next="invoice">	
    <tasklet>	
      <chunk reader="processOrderReader"	
             writer="processOrderWriter"	
             commit-interval="10" />	
    </tasklet>	         •  Commit every 10 items
  </step>	
  <step id="invoice">	
                        •  Commit optimization is transparent
    ... 	               •  Thanks to Spring transaction support
  </step>	
</job>	
                                                                              Store for restarts etc.
<job-repository id="jobRepository" data-source="dataSource"	
transaction-manager="transactionManager" />


      Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   36
Order Reader

<bean id="processOrderReader"	
 class="....JdbcCursorItemReader">	
  <property name="dataSource" ref="dataSource"/>	
  <property name="fetchSize" value="10" />	
  <property name="sql"	
   value="SELECT * FROM T_ORDER WHERE C_PROCESSED=0" />	
  <property name="rowMapper">	
    <bean class="....OrderParameterizedRowMapper"/>	
</property>	
</bean>




                                 Read the data using a database cursor


       Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   37
Order Writer
public class OrderBatchProcess	
 extends AbstractItemStreamItemWriter<Order> {	

  private OrderDao orderDao;	

  @Autowired	
  public void setOrderDao(OrderDao orderDao) {	
     this.orderDao = orderDao;	
  }	

  public void write(List<? extends Order> items) throws Exception {	
     for (Order item : items) {	
        // do the processing	
        item.setProcessed(true);	
                                     •  Just a POJO service
        orderDao.update(item);	      •  Works on a chunk
     }	
  }	

}	
       Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   38
Other features of
Spring Batch
•  More complex batches with dependent steps, validation, etc.
•  Other datasources (i.e. XML files, other files)
•  ...and other targets for the data
•  Can be controlled using JMX
•  Status of job / step instance is automatically persisted
•  Therefore: Easy restart
•  Present jobs is restartable anyway
•  Scalability by Remote Chunking and Partitioning
•  Spring Batch is in 2.0.1




     Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   39
Σ
                    Sum up




Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
Sum up
                              Σ
•  Spring is far more than the Spring Framework
•  Spring Web Services:
   –  Contract first using XML Schema
   –  Robust implementations using XPath
   –  Easy annotation based programming model


•  Spring Integration:
   –  Infrastructure for asynchronous Pipes and Filters including
      Routing etc.
   –  Integration with JMS, Files, XML, databases... available
   –  Annotations, plain Spring XML or plain Java code




    Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   41
Sum up

•  Spring Batch
                             Σ
  –  Easy infrastructure for Batches
  –  Restart etc. included
  –  Monitoring possible




   Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   42
Build
 Run



                                                                 Manage


Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.   43

More Related Content

What's hot

What's hot (20)

Introduction to spring boot
Introduction to spring bootIntroduction to spring boot
Introduction to spring boot
 
MVC Architecture in ASP.Net By Nyros Developer
MVC Architecture in ASP.Net By Nyros DeveloperMVC Architecture in ASP.Net By Nyros Developer
MVC Architecture in ASP.Net By Nyros Developer
 
ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1
 
Cookies and sessions
Cookies and sessionsCookies and sessions
Cookies and sessions
 
Spring Framework - Spring Security
Spring Framework - Spring SecuritySpring Framework - Spring Security
Spring Framework - Spring Security
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
 
Introduction to SOAP
Introduction to SOAPIntroduction to SOAP
Introduction to SOAP
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
 
Http
HttpHttp
Http
 
Node js overview
Node js overviewNode js overview
Node js overview
 
Bootstrap ppt
Bootstrap pptBootstrap ppt
Bootstrap ppt
 
Html JavaScript and CSS
Html JavaScript and CSSHtml JavaScript and CSS
Html JavaScript and CSS
 
SOAP-based Web Services
SOAP-based Web ServicesSOAP-based Web Services
SOAP-based Web Services
 
Web api
Web apiWeb api
Web api
 
javaScript.ppt
javaScript.pptjavaScript.ppt
javaScript.ppt
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
MongoDB
MongoDBMongoDB
MongoDB
 
Introduction à JPA (Java Persistence API )
Introduction à JPA  (Java Persistence API )Introduction à JPA  (Java Persistence API )
Introduction à JPA (Java Persistence API )
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Spring boot
Spring bootSpring boot
Spring boot
 

Viewers also liked

Atlanta JUG - Integrating Spring Batch and Spring Integration
Atlanta JUG - Integrating Spring Batch and Spring IntegrationAtlanta JUG - Integrating Spring Batch and Spring Integration
Atlanta JUG - Integrating Spring Batch and Spring IntegrationGunnar Hillert
 
Enterprise Integration Patterns with Spring integration!
Enterprise Integration Patterns with Spring integration!Enterprise Integration Patterns with Spring integration!
Enterprise Integration Patterns with Spring integration!hegdekiranr
 
S2GX 2012 - Introduction to Spring Integration and Spring Batch
S2GX 2012 - Introduction to Spring Integration and Spring BatchS2GX 2012 - Introduction to Spring Integration and Spring Batch
S2GX 2012 - Introduction to Spring Integration and Spring BatchGunnar Hillert
 
Spring tutorial
Spring tutorialSpring tutorial
Spring tutorialmamog
 
Spring tutorial
Spring tutorialSpring tutorial
Spring tutorialPhuong Le
 
Spring Batch - Lessons Learned out of a real life banking system.
Spring Batch - Lessons Learned out of a real life banking system.Spring Batch - Lessons Learned out of a real life banking system.
Spring Batch - Lessons Learned out of a real life banking system.Raffael Schmid
 
Ahea Team Spring batch
Ahea Team Spring batchAhea Team Spring batch
Ahea Team Spring batchSunghyun Roh
 
SQ Lecture Four : Distributing Services & Setting Prices and Implementing Re...
SQ Lecture Four : Distributing Services  & Setting Prices and Implementing Re...SQ Lecture Four : Distributing Services  & Setting Prices and Implementing Re...
SQ Lecture Four : Distributing Services & Setting Prices and Implementing Re...SQAdvisor
 
REST with Spring Boot #jqfk
REST with Spring Boot #jqfkREST with Spring Boot #jqfk
REST with Spring Boot #jqfkToshiaki Maki
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSam Brannen
 
Simplify your integrations with Apache Camel
Simplify your integrations with Apache CamelSimplify your integrations with Apache Camel
Simplify your integrations with Apache CamelKenneth Peeples
 
ActiveMQ 5.9.x new features
ActiveMQ 5.9.x new featuresActiveMQ 5.9.x new features
ActiveMQ 5.9.x new featuresChristian Posta
 
Polyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQPolyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQChristian Posta
 
Get the Most out of Testing with Spring 4.2
Get the Most out of Testing with Spring 4.2Get the Most out of Testing with Spring 4.2
Get the Most out of Testing with Spring 4.2Sam Brannen
 
Microservices with Spring Boot
Microservices with Spring BootMicroservices with Spring Boot
Microservices with Spring BootJoshua Long
 

Viewers also liked (20)

Atlanta JUG - Integrating Spring Batch and Spring Integration
Atlanta JUG - Integrating Spring Batch and Spring IntegrationAtlanta JUG - Integrating Spring Batch and Spring Integration
Atlanta JUG - Integrating Spring Batch and Spring Integration
 
Spring integration
Spring integrationSpring integration
Spring integration
 
Enterprise Integration Patterns with Spring integration!
Enterprise Integration Patterns with Spring integration!Enterprise Integration Patterns with Spring integration!
Enterprise Integration Patterns with Spring integration!
 
S2GX 2012 - Introduction to Spring Integration and Spring Batch
S2GX 2012 - Introduction to Spring Integration and Spring BatchS2GX 2012 - Introduction to Spring Integration and Spring Batch
S2GX 2012 - Introduction to Spring Integration and Spring Batch
 
Spring tutorial
Spring tutorialSpring tutorial
Spring tutorial
 
Spring tutorial
Spring tutorialSpring tutorial
Spring tutorial
 
Spring Batch 2.0
Spring Batch 2.0Spring Batch 2.0
Spring Batch 2.0
 
Spring Batch - Lessons Learned out of a real life banking system.
Spring Batch - Lessons Learned out of a real life banking system.Spring Batch - Lessons Learned out of a real life banking system.
Spring Batch - Lessons Learned out of a real life banking system.
 
Ahea Team Spring batch
Ahea Team Spring batchAhea Team Spring batch
Ahea Team Spring batch
 
SQ Lecture Four : Distributing Services & Setting Prices and Implementing Re...
SQ Lecture Four : Distributing Services  & Setting Prices and Implementing Re...SQ Lecture Four : Distributing Services  & Setting Prices and Implementing Re...
SQ Lecture Four : Distributing Services & Setting Prices and Implementing Re...
 
Spring Batch Introduction
Spring Batch IntroductionSpring Batch Introduction
Spring Batch Introduction
 
REST with Spring Boot #jqfk
REST with Spring Boot #jqfkREST with Spring Boot #jqfk
REST with Spring Boot #jqfk
 
Service
ServiceService
Service
 
Distributing service
Distributing serviceDistributing service
Distributing service
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
 
Simplify your integrations with Apache Camel
Simplify your integrations with Apache CamelSimplify your integrations with Apache Camel
Simplify your integrations with Apache Camel
 
ActiveMQ 5.9.x new features
ActiveMQ 5.9.x new featuresActiveMQ 5.9.x new features
ActiveMQ 5.9.x new features
 
Polyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQPolyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQ
 
Get the Most out of Testing with Spring 4.2
Get the Most out of Testing with Spring 4.2Get the Most out of Testing with Spring 4.2
Get the Most out of Testing with Spring 4.2
 
Microservices with Spring Boot
Microservices with Spring BootMicroservices with Spring Boot
Microservices with Spring Boot
 

Similar to Spring Web Service, Spring Integration and Spring Batch

Global Scale ESB with Mule
Global Scale ESB with MuleGlobal Scale ESB with Mule
Global Scale ESB with MuleAndrew Kennedy
 
Rapid Prototyping with Solr
Rapid Prototyping with SolrRapid Prototyping with Solr
Rapid Prototyping with SolrErik Hatcher
 
Rapid Prototyping with Solr
Rapid Prototyping with SolrRapid Prototyping with Solr
Rapid Prototyping with SolrErik Hatcher
 
SAPS - Semantic AtomPub-based Services
SAPS - Semantic AtomPub-based ServicesSAPS - Semantic AtomPub-based Services
SAPS - Semantic AtomPub-based ServicesMarkus Lanthaler
 
XML Business Rules Validation with Schematron
XML Business Rules Validation with SchematronXML Business Rules Validation with Schematron
XML Business Rules Validation with SchematronEmiel Paasschens
 
#NewMeetup Performance
#NewMeetup Performance#NewMeetup Performance
#NewMeetup PerformanceJustin Cataldo
 
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)Pat Patterson
 
Xsd Basics R&D with ORACLE SOA
Xsd Basics R&D with ORACLE SOAXsd Basics R&D with ORACLE SOA
Xsd Basics R&D with ORACLE SOAprathap kumar
 
PLAT-15 Forms Config, Customization, and Extension
PLAT-15 Forms Config, Customization, and ExtensionPLAT-15 Forms Config, Customization, and Extension
PLAT-15 Forms Config, Customization, and ExtensionAlfresco Software
 

Similar to Spring Web Service, Spring Integration and Spring Batch (20)

Global Scale ESB with Mule
Global Scale ESB with MuleGlobal Scale ESB with Mule
Global Scale ESB with Mule
 
Camel as a_glue
Camel as a_glueCamel as a_glue
Camel as a_glue
 
Rapid Prototyping with Solr
Rapid Prototyping with SolrRapid Prototyping with Solr
Rapid Prototyping with Solr
 
Html5
Html5Html5
Html5
 
Rapid Prototyping with Solr
Rapid Prototyping with SolrRapid Prototyping with Solr
Rapid Prototyping with Solr
 
Ridingapachecamel
RidingapachecamelRidingapachecamel
Ridingapachecamel
 
Xaml programming
Xaml programmingXaml programming
Xaml programming
 
SAPS - Semantic AtomPub-based Services
SAPS - Semantic AtomPub-based ServicesSAPS - Semantic AtomPub-based Services
SAPS - Semantic AtomPub-based Services
 
OOW 2012 XML Business Rules Validation Schematron - Emiel Paasschens
OOW 2012  XML Business Rules Validation Schematron - Emiel PaasschensOOW 2012  XML Business Rules Validation Schematron - Emiel Paasschens
OOW 2012 XML Business Rules Validation Schematron - Emiel Paasschens
 
XML Business Rules Validation with Schematron
XML Business Rules Validation with SchematronXML Business Rules Validation with Schematron
XML Business Rules Validation with Schematron
 
#NewMeetup Performance
#NewMeetup Performance#NewMeetup Performance
#NewMeetup Performance
 
Schematron
SchematronSchematron
Schematron
 
Schemas and soap_prt
Schemas and soap_prtSchemas and soap_prt
Schemas and soap_prt
 
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
 
Xsd Basics R&D with ORACLE SOA
Xsd Basics R&D with ORACLE SOAXsd Basics R&D with ORACLE SOA
Xsd Basics R&D with ORACLE SOA
 
Xsd basics
Xsd basicsXsd basics
Xsd basics
 
Html5 intro
Html5 introHtml5 intro
Html5 intro
 
Steps india technologies
Steps india technologiesSteps india technologies
Steps india technologies
 
Steps india technologies .com
Steps india technologies .comSteps india technologies .com
Steps india technologies .com
 
PLAT-15 Forms Config, Customization, and Extension
PLAT-15 Forms Config, Customization, and ExtensionPLAT-15 Forms Config, Customization, and Extension
PLAT-15 Forms Config, Customization, and Extension
 

More from Eberhard Wolff

Architectures and Alternatives
Architectures and AlternativesArchitectures and Alternatives
Architectures and AlternativesEberhard Wolff
 
The Frontiers of Continuous Delivery
The Frontiers of Continuous DeliveryThe Frontiers of Continuous Delivery
The Frontiers of Continuous DeliveryEberhard Wolff
 
Four Times Microservices - REST, Kubernetes, UI Integration, Async
Four Times Microservices - REST, Kubernetes, UI Integration, AsyncFour Times Microservices - REST, Kubernetes, UI Integration, Async
Four Times Microservices - REST, Kubernetes, UI Integration, AsyncEberhard Wolff
 
Microservices - not just with Java
Microservices - not just with JavaMicroservices - not just with Java
Microservices - not just with JavaEberhard Wolff
 
Deployment - Done Right!
Deployment - Done Right!Deployment - Done Right!
Deployment - Done Right!Eberhard Wolff
 
Data Architecture not Just for Microservices
Data Architecture not Just for MicroservicesData Architecture not Just for Microservices
Data Architecture not Just for MicroservicesEberhard Wolff
 
How to Split Your System into Microservices
How to Split Your System into MicroservicesHow to Split Your System into Microservices
How to Split Your System into MicroservicesEberhard Wolff
 
Microservices and Self-contained System to Scale Agile
Microservices and Self-contained System to Scale AgileMicroservices and Self-contained System to Scale Agile
Microservices and Self-contained System to Scale AgileEberhard Wolff
 
How Small Can Java Microservices Be?
How Small Can Java Microservices Be?How Small Can Java Microservices Be?
How Small Can Java Microservices Be?Eberhard Wolff
 
Data Architecturen Not Just for Microservices
Data Architecturen Not Just for MicroservicesData Architecturen Not Just for Microservices
Data Architecturen Not Just for MicroservicesEberhard Wolff
 
Microservices: Redundancy=Maintainability
Microservices: Redundancy=MaintainabilityMicroservices: Redundancy=Maintainability
Microservices: Redundancy=MaintainabilityEberhard Wolff
 
Self-contained Systems: A Different Approach to Microservices
Self-contained Systems: A Different Approach to MicroservicesSelf-contained Systems: A Different Approach to Microservices
Self-contained Systems: A Different Approach to MicroservicesEberhard Wolff
 
Microservices Technology Stack
Microservices Technology StackMicroservices Technology Stack
Microservices Technology StackEberhard Wolff
 
Software Architecture for Innovation
Software Architecture for InnovationSoftware Architecture for Innovation
Software Architecture for InnovationEberhard Wolff
 
Five (easy?) Steps Towards Continuous Delivery
Five (easy?) Steps Towards Continuous DeliveryFive (easy?) Steps Towards Continuous Delivery
Five (easy?) Steps Towards Continuous DeliveryEberhard Wolff
 
Nanoservices and Microservices with Java
Nanoservices and Microservices with JavaNanoservices and Microservices with Java
Nanoservices and Microservices with JavaEberhard Wolff
 
Microservices: Architecture to Support Agile
Microservices: Architecture to Support AgileMicroservices: Architecture to Support Agile
Microservices: Architecture to Support AgileEberhard Wolff
 
Microservices: Architecture to scale Agile
Microservices: Architecture to scale AgileMicroservices: Architecture to scale Agile
Microservices: Architecture to scale AgileEberhard Wolff
 
Microservices, DevOps, Continuous Delivery – More Than Three Buzzwords
Microservices, DevOps, Continuous Delivery – More Than Three BuzzwordsMicroservices, DevOps, Continuous Delivery – More Than Three Buzzwords
Microservices, DevOps, Continuous Delivery – More Than Three BuzzwordsEberhard Wolff
 

More from Eberhard Wolff (20)

Architectures and Alternatives
Architectures and AlternativesArchitectures and Alternatives
Architectures and Alternatives
 
Beyond Microservices
Beyond MicroservicesBeyond Microservices
Beyond Microservices
 
The Frontiers of Continuous Delivery
The Frontiers of Continuous DeliveryThe Frontiers of Continuous Delivery
The Frontiers of Continuous Delivery
 
Four Times Microservices - REST, Kubernetes, UI Integration, Async
Four Times Microservices - REST, Kubernetes, UI Integration, AsyncFour Times Microservices - REST, Kubernetes, UI Integration, Async
Four Times Microservices - REST, Kubernetes, UI Integration, Async
 
Microservices - not just with Java
Microservices - not just with JavaMicroservices - not just with Java
Microservices - not just with Java
 
Deployment - Done Right!
Deployment - Done Right!Deployment - Done Right!
Deployment - Done Right!
 
Data Architecture not Just for Microservices
Data Architecture not Just for MicroservicesData Architecture not Just for Microservices
Data Architecture not Just for Microservices
 
How to Split Your System into Microservices
How to Split Your System into MicroservicesHow to Split Your System into Microservices
How to Split Your System into Microservices
 
Microservices and Self-contained System to Scale Agile
Microservices and Self-contained System to Scale AgileMicroservices and Self-contained System to Scale Agile
Microservices and Self-contained System to Scale Agile
 
How Small Can Java Microservices Be?
How Small Can Java Microservices Be?How Small Can Java Microservices Be?
How Small Can Java Microservices Be?
 
Data Architecturen Not Just for Microservices
Data Architecturen Not Just for MicroservicesData Architecturen Not Just for Microservices
Data Architecturen Not Just for Microservices
 
Microservices: Redundancy=Maintainability
Microservices: Redundancy=MaintainabilityMicroservices: Redundancy=Maintainability
Microservices: Redundancy=Maintainability
 
Self-contained Systems: A Different Approach to Microservices
Self-contained Systems: A Different Approach to MicroservicesSelf-contained Systems: A Different Approach to Microservices
Self-contained Systems: A Different Approach to Microservices
 
Microservices Technology Stack
Microservices Technology StackMicroservices Technology Stack
Microservices Technology Stack
 
Software Architecture for Innovation
Software Architecture for InnovationSoftware Architecture for Innovation
Software Architecture for Innovation
 
Five (easy?) Steps Towards Continuous Delivery
Five (easy?) Steps Towards Continuous DeliveryFive (easy?) Steps Towards Continuous Delivery
Five (easy?) Steps Towards Continuous Delivery
 
Nanoservices and Microservices with Java
Nanoservices and Microservices with JavaNanoservices and Microservices with Java
Nanoservices and Microservices with Java
 
Microservices: Architecture to Support Agile
Microservices: Architecture to Support AgileMicroservices: Architecture to Support Agile
Microservices: Architecture to Support Agile
 
Microservices: Architecture to scale Agile
Microservices: Architecture to scale AgileMicroservices: Architecture to scale Agile
Microservices: Architecture to scale Agile
 
Microservices, DevOps, Continuous Delivery – More Than Three Buzzwords
Microservices, DevOps, Continuous Delivery – More Than Three BuzzwordsMicroservices, DevOps, Continuous Delivery – More Than Three Buzzwords
Microservices, DevOps, Continuous Delivery – More Than Three Buzzwords
 

Recently uploaded

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 

Recently uploaded (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 

Spring Web Service, Spring Integration and Spring Batch

  • 1. Spring Web Service, Spring Integration and Spring Batch Eberhard Wolff Principal & Regional Director SpringSource Germany Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • 2. About the presentation... •  Take a concrete project... •  How can you solve your problems (using the Spring Portfolio)? •  You will see new Spring technologies in action... •  You will get a different impression about Spring... •  You will see how to do Web Services, EAI... •  ...and even batches Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 2
  • 3. The Case Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • 4. Build an Application •  Should process orders •  Orders may come in as a file •  Or with a web service •  Express orders are processed immediately •  Other orders in a batch at night for the next day Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 4
  • 5. Architecture •  I don't do Model Driven Development –  Sorry, Markus •  I don’t do PowerPoint architectures •  I have something far better... Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 5
  • 6. Architecture Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 6
  • 7. Web Services Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • 8. How you could have done it... •  Generate a service POJO using Java •  Export it via XFire •  Clients use WSDL generated from the interface •  Drawbacks: –  XFire is deprecated and you depend on how it generates the WSDL –  Exposes an interface that might be used internally –  ...and makes it unchangeable because external clients depend on it –  Types like java.util.Map cannot be expressed in WSDL, so work arounds must be used Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 8
  • 9. Contract First •  Contract First: Define the interface before the implementation •  Contract First is the key to interoperability •  Web Services are used for interoperability •  Not using Contract First with Web Services is therefore unwise (almost a contradiction) •  Also good to organize projects –  Decide about the interface –  Start coding the implementation –  ...and the client •  That used to work well for CORBA in the last century... Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 9
  • 10. So let’s use WSDL <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:sch="http://www.springsource.com/order" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.springsource.com/order" targetNamespace="http://www.springsource.com/order"> <wsdl:types> <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" •  Send an order with some targetNamespace="http://www.springsource.com/order"> <complexType name="Order"> <sequence> <element maxOccurs="1" minOccurs="0" name="express" type="boolean" /> <element maxOccurs="unbounded" minOccurs="1" name="order-item" type="tns:OrderElement" /> order items </sequence> </complexType> <complexType name="OrderElement"> <all> <element maxOccurs="1" minOccurs="1" name="count" nillable="false" type="positiveInteger" /> <element maxOccurs="1" minOccurs="1" name="item" nillable="false" type="string" /> •  80 lines of WSDL in Eclipse </all> </complexType> <element name="orderRequest"> <complexType> <sequence> <element name="order" type="tns:Order" /> </sequence> formatting </complexType> </element> <element name="orderResponse"> <complexType> <sequence> <element name="result" type="string" /> </sequence> </complexType> •  Show in 5 point font here </element> </schema> </wsdl:types> <wsdl:message name="orderResponse"> <wsdl:part element="tns:orderResponse" name="orderResponse"> </wsdl:part> </wsdl:message> <wsdl:message name="orderRequest"> <wsdl:part element="tns:orderRequest" name="orderRequest"> </wsdl:part> </wsdl:message> <wsdl:portType name="Order"> <wsdl:operation name="order"> <wsdl:input message="tns:orderRequest" name="orderRequest"> </wsdl:input> <wsdl:output message="tns:orderResponse" •  Just too much code name="orderResponse"> </wsdl:output> </wsdl:operation> </wsdl:portType> <wsdl:binding name="OrderSoap11" type="tns:Order"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="order"> <soap:operation soapAction="" /> <wsdl:input name="orderRequest"> <soap:body use="literal" /> </wsdl:input> <wsdl:output name="orderResponse"> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="OrderService"> <wsdl:port binding="tns:OrderSoap11" name="OrderSoap11"> <soap:address location="http://localhost:8080/order-handling/services" /> </wsdl:port> </wsdl:service> </wsdl:definitions> Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 10
  • 11. So? •  We want Contract First... •  ...but not with WSDL •  We mostly care about the data format •  ...which is defined with XML Schema •  Spring Web Services lets you focus on the XML Schema Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 11
  • 12. WSDL vs. XSD •  34 lines are XSD <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:sch="http://www.springsource.com/order" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.springsource.com/order" targetNamespace="http://www.springsource.com/order"> •  These actually define the data on the <wsdl:types> <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.springsource.com/order"> <complexType name="Order"> <sequence> wire <element maxOccurs="1" minOccurs="0" name="express" type="boolean" /> <element maxOccurs="unbounded" minOccurs="1" name="order-item" type="tns:OrderElement" /> </sequence> </complexType> <complexType name="OrderElement"> •  Easy to deduce from XML sample <all> <element maxOccurs="1" minOccurs="1" name="count" nillable="false" type="positiveInteger" /> <element maxOccurs="1" minOccurs="1" name="item" nillable="false" type="string" /> </all> messages </complexType> <element name="orderRequest"> <complexType> <sequence> <element name="order" type="tns:Order" /> </sequence> –  Tool support: XML Spy, Trang, Microsoft XML </complexType> </element> <element name="orderResponse"> <complexType> <sequence> <element name="result" type="string" /> </sequence> </complexType> </element> to Schema … </schema> •  ...and can be used for POX (Plain Old </wsdl:types> <wsdl:message name="orderResponse"> <wsdl:part element="tns:orderResponse" name="orderResponse"> </wsdl:part> </wsdl:message> <wsdl:message name="orderRequest"> XML) without SOAP as well <wsdl:part element="tns:orderRequest" name="orderRequest"> </wsdl:part> </wsdl:message> <wsdl:portType name="Order"> <wsdl:operation name="order"> <wsdl:input message="tns:orderRequest" name="orderRequest"> </wsdl:input> <wsdl:output message="tns:orderResponse" name="orderResponse"> </wsdl:output> </wsdl:operation> </wsdl:portType> <wsdl:binding name="OrderSoap11" type="tns:Order"> •  The rest is SOAP binding/ports/ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="order"> <soap:operation soapAction="" /> <wsdl:input name="orderRequest"> operations <soap:body use="literal" /> </wsdl:input> <wsdl:output name="orderResponse"> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> •  Can the WSDL be generated? <wsdl:service name="OrderService"> <wsdl:port binding="tns:OrderSoap11" name="OrderSoap11"> <soap:address location="http://localhost:8080/order-handling/services" /> </wsdl:port> </wsdl:service> </wsdl:definitions> Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 12
  • 13. XSD: Domain Types <schema ...> <complexType name="Order"> <sequence> <element name="customer-number" type="integer" /> <element name="express" type="boolean" minOccurs="0" /> <element name="order-item" type="tns:OrderElement" maxOccurs="unbounded" /> </sequence> Note: Optional elements </complexType> and positive integers <complexType name="OrderElement"> <all> cannot be expressed in <element name="count" Java i.e. this is more type="positiveInteger" /> <element name="item" type="string" /> expressive </all> </complexType> Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 13
  • 14. XSD: Request and Response <element name="orderRequest"> <complexType> <sequence> <element name="order" type="tns:Order" /> </sequence> </complexType> </element> <element name="orderResponse"> <complexType> <sequence> <element name="result" type="string" /> </sequence> </complexType> </element> </schema> WSDL can now be easily generated: The operation is essentially defined Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 14
  • 15. Benefits •  Contract First becomes an option •  You can define the data format on the wire –  Interoperability –  Full power of XML Schema •  You are not tied to SOAP but can also use POX •  ...potentially with different transport like JMS Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 15
  • 16. How do you handle the message? •  Use a Object / XML mapper (OXM) –  I.e. JAXB, XStream, ... •  ...and make the request / response a Java Object •  Then handle it (much like a controller in MVC) •  Easy •  Adapter between external representation and internal •  Benefit: Decoupling business logic from changes of interface Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 16
  • 17. How do you handle the message? •  Class for Endpoint needs only some annotations •  Will be instantiated as a Spring Bean •  (Almost) no Spring configuration needed (Spring!=XML) •  ...but can be done in XML as well •  Spring==Freedom of Choice @Endpoint public class OrderEndpoint { @PayloadRoot(localPart = "orderRequest", namespace = "http://www.springsource.com/order") public OrderResponse handleOrder(OrderRequest req) { ... } } Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 17
  • 18. Problems... •  Robustness Principle (aka Postel’s Law): –  Be conservative in what you do; be liberal in what you accept from others. –  I.e. try to accept every message sent to you –  I.e. only require the data filled that you really need –  ...but only send complete and totally valid responses •  Some Object / XML support this –  but for some the XML must be deserializable into objects Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 18
  • 19. XPath to the Rescue •  Only needed XML parts are read @Endpoint public class OrderEndpoint { @PayloadRoot(localPart = "orderRequest", namespace = "http://www.springsource.com/order") public Source handleOrder( @XPathParam("/tns:orderRequest/tns:order/tns:order-item") NodeList orderItemNodeList, @XPathParam("/tns:orderRequest/tns:order/tns:express/text()") Boolean expressAsBoolean, @XPathParam("/tns:orderRequest/tns:order/tns:customer/text()") double customer) { ... } } Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 19
  • 20. Web Services •  Using Spring Web Services you can... –  ...use Contract First without the WSDL overhead –  ...decouple the business logic from interface and clients –  ...implement robust Web Services using XPath easily –  ...or with an Object/XML mapper (less robust but easier) •  Currently in 1.5.6 –  1.5 introduced jms-namespace, email transport, JMS transport... Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 20
  • 21. Architecture Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 21
  • 22. The core Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • 23. The core •  Essentially an integration issues •  A Batch or JMS online output •  A Web Services or File input •  Internal routing and handling •  Best practice: Pipes and Filter –  Pipes transfer messages –  ...and store / buffer them –  Filter handle them (routing, etc.) •  Spring Integration supports this Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 23
  • 24. Pipes and Filter: Frontend Was just covered Web Service fulfillment File incomingfile FileParser Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 24
  • 25. Spring Integration Configuration for Frontend <file:inbound-channel-adapter id="incomingfilename" directory="file:/tmp/files"> <poller> <interval-trigger interval="1000" /> </poller> </file:inbound-channel-adapter> <file:file-to-string-transformer delete-files="true" input-channel="incomingfilename" output-channel="incomingfile" /> Web Service polled, file name read Directory is fulfillment Then content is put as a string in the incomingfile channel File incomingfile FileParser Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 25
  • 26. Parsing the file @MessageEndpoint Class automatically instantiated as a Spring Bean public class FileParser { @Resource MessageChannel with matching name is injected private MessageChannel fulfillment; @ServiceActivator(inputChannel = "incomingfile") Method called each public void handleFile(String content){ time a message is Order order = ...; available on the GenericMessage<Order> orderMessage = channel incomingfile new GenericMessage<Order>(order); fulfillment.send(orderMessage); } Web Service fulfillment } File incomingfile FileParser Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 26
  • 27. Pipes and Filter: Backend This channel has a queue Further processing is async express JMS fulfillment FulFillment fulfillment Router normal Normal fulfillment FulFillment Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 27
  • 28. FulFillmentRouter: express or normal? Class automatically instantiated as a Spring Bean @MessageEndpoint public class FulFillmentRouter { @Router(inputChannel="fulfillment") public String routeOrder(Order order) { if (order.isExpress()) { return "expressfulfillment"; } else { return "normalfulfillment"; } } } Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 28
  • 29. JMS Adapter for express orders <beans ...> <bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"> ... </bean> <jms:outbound-gateway id="jmsout" request-channel="expressfulfillment" request-destination="fulfillment-queue" /> </beans> JMS adapter handles JMS replies transparently i.e. they are sent to correct Spring Integration response channel Adapters allow the integration of external systems with FTP, RMI, HttpInvoker, File, Web Services etc. Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 29
  • 30. Database for normal orders @MessageEndpoint public class NormalFulFillment { private OrderDao orderDao; @Autowired public void setOrderDao(OrderDao orderDao) { this.orderDao = orderDao; } @ServiceActivator(inputChannel = "normalfulfillment") public Order execute(Order order) { ... } RendezvousChannel is used to feed back the success } Passed in as reply to header in the message Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 30
  • 31. Other remarks •  Sending a message can be asynchronous using a queue •  I.e. a different thread will take it and actually handle it •  Spring Integration can also be used with: –  Plain XML Spring configuration –  By setting up the environment with Java •  Spring Integration is currently in 1.0.2 Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 31
  • 32. Architecture Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 32
  • 33. The Order Processing Batch Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • 34. Batches •  Typically consists of steps •  Steps read and write data •  In this case only one step: Read the orders, process them, write them back •  Typical issues: –  Restarts –  Optimizations (i.e. commits) –  Large volumes of data cannot be loaded at once Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 34
  • 35. How to read the data... •  Load data using a cursor •  Alternative: Only read the primary keys •  Alternative: Load chunks of data •  No option: Load all data (just too much data) Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 35
  • 36. Spring Batch Configuration: Processing and Invoices <job id="fulfillmentjob"> <step id="process" next="invoice"> <tasklet> <chunk reader="processOrderReader" writer="processOrderWriter" commit-interval="10" /> </tasklet> •  Commit every 10 items </step> <step id="invoice"> •  Commit optimization is transparent ... •  Thanks to Spring transaction support </step> </job> Store for restarts etc. <job-repository id="jobRepository" data-source="dataSource" transaction-manager="transactionManager" /> Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 36
  • 37. Order Reader <bean id="processOrderReader" class="....JdbcCursorItemReader"> <property name="dataSource" ref="dataSource"/> <property name="fetchSize" value="10" /> <property name="sql" value="SELECT * FROM T_ORDER WHERE C_PROCESSED=0" /> <property name="rowMapper"> <bean class="....OrderParameterizedRowMapper"/> </property> </bean> Read the data using a database cursor Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 37
  • 38. Order Writer public class OrderBatchProcess extends AbstractItemStreamItemWriter<Order> { private OrderDao orderDao; @Autowired public void setOrderDao(OrderDao orderDao) { this.orderDao = orderDao; } public void write(List<? extends Order> items) throws Exception { for (Order item : items) { // do the processing item.setProcessed(true); •  Just a POJO service orderDao.update(item); •  Works on a chunk } } } Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 38
  • 39. Other features of Spring Batch •  More complex batches with dependent steps, validation, etc. •  Other datasources (i.e. XML files, other files) •  ...and other targets for the data •  Can be controlled using JMX •  Status of job / step instance is automatically persisted •  Therefore: Easy restart •  Present jobs is restartable anyway •  Scalability by Remote Chunking and Partitioning •  Spring Batch is in 2.0.1 Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 39
  • 40. Σ Sum up Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.
  • 41. Sum up Σ •  Spring is far more than the Spring Framework •  Spring Web Services: –  Contract first using XML Schema –  Robust implementations using XPath –  Easy annotation based programming model •  Spring Integration: –  Infrastructure for asynchronous Pipes and Filters including Routing etc. –  Integration with JMS, Files, XML, databases... available –  Annotations, plain Spring XML or plain Java code Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 41
  • 42. Sum up •  Spring Batch Σ –  Easy infrastructure for Batches –  Restart etc. included –  Monitoring possible Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 42
  • 43. Build
 Run
 Manage
 Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 43