03 osgi and servicemix

882 views
739 views

Published on

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

  • Be the first to like this

No Downloads
Views
Total views
882
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

03 osgi and servicemix

  1. 1. OSGi - Basics Runtime modular Java Lifecycle handling of individual bundles Class-loading Versioning Depency management Been around since 1999PRODUCTS • CONSULTING • APPLICATION MANAGEMENT • IT OPERATIONS • SUPPORT • TRAINING
  2. 2. Java class visibilityjar (A) jar (B) com.rl.log.api com.rl.app com.rl.log.impl com.rl.util PRODUCTS • CONSULTING • APPLICATION MANAGEMENT • IT OPERATIONS • SUPPORT • TRAINING
  3. 3. OSGi visibility bundle (A) Bundle-Version: 1.2.3 bundle (B) Import-Package: Export: com.rl.api;v=1.2.3 com.rl.api;v=[1,2) com.rl.log.api com.rl.app com.rl.log.impl com.rl.utilOSGi adds restrictions on a module-level basis to each deployable unit (bundle).A bundle however is nothing more than a JAR with added meta-data in MANIFEST.MF PRODUCTS • CONSULTING • APPLICATION MANAGEMENT • IT OPERATIONS • SUPPORT • TRAINING
  4. 4. Traditional vs OSGi classloading Traditional (extremely simplified...) OSGi ClassLoader ClassLoader A ClassLoader A C.1 (Loads class A) (Loads class A) (Loads class Sees: A, C.1) Sees: C.1, Sees: A (C.1) (D) ClassLoader D ClassLoader B (Loads class (Loads class B) D) Sees: A,B Sees: D ClassLoader ClassLoader X ClassLoader Y ClassLoader B C.2(Loads class X) (Loads class Y) (Loads class B) (Loads class C.2)Sees: A,B,X Sees: B, Sees: C.2, Sees: A,B,Y (C.2) (D) * - Imported bundles classes are actually loaded from delegated classloader PRODUCTS • CONSULTING • APPLICATION MANAGEMENT • IT OPERATIONS • SUPPORT • TRAINING
  5. 5. Bundle lifecycleosgi:install deploys bundleosgi:startosgi:stoposgi:update uninstall → install → resolve → restartosgi:refresh rewire package dep. PRODUCTS • CONSULTING • APPLICATION MANAGEMENT • IT OPERATIONS • SUPPORT • TRAINING
  6. 6. Services get() register()Consumer Service ImplementerBundle Bundle listen() Listener BundlePRODUCTS • CONSULTING • APPLICATION MANAGEMENT • IT OPERATIONS • SUPPORT • TRAINING
  7. 7. Implementations Apache Felix (ASF) ServiceMix / Karaf Equinox (Eclipse) KnoplerfishPRODUCTS • CONSULTING • APPLICATION MANAGEMENT • IT OPERATIONS • SUPPORT • TRAINING
  8. 8. The ServiceMix runtimeServiceMix / Fuse ESB CXF Camel ActiveMQKaraf Shell Security Provisioning Karaf features Logging ConfigAdmin Deploy Spring DM Dependency injection Blueprint (Spring OSGi (optional) (Apache Aries) ext) Equinox Felix OSGi container PRODUCTS • CONSULTING • APPLICATION MANAGEMENT • IT OPERATIONS • SUPPORT • TRAINING

×