Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data In Motion)


Published on

OSGi Community Event 2018 Presentation by Mark Hoffmann (Data In Motion)

Abstract: This talk will show you how the EMF framework can be used in pure OSGi environments other than Equinox. We will introduce you into free configurable ResourceSets and the principle of a ResourceSetFactory. This enables your application to have multiple tenants with different model visibillity. The profit of OSGi services provides a behavior where even models can come and go all the time.

We will also give you look inside, how easy it is to extend the default code generation process of EMF to generate OSGi service component that handle the model registration in an OSGi way.

Published in: Technology
  • Login to see the comments

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data In Motion)

  1. 1. Eclipse Modeling Framework and plain OSGi the easy way Mark Hoffmann Data In Motion Consulting GmbH 1
  2. 2. About Us ● Founded in 2010 ● Located in Jena/Thuringia - Germany ● OSGi Contributing Associate Member ● OSGi / MDSD related company ● Consulting, Independent R&D, Development, Training, 2
  3. 3. What are we talking about? ● EMF Registries ● EMF in Eclipse/Equinox environments ● EMF in Java-SE environments ● Gecko EMF - ResourceSet as a service ● Model Isolation ● No more singletons 3
  4. 4. EMF Registries- What are they for? ● EPackage Registry ● ResourceFactory Registry ● Dynamic model registration ● Static registries for non-OSGi ● Registry based upon Equinox Extension Registry ● ResourceSet needs the registries 4
  5. 5. EMF in Non-OSGi? No Problem! ● Uses static registry ● Self-registering EPackage ● Manual registration of EPackage and ResourceFactory ● Each new ResourceSet knows all models 5
  6. 6. EMF’s home is Equinox ● Equinox OSGi Framework for Eclipse ● Core-Runtime means Equinox ● Extension registry and plugin.xml ● EMF generates Equinox based projects from GenModel ● OSGi mode for compatibility ● For other Frameworks use Equinox Supplement bundle 6
  7. 7. Gecko EMF? Whats that? ● OpenSource project ● Idea of a Service-based EMF ● Handling of OSGi dynamics ● API and default implementation ● Genmodel Code Generator extension - Tooling ● Support for bnd projects 7
  8. 8. Gecko EMF - How it works ● No Equinox dependencies, plain OSGi ● Whiteboard-based OSGi services for model registration ● Additional API for: ○ EPackageRegistry ○ ResourceFactoryRegistry ● ResourceSetFactory to create a ResourceSet ● ResourceSet as a service ● Handling of dynamics when un- / registering models 8
  9. 9. Gecko EMF Features ● Default registry contains all models ● Isolated registry for a configurable filter ● Configurable dynamic configurator for loading ecore-files ● Create service for ResourceSetFactory ● Create service for ResoureSet ● Additional extensions available 9
  10. 10. Showtime Lets see what Gecko EMF can do for you 10
  11. 11. Thanks for listening! Resources: Web: GeckoEMF: OSGi: 11
  12. 12. Questions? 12