Servicemix 3.х
Сервисная шина ESB

                     Евгений Холодков
                     devclub.eu 23.04.09
Servicemix глазами клиентов
Servicemix глазами архитектора
Java Business Integration (JBI)
Servicemix глазами разработчика

• XML                                                                • Java
<beans xmlns:...
Mvn генерирует/управляет кодом


mvn archetype:create
 -DarchetypeGroupId=org.apache.servicemix.tooling
 -DarchetypeArtifa...
Бизнес-процесс (1/2)
Бизнес-процесс (2/2)
Процесс в servicemix-e
Еще один пример
Servicemix-http компонент
Consumer                                  Provider
<http:endpoint                            <ht...
Servicemix-saxon компонент

<beans xmlns:saxon=quot;http://servicemix.apache.org/saxon/1.0quot;
       xmlns:test=quot;htt...
Servicemix-EIP компонент
•   Content-Based Router
•   Message Filter
•   Pipeline
•   Static Recipient List
•   Static Rou...
Паттерн content-based routing
<eip:content-based-router service=quot;test:routerquot; endpoint=quot;endpointquot;>
 <eip:r...
Паттерн routing-slip
<eip:static-routing-slip service=quot;test:routingSlipquot; endpoint=quot;endpointquot;>
 <eip:target...
Servicemix-camel компонент
<!-- the JBI container -->
 <sm:container id=quot;jbiContainerquot; embedded=quot;truequot;>
  ...
Интеграционное тестирование

• Wire Tap




• SoapUI
Развертывание

• SA = jar файл
• Standalone vs web application
Итог
• Активно развивающийся ESB с открытым
  кодом
• Использует модульную JBI архитектуру
• Активно использует Maven 2
• ...
Upcoming SlideShare
Loading in …5
×

Devclub Servicemix Jevgeni Holodkov 23 04 09

