Spring Integration

2,190 views

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,190
On SlideShare
0
From Embeds
0
Number of Embeds
134
Actions
Shares
0
Downloads
46
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Spring Integration

  1. 1. Spring Integration 1.0.X and whats coming in 2.0 Jonas Partner OpenCredo Principle Consultant Spring Integration Committer www.opencredo.com Tuesday, 20 October 2009
  2. 2. Agenda • Enterprise Integration Patterns • Why Spring Integration • What Spring Integration provides • Whats new in SI 2.0 • Questions © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009
  3. 3. Enterprise Integration Patterns • Book by Gregor Hohpe and Bobby Wolf • Documents – Styles of Integration database, file, messages and channels – Patterns • Splitter • Router • Transformer © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009
  4. 4. Messages Generic package for data (the Message payload) that can be transported via channels Headers provide information to other components that consume from channels Sequence Number Headers Sequence Size ... Payload © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009
  5. 5. Channels Channels deliver messages from producers to consumers Producer Channel Consumer © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009
  6. 6. Why use messaging 1/2 • Louse coupling – Localise impact of changes – Improve separation of concerns • Easy Interception – Mediation – Filtering – Reroute © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009
  7. 7. Why use messaging 2/2 • Performance – Less blocking since async – Efficient use of resources • Threads • DB Connections – More effective use of multi core processors © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009
  8. 8. Agenda • Enterprise Integration Patterns • Why Spring Integration • What Spring Integration provides • Whats new in SI 2.0 • Questions © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009
  9. 9. 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 © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009
  10. 10. 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 © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009
  11. 11. Agenda • Why Spring Integration • Enterprise Integration Patterns • Spring Integration provides – Enterprise Integration Patterns implementation – Message and Channel framework – Adapters • Whats new © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009
  12. 12. Transformer @Transformer public Document convert(Document doc){ return convertToNewFormat(doc); } © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009
  13. 13. Splitter @Splitter public List<Document> orderItems(Document doc){ return splitOrder(doc); } © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009
  14. 14. Router @Router public String resolveDrinkChannel(Drink drink) { return (drink.isIced()) ? "coldDrinks" : "hotDrinks"; } © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009
  15. 15. 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> © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009
  16. 16. Agenda • Why Spring Integration • Enterprise Integration Patterns • Spring Integration provides – Enterprise Integration Patterns implementation – Message and Channel framework – Adapters • Whats new © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009
  17. 17. Adapter © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009
  18. 18. Current Adapters • JMS • RMI • Http Invoker • HTTP • File • Spring Web Services • Mail Spring Application Events © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009
  19. 19. Agenda • Why Spring Integration • Enterprise Integration Patterns • Spring Integration provides – Enterprise Integration Patterns implementation – Message and Channel framework – Adapters • Whats new in 2.0 © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009
  20. 20. Spring Integration 2.0 1/2 • Due late this year – JDBC – Twitter?? – Suggestions/requests/contributions • Improved testing framework • Spring 3.0 expression language © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009
  21. 21. Spring Integration 2.0 2/2 • XQuery • JMS Backed channel (not an adapter) • Other patterns – Claim Check – Scatter Gather – Process Manager.... © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009
  22. 22. 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 © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009
  23. 23. Questions and the usual book plug © 2009 Open Credo Ltd www.opencredo.com Tuesday, 20 October 2009

×