Presentation is loading. Please wait.

Presentation is loading. Please wait.

OSGi: Final summary and discussion. Outline Review: Origins of OSGi –Consortium –Goals Review: What is OSGi –Dynamic Modules for Java –Advanced Component.

Similar presentations


Presentation on theme: "OSGi: Final summary and discussion. Outline Review: Origins of OSGi –Consortium –Goals Review: What is OSGi –Dynamic Modules for Java –Advanced Component."— Presentation transcript:

1 OSGi: Final summary and discussion

2 Outline Review: Origins of OSGi –Consortium –Goals Review: What is OSGi –Dynamic Modules for Java –Advanced Component Models over OSGi OSGi adoption in practice and success stories –Application servers –Eclipse Eclipse plug-ins OSGi criticism

3 Review: The OSGi Alliance OSGi is a set of specifications by the OSGi-Alliance The Open Service Gateway Initiative Initial goal: Facilitate the componentization of software and assure remote management and interoperability of applications and services over a broad variety of devices Application domains: Home automation, Mobile devices, Enterprise applications Current members of the OSGi alliance: –Strategic members: Adobe, Deutsche Telekom, Hitachi, IBM, Liferay, NTT, Oracle, Paremus, Ltd., ProSyst Software, Salesforce.com, Software AG, TIBCO AdobeDeutsche TelekomHitachiIBMLiferay NTTOracleParemus, Ltd.ProSyst SoftwareSalesforce.comSoftware AG TIBCO –Principal members: Cloudyle, Luminis, Makewave, Sumitomo Electric Industries, Ltd. CloudyleLuminisMakewaveSumitomo Electric Industries, Ltd. –Contributing associates: Eclipse Foundation, Inc., Intuit Inc., Mitsubishi Electric, NEC, Orange, Red Hat, Sagemcom SAS, Schneider Electric, Telecom Italia S.p.A, Unify GmbH & Co. KG

4 OSGi specifications developed in expert groups –Core platform (CPEG) –Vehicle (VEG) OSGi in vehicles –Mobile (MEG) OSGi in mobile devices –Enterprise (EEG) OSGi in enterprise solutions –Residential (REG) OSGi in home automation structured into 2 documents –Core Specification : framework –Service Compendium : standard services

5 OSGi specification releases OSGi Release 1 (R1): May 2000 OSGi Release 2 (R2): October 2001 OSGi Release 3 (R3): March 2003 OSGi Release 4 (R4): October 2005 / September 2006 –Core Specification (R4 Core): October 2005 –Mobile Specification (R4 Mobile / JSR-232): September 2006 OSGi Release 4.1 (R4.1): May 2007 (AKA JSR-291) OSGi Release 4.2 (R4.2): September 2009 –Enterprise Specification (R4.2): March 2010 OSGi Release 4.3 (R4.3): April 2011 –Core: April 2011 –Compendium and Residential: May 2012 OSGi Release 5 (R5): June 2012 –Core and Enterprise: June 2012 OSGi Release 6: July 2014

6 Review: What is OSGi now OSGi = Dynamic Modules for Java A set of specifications of the OSGi Alliance (currently Release 6) A set of different implementations of these specifications –Equinox, Felix, Knopplerfish Advanced component models over OSGi, developed independently by external parties (not included in OSGi specifications) –iPOJO, Spring DM

7 OSGi adoption The OSGi component system is used to build highly complex applications like: –IDE’s, application servers, application frameworks, telecom and service solutions, industrial automation, residential gateways, onboard telematics systems, etc

8 Java EE application servers vendors look for ways to make their application server products more modular and flexible –IBM's WebSphere –Red Hat’s JBoss –Oracle’s GlassFish Enterprise Server –ObjectWeb’s JOnAS, and –Apache’s Geronimo

9 Eclipse Eclipse: an open development platform comprised of extensible frameworks, tools and runtimes for building, deploying and managing software across the lifecycle

10 Eclipse architecture Figure from:

11 Different types of Eclipse plug-ins C++ IDE (CDE) Visual UI Editor (SWT/Swing Designer) UML modeling tools Colaborative tools (SVN) Aspect oriented language extension (AspectJ)

12 Eclipse plug-ins All written in Java Found at Eclipse launch - can not dynamically swap plug-ins Load-on-demand strategy - makes it possible to have many different plug-ins and still manage to obtain reasonable performance

13 Eclipse plug-in architecture Multi-layered extensibility: –Plugins, –Extension points, –Extensions Figure from: augsburg.de/~meixner/saj/skript/osgi/eclipseplugins.html

14 Create an Eclipse HelloWorld plugin Example: create an Eclipse plugin that adds a new Menu entry; when activated, it displays a window with a message Eclipse -> New ->Project Project wizard -> Plug-in-project -> select target = Eclipse Select Create plugin using one of the templates -> Plugin with a popup menu Generated files: –Source code: Activator.java, SampleAction.java –Metadata: MANIFEST.MF, plugin.xml You may already run the plugin (Run As -> Eclipse Application)

15 Manifest file for HelloWorld example Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Myeclipseplugin Bundle-SymbolicName: org.foo.myeclipseplugin; singleton:=true Bundle-Version: qualifier Bundle-Activator: org.foo.myeclipseplugin.Activator Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, org.eclipse.core.resources Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.7 An Eclipse plugin is an OSGi bundle !

16 OSGi for Eclipse Developers

17 org.foo.myeclipseplugin.Activator public class Activator extends AbstractUIPlugin { public static final String PLUGIN_ID = "org.foo.myeclipseplugin"; private static Activator plugin; public Activator() { } public void start(BundleContext context) throws Exception { super.start(context); plugin = this; } public void stop(BundleContext context) throws Exception { plugin = null; super.stop(context); } public static Activator getDefault() { return plugin; } public static ImageDescriptor getImageDescriptor(String path) { return imageDescriptorFromPlugin(PLUGIN_ID, path); }

18 Two manifest files MANIFEST.MFplugin.xml Classical OSGi manifest: Bundle identification Dependencies Activator Extension points Extensions

19 Plugin.xml for HelloWorld example


Download ppt "OSGi: Final summary and discussion. Outline Review: Origins of OSGi –Consortium –Goals Review: What is OSGi –Dynamic Modules for Java –Advanced Component."

Similar presentations


Ads by Google