1,151 views
1,070 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,151
On SlideShare
0
From Embeds
0
Number of Embeds
257
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Devclub Servicemix Jevgeni Holodkov 23 04 09

  1. 1. Servicemix 3.х Сервисная шина ESB Евгений Холодков devclub.eu 23.04.09
  2. 2. Servicemix глазами клиентов
  3. 3. Servicemix глазами архитектора
  4. 4. Java Business Integration (JBI)
  5. 5. Servicemix глазами разработчика • XML • Java <beans xmlns:jms=quot;http://servicemix.apache.org/jms/1.0quot; public class InsuranceJMSMarshaler extends DefaultConsumerMarshaler { xmlns:esb=quot;http://esbinaction.com/insurancequot;> <classpath> protected void populateMessage(Message message, <location>.</location> NormalizedMessage normalizedMessage) throws Exception { ...... if (message instanceof ObjectMessage) { <location>wstx-asl.jar</location> ObjectMessage objectMessage = (ObjectMessage) message; <location>xpp3.jar</location> Object payload = objectMessage.getObject(); </classpath> Source source = JiBXUtil.marshalDocument(payload, quot;UTF-8quot;); <jms:consumer service=quot;esb:insuranceReceiverquot; normalizedMessage.setContent(source); endpoint=quot;jmsEndpoint“ targetService=quot;esb:insuranceDSLRouterquot; } else { destinationName=quot;insurance.in“ throw new UnsupportedOperationException(quot;JMS message is not a connectionFactory=quot;#connectionFactoryquot; ObjectMessagequot;); marshaler=quot;#InsuranceJMSMarshalerquot;/> } <bean id=quot;InsuranceJMSMarshalerquot; } class=quot;esb.dzone.servicemix.util.InsuranceJMSMarshalerquot;/> } <bean id=quot;connectionFactoryquot; class=quot;org.apache.activemq.ActiveMQConnectionFactoryquot;> <property name=quot;brokerURLquot; value=quot;tcp://localhost:61616quot; /> </bean> </beans>
  6. 6. Mvn генерирует/управляет кодом mvn archetype:create -DarchetypeGroupId=org.apache.servicemix.tooling -DarchetypeArtifactId=servicemix-http-provider-service-unit -DgroupId=org.apache.servicemix.samples -DartifactId=servicemix-example
  7. 7. Бизнес-процесс (1/2)
  8. 8. Бизнес-процесс (2/2)
  9. 9. Процесс в servicemix-e
  10. 10. Еще один пример
  11. 11. Servicemix-http компонент Consumer Provider <http:endpoint <http:endpoint service=quot;test:MyProviderServicequot; service=quot;test:MyConsumerServicequot; endpoint=quot;myProviderquot; targetService=quot;test:MyServiceRoutin role=quot;providerquot; gSlipquot; locationURI=quot;http://localhost:8080/ endpoint=quot;myConsumer“ MyServicequot; role=quot;consumerquot; soapVersion=quot;1.1quot; /> locationURI=quot;http://localhost:8192/S ervice/quot; defaultMep=quot;http://www.w3.org/20 04/08/wsdl/in-outquot; soapVersion=quot;1.1quot; wsdlResource=quot;classpath:MyService. wsdlquot; />
  12. 12. Servicemix-saxon компонент <beans xmlns:saxon=quot;http://servicemix.apache.org/saxon/1.0quot; xmlns:test=quot;http://www.mycompany.com/1.0quot;> <saxon:xslt service=quot;test:myTransformquot; endpoint=quot;myEndpointquot; resource=quot;classpath:transform.xslquot; /> </beans>
  13. 13. Servicemix-EIP компонент • Content-Based Router • Message Filter • Pipeline • Static Recipient List • Static Routing Slip • Wire Tap • XPath Splitter • Aggregator • Content Enricher • Resequencer • AsyncBridge
  14. 14. Паттерн content-based routing <eip:content-based-router service=quot;test:routerquot; endpoint=quot;endpointquot;> <eip:rules> <eip:routing-rule> <eip:predicate> <eip:xpath-predicate xpath=quot;count(/test:echo) = 1quot; namespaceContext=quot;#nsContextquot; /> </eip:predicate> <eip:target> <eip:exchange-target uri=quot;endpoint:http://test/pipeline/endpointquot; /> </eip:target> </eip:routing-rule> <eip:routing-rule> <!-- there is no predicate, so this is the default destination --> <eip:target> <eip:exchange-target service=quot;test:recipientsquot; /> </eip:target> </eip:routing-rule> </eip:rules> </eip:content-based-router>
  15. 15. Паттерн routing-slip <eip:static-routing-slip service=quot;test:routingSlipquot; endpoint=quot;endpointquot;> <eip:targets> <eip:exchange-target service=quot;test:transformRequestquot; /> <eip:exchange-target service=quot;test:myProviderquot; /> <eip:exchange-target service=quot;test: transformResponsequot; /> </eip:targets> </eip:static-routing-slip>
  16. 16. Servicemix-camel компонент <!-- the JBI container --> <sm:container id=quot;jbiContainerquot; embedded=quot;truequot;> <sm:components> <ref id=quot;jbiquot; /> </sm:components> <sm:endpoints> <bean:endpoint service=quot;myproject:trackerquot; endpoint=quot;trackerquot; bean=quot;#trackerquot; /> </sm:endpoints> </sm:container> <bean id=quot;jbiquot; class=quot;org.apache.servicemix.camel.CamelJbiComponentquot; /> <camelContext id=quot;camelContextquot; useJmx=quot;truequot; xmlns=quot;http://activemq.apache.org/camel/schema/springquot;> <package>my.project.routeBuilders</package> </camelContext>
  17. 17. Интеграционное тестирование • Wire Tap • SoapUI
  18. 18. Развертывание • SA = jar файл • Standalone vs web application
  19. 19. Итог • Активно развивающийся ESB с открытым кодом • Использует модульную JBI архитектуру • Активно использует Maven 2 • Интегрирован со Spring-ом • Содержит много готовых компонентов

×