Upload
andrew-chalkley
View
1.863
Download
4
Tags:
Embed Size (px)
Citation preview
www.opencredo.com
Spring Integration 1.0.X and whats coming in 2.0
Jonas Partner OpenCredo Principle Consultant
Spring Integration Committer
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Agenda
• Enterprise Integration Patterns• Why Spring Integration• What Spring Integration provides• Whats new in SI 2.0• Questions
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Enterprise Integration Patterns
• Book by Gregor Hohpe and Bobby Wolf• Documents
– Styles of Integration database, file, messages and channels
– Patterns• Splitter• Router• Transformer
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Messages
Generic package for data (the Message payload) that can be transported via channels
Headers provide information to other components that consume from channelsSequence Number
Sequence Size
...
Headers
Payload
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Channels
Channels deliver messages from producers to consumers
Producer Channel Consumer
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Why use messaging 1/2
• Louse coupling– Localise impact of changes– Improve separation of concerns
• Easy Interception– Mediation– Filtering– Reroute
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Why use messaging 2/2
• Performance– Less blocking since async– Efficient use of resources
• Threads• DB Connections
– More effective use of multi core processors
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Agenda
• Enterprise Integration Patterns• Why Spring Integration• What Spring Integration provides• Whats new in SI 2.0• Questions
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Why Spring Integration
• Spring goodness in the integration space– Light weight, not a server– Non invasive POJO programming model– Builds on strong foundation, Spring
• Reusable Enterprise Integration Pattern implementations
• Message and Channel approach useful for non integration applications
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Light Weight
• Spring Integration != Spring ESB• Simply components in applications context
– Wiring together through dependency injection– Channels beans, adapters beans ...– Follows application context lifecycle
• Simple adoption
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Agenda
• Why Spring Integration• Enterprise Integration Patterns• Spring Integration provides
– Enterprise Integration Patterns implementation
– Message and Channel framework– Adapters
• Whats new
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Transformer
@Transformer public Document convert(Document doc){ return convertToNewFormat(doc); }
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Splitter
@Splitter public List<Document> orderItems(Document doc){
return splitOrder(doc); }
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Router
@Router public String resolveDrinkChannel(Drink drink) {
return (drink.isIced()) ? "coldDrinks" : "hotDrinks"; }
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Chain
<chain input-channel="input" output-channel="output"> <filter ref="someSelector" throw-exception-on-rejection="true"/> <header-enricher error-channel="customErrorChannel"> <header name="foo" value="bar"/> </header-enricher> <service-activator ref="someService" method="someMethod"/> </chain>
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Agenda
• Why Spring Integration• Enterprise Integration Patterns• Spring Integration provides
– Enterprise Integration Patterns implementation
– Message and Channel framework– Adapters
• Whats new
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Adapter
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Current Adapters
• JMS• RMI• Http Invoker• HTTP• File• Spring Web Services• Mail Spring Application Events
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Agenda
• Why Spring Integration• Enterprise Integration Patterns• Spring Integration provides
– Enterprise Integration Patterns implementation
– Message and Channel framework– Adapters
• Whats new in 2.0
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Spring Integration 2.0 1/2
• Due late this year– JDBC– Twitter??– Suggestions/requests/contributions
• Improved testing framework• Spring 3.0 expression language
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Spring Integration 2.0 2/2
• XQuery• JMS Backed channel (not an adapter)• Other patterns
– Claim Check– Scatter Gather– Process Manager....
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Also Spring Extensions
• Home to FTP adapters and other contributions – http://www.springsource.org/extensions/
se-sia• Spring Integration .Net
– http://www.springsource.org/extensions/se-springintegration-net
– Nearly a port of java.util.concurrent http://www.springsource.org/extensions/se-threading-net
Tuesday, 20 October 2009
© 2009 Open Credo Ltd www.opencredo.com
Questions and the usual book plug
Tuesday, 20 October 2009