Your SlideShare is downloading. ×
ServiceMix 4 -- Integrating OSGi with JBI
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

ServiceMix 4 -- Integrating OSGi with JBI

12,069
views

Published on

Published in: Technology

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

No Downloads
Views
Total Views
12,069
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
410
Comments
0
Likes
13
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Transcript

    • 1. ServiceMix 4 Integrating JBI with OSGi
    • 2. Overview
      • Recent releases
        • Apache ServiceMix 3.2, 3.3 and 4.0.0
      • Dissecting ServiceMix 4.0.0
        • ServiceMix Kernel
        • ServiceMix NMR and JBI
      • Getting involved?
    • 3. Recent releases
      • Recent releases
        • ServiceMix 3.2.x
        • ServiceMix 3.3.x
          • why separate components?
        • ServiceMix 4.x
          • why a new container?
    • 4. ServiceMix 3.2.x
      • ServiceMix 3.2.x
        • JBI container and components in one release
    • 5. ServiceMix 3.3.x
      • ServiceMix 3.3.1
        • JBI Container version 3.3.1
        • JBI Components version 2009.01
    • 6. ServiceMix 3.3.x – Component versioning
      • Rationale for separate components versioning
        • share component between ServiceMix 3.x and 4.x containers
        • ensure container independence
          • build using JBI API and shared library
          • be able to test/run in both containers (as well as other JBI containers)‏
        • ease migration from 3.x to 4.x
    • 7. ServiceMix 4.x
      • ServiceMix 4.0.0 and beyond
        • Modular OSGi-based container
          • ServiceMix Kernel, ServiceMix NMR
        • JBI Components version 2009.01
    • 8. So what?
      • We started with a JBI container and components...
      • ...and we ended with one
      • Why should I care?
    • 9. Dissecting ServiceMix 4
    • 10. Dissecting ServiceMix 4
      • ServiceMix Kernel
        • overview of features
        • example: create a Camel container
      • ServiceMix NMR
        • NMR features
        • example: NMR for loosely-coupled integration
        • JBI features
        • example: OSGi packaging for JBI
    • 11. ServiceMix Kernel
    • 12. ServiceMix Kernel
      • A flexible OSGi-based server runtime
      • Features:
        • easy-to-use provisioning
        • hot-deployment
        • Spring integration
        • powerful command shell, available over ssh
        • JMX management
        • container-level locking
        • ...
    • 13. ServiceMix Kernel
      • A flexible OSGi-based server runtime
      • Features:
        • easy-to-use provisioning
        • hot-deployment
        • Spring integration
        • powerful command shell, available over ssh
        • JMX management
        • container-level locking
        • ...
      Apache Felix Karaf
    • 14. ServiceMix Kernel – Console
      • Console
        • Management of ServiceMix Kernel
          • locally when running ServiceMix Kernel
          • remotely using SSH connection
        • <subshell>/<command> syntax
          • Just a few examples
            • OSGi bundle management: osgi/list,headers,install, ...
            • OSGI ConfigAdmin: config/list,edit,update, ...
            • file-system access: ls, cp, rm, mv, ...
          • With UNIX-like utilities, pipes, globbing, ...
    • 15. ServiceMix Kernel – Console Find, stop and restart a JAAS bundle smx@root:/> osgi/list | grep JAAS [ 21] [Active ] [Started] [ 30] JAAS Config (1.2.0.SNAPSHOT)‏ [ 29] [Active ] [Started] [ 30] JAAS Modules (1.2.0.SNAPSHOT)‏ smx@root:/> osgi/stop 29 smx@root:/> osgi/start 29 Update the SSH port configuration smx@root:/> config/edit org.apache.servicemix.shell smx@root:/> config/propset sshPort 8100 smx@root:/> config/update Create, start and manage a second instance smx@root:/> admin/create slave Creating new instance on port 8102 at: C:<smx_home>instancesslave Creating dir: C:<smx_home>instancesslavein ... smx@root:/> admin/start slave smx@root:/> admin/list Port State Pid Name [ 8102] [Starting] [ 5896] slave
    • 16. ServiceMix Kernel - Features
      • Features
        • Karaf-specific way for installing applications
          • install the bundle
          • add configuration defaults
        • Using the command shell or JMX
      smx@root:/> features/addUrl mvn:org.apache.servicemix/apache-servicemix/4.0.0/xml/features smx@root:/> features/install web smx@root:/> features/install activemq
    • 17. Apache ServiceMix Kernel - Hot-deployment
      • Hot-deployment
        • uses the deploy directory
        • allows deployment of
          • bundles
          • features descriptors
          • Spring XML files
        • extensible mechanism
          • deploy WAR files with web feature installed
          • deploy JBI artifactswith ServiceMix JBI laye r
    • 18. Apache ServiceMix Kernel – Spring integration
      • Spring integration
        • automatically load and start Spring context
          • from a plain XML file
          • from a bundle containing XML files in the META-INF/spring folder
        • Spring DM support for OSGi interaction
          • ConfigAdmin
          • Service Registry
    • 19. ServiceMix Kernel – Camel Example
      • Example: Use ServiceMix Kernel for Camel
        • Add the features descriptor url
        • Install the camel-osgi features...
        • … and any other camel component you need
      smx@root:/> features/addUrl mvn:org.apache.camel.karaf/features/2.0-SNAPSHOT/xml/features smx@root:/> features/install camel-osgi smx@root:/> features/install camel-ftp
    • 20. ServiceMix Kernel – Camel Example
      • Now, create this XML file in the deploy directory
      <? xml version = &quot;1.0&quot; ?> < beans xmlns = &quot;http://www.springframework.org/schema/beans&quot; xmlns:xsi = &quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation = &quot; http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd&quot; > < camelContext xmlns = &quot;http://camel.apache.org/schema/spring&quot; > < route > < from uri = &quot;ftp://gertv@ftp.smx.eu/orders?password=secret&quot; /> < to uri = &quot;file:/home/orders/in&quot; /> </ route > </ camelContext > </ beans >
    • 21. ServiceMix NMR/JBI
      • Using ServiceMix Kernel to build a JBI container
      • We are using a 2 layer solution
        • NMR API for messaging
        • JBI specification implementation
    • 22. ServiceMix NMR
    • 23. ServiceMix NMR
      • ServiceMix 4 NMR
        • easy to use messaging API (Exchange, Message, Endpoint, ...)‏
        • handles XML and POJO payloads
        • listener interfaces to monitor the NMR (ExchangeListener, EndpointListener, …)‏
        • support for wiring endpoints and intercepting exchanges
        • command shell for managing the NMR
    • 24. ServiceMix NMR
      • ServiceMix 4 NMR
        • installable as a ServiceMix Kernel feature
        • You can use it for loosely coupled integration
          • Camel routes
          • CXF web services
          • … add anything else yourself here
        • We use it to build our JBI integration layer
    • 25. ServiceMix NMR < beans xmlns = &quot;http://www.springframework.org/schema/beans&quot; xmlns:xsi = &quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation = &quot;...&quot; > < import resource = &quot;classpath:org/apache/servicemix/camel/nmr/camel-nmr.xml&quot; /> < camelContext xmlns = &quot;http://camel.apache.org/schema/spring&quot; > < route > < from uri = &quot;ftp://gertv@ftp.smx.eu/orders?password=secret&quot; /> < to uri = &quot;nmr:IncomingOrders&quot; /> </ route > <!-- the second route can be in another bundle --> < route > < from uri = &quot;nmr:IncomingOrders&quot; /> < to uri = &quot;file:/home/orders/in&quot; /> </ route > </ camelContext > </ beans >
    • 26. ServiceMix JBI
    • 27. ServiceMix JBI
      • ServiceMix 4 JBI
        • installable as a ServiceMix Kernel feature
        • runs on top of ServiceMix NMR
        • it adds
          • JBI Messaging API
          • JBI Deployment and packaging
          • JBI Management Mbeans
    • 28. ServiceMix JBI
      • ServiceMix 4 JBI: Deployment models
        • JBI packaging
          • For strict JBI compatibility
          • For compatibility with ServiceMix 3 just drop your SA in the deploy directory
        • OSGi packaging
          • Deploy config in a bundle or plain XML file
          • Add the OSGi exported to get it linked up with the JBI components
    • 29. ServiceMix JBI – JBI packaging
    • 30. ServiceMix JBI – OSGi packaging
      • Deploy plain XML file or bundle with entire config
        • EndpointExporter integrates with NMR/JBI
      <? xml version = &quot;1.0&quot; ?> < beans xmlns = &quot;http://www.springframework.org/schema/beans&quot; xmlns:my = &quot;urn:my:ns&quot; xmlns:file = &quot;http://servicemix.apache.org/file/1.0&quot; xmlns:ftp = &quot;http://servicemix.apache.org/ftp/1.0&quot; xmlns:xsi = &quot;...&quot; xsi:schemaLocation = &quot;...&quot; > < ftp:poller service = &quot;my:ftp&quot; endpoint = &quot;endpoint&quot; targetService = &quot;my:file&quot; uri = &quot;ftp://gert:secret@ftp.smx.eu/orders&quot; /> < file:sender service = &quot;my:file&quot; endpoint = &quot;endpoint&quot; directory = &quot;/home/orders/in&quot; /> < bean class = &quot;org.apache.servicemix.common.osgi.EndpointExporter&quot; /> </ beans >
    • 31. ServiceMix JBI
      • ServiceMix 4 JBI Cluster Engine
        • replacement for JMS/JCA Flow
          • all or nothing clustering
          • no fine-grained control over transactions
        • JBI cluster engine is installable as a feature
        • add a cluster registration for every clusterable endpoint to the JBI configuration
      < bean class = &quot;o.a.s.jbi.cluster.engine.OsgiSimpleClusterRegistration&quot; > < property name = &quot;serviceName&quot; value = &quot;test:myService&quot; /> < property name = &quot;endpointName&quot; value = &quot;myEndpoint&quot; /> </ bean >
    • 32. ServiceMix JBI
    • 33. Getting involved?
      • Getting involved?
        • Start using the product
          • Versioning of ServiceMix and FUSE ESB
        • Get in touch
        • Contribute
    • 34. Getting involved?
      • Start using the product
        • Apache ServiceMix
          • development happens here
          • (b)leading edge
          • ideal for following up on future direction or for experimenting
        • FUSE ESB
          • stable versions only
          • regular fix releases
          • ideal for use in projects/production
    • 35. Getting involved?
      • Versioning of ServiceMix and FUSE ESB
      Apache ServiceMix FUSE ESB Features 3.2.x 3.3.1.x JBI container and components (single release) 3.3.x 3.4.1.x JBI container and shared components / 4.0.0.x Special FUSE ESB preview OSGi-functionality only 4.0.0 4.1.0.0 OSGi-based JBI container with the shared components
    • 36. Getting involved?
      • Get in touch
        • Apache ServiceMix
          • mailing list [email_address]
          • #servicemix on irc.codehaus.org
        • Apache Felix
          • mailing list [email_address]
        • FUSE
          • forums on http://www.fusesource.com
    • 37. Getting involved?
      • Contribute
        • give us some feedback
          • reportings bugs
          • suggestions for new features (what would you like in ServiceMix 4.1?)
        • we welcome all kinds of contributions
          • involvement on the mailing list/forum
          • documentation
          • patches – we really love patches ;)
          • ...
    • 38. Getting involved?
      • Learn about ServiceMix and FUSE ESB
        • Apache ServiceMix
          • http://servicemix.apache.org
        • Apache Felix Karaf
          • http://felix.apache.org/site/apache-felix-karaf.html
        • FUSE ESB
          • http://www.fusesource.com more tutorials, webinars, docs, ...
    • 39. Questions? Remarks?

    ×