CS5233 Components Models and Engineering

Size: px
Start display at page:

Download "CS5233 Components Models and Engineering"

Transcription

1 Prof. Dr. Th. Letschert CS5233 Components Models and Engineering (Komponententechnologien) Master of Science (Informatik) OSGI Bundles and Services

2 Slides on OSGi are based on OSGi Alliance: OSGi Service Platform Core Specification OSGi 2009 J. McAffer, P. Vanderlei, S. Archer: OSGi and Equinox, Addison-Wesley 2010 Bundles Wütherich/Hartmann/Kolb/Lübken, Die OSGI Service Platform Dpunkt Verlag, 2008 Seite 2

3 Eclipse / RCP Hello World Bundle Context download and install Eclipse for RCP Developers or install General Purpose Tools / Eclipse Plugin Development Environment RCP, Plugin, Bundle: RCP = Rich Client Platform Eclipse RCP Framework / platform / run-time for RCP applications makes it easy to create rich client applications RCP-Application = Application logic as plugin / bundle + Eclipse-RCP run-time Seite 3

4 Eclipse / RCP Hello World Bundle Example: Hello World Bundle Create a new Plug-in Project called HelloWorld Wizard page 1: target platform: choose OSGi / standard target platform is about who will run the plugin OSGi means that it will run directly on an OSGi framework (not within eclipse) standard means do not use special Equinox-extension Wizard page 2: Execution environment is an OSGi concept, it denotes the minimum Java runtime for the bundle, do not select anything choose generate Activator! Activator is the activator for the bundle as specified by OSGi A bundle is activated by calling its Bundle Activator object, if one exists. The BundleActivator interface defines methods that the Framework invokes when it starts and stops the bundle. OSGi Core Specification, The Activator must be declared in the manifest file with the header Bundle-Activator: <full qualified class name> Wizard page 3: do not select a template Seite 4

5 Eclipse / RCP Hello World Bundle Created files: MAINIFEST.MF Activator.java build.properties manifest file activator class template packaging / deployment configuration file Seite 5

6 Eclipse / RCP Hello World Bundle Created files: MAINIFEST.MF manifest file Manifest-Version : 1.0 Bundle-ManifestVersion : 2 Bundle-Name: HelloWorld Bundle-SymbolicName: HelloWorld Bundle-Version: qualifier Bundle-Activator : helloworld.activator Import-Package: org.osgi.framework;version="1.3.0" We are creating an OSGi-Bundle, this is its Manifest. Seite 6 MANIFEST.MF

7 Eclipse / RCP Hello World Bundle Created files: Activator.java activator class template package helloworld; import org.osgi.framework.bundleactivator; import org.osgi.framework.bundlecontext; public class Activator implements BundleActivator { private static BundleContext context; static BundleContext getcontext() { return context; /* * (non-javadoc) org.osgi.framework.bundleactivator#start(org.osgi.framework.bundlecontext) */ public void start(bundlecontext bundlecontext) throws Exception { Activator.context = bundlecontext; Activator.java /* * (non-javadoc) org.osgi.framework.bundleactivator#stop(org.osgi.framework.bundlecontext) */ public void stop(bundlecontext bundlecontext) throws Exception { Activator.context = null; OSGi Core Spec. Seite 7

8 Eclipse / RCP Hello World Bundle Created files: build.properties packaging / deployment configuration file build.properies source.. = src/ output.. = bin/ bin.includes = META-INF/,\. build.properties, as seen by the build properties editor Seite 8 and seen by a text editor

9 Eclipse / RCP Hello World Bundle fill the Activator with some code package helloworld; import org.osgi.framework.bundleactivator; import org.osgi.framework.bundlecontext; public class Activator implements BundleActivator { private static BundleContext context; static BundleContext getcontext() { return context; /* * (non-javadoc) org.osgi.framework.bundleactivator#start(org.osgi.framework.bundlecontext) */ public void start(bundlecontext bundlecontext) throws Exception { Activator.context = bundlecontext; System.out.println("Hello Bundle"); /* * (non-javadoc) org.osgi.framework.bundleactivator#stop(org.osgi.framework.bundlecontext) */ public void stop(bundlecontext bundlecontext) throws Exception { Activator.context = null; System.out.println("Goodby world - the bundle stops."); Seite 9 Activator.java

10 Eclipse / RCP Hello World Bundle run it in an OSGi framework Run Run as OSGi Framework osgi> Hello Bundle. should appear in the console (after several exception messages) create a minimal run configuration run it: Run Run as OSGi Framework open the run configuration: Run Run Configurations / OSGi Framework edit the configuration rename it to HelloWorldConfig deselected everything besides HelloWorld org.eclipse.osgi export bundle Export Deployable Plugins and Fragments wizard next Page: select and name a directory / finish Seite 10

11 Eclipse / RCP Hello World Bundle start OSGi console; install start stop the plugin > java -jar /path/to/eclipse/plugins/org.eclipse.osgi_3.6.2.r36x_v jar -console osgi> install file:/path/to/my/plugins/helloworld_ jar Bundle id is 1 osgi> start 1 Hello Bundle osgi> ss Framework is launched. id State Bundle 0 ACTIVE org.eclipse.osgi_3.6.2.r36x_v ACTIVE HelloWorld_ osgi> stop 1 Goodby world - the bundle stops. osgi> generated bundle (jar file) with manifest Seite 11

12 Eclipse / RCP Hello World Bundle Summary: Bundles are developed as Plugin projects in Eclipse Eclipse uses a directory structure for bundles that differs from the structure of the jar file By exporting the project Eclipse creates a bundle-jar The most simplistic bundle consists of a manifest file a class that implements org.osgi.framework.bundleactivator The activator has a start method that gets called when the bundle is started a stop method that gets called when the bundle is stopped For details of eclipse see: Seite 12

13 Bundle, Bundle Activator and Context org.osgi.framework Interface BundleActivator Activator: Activator: manifest entry Bundle-Activator: <fully qualified class name> class that implements interface BundleActitivator If an activator class exists (and is named in the manifest file) the bundle class loader will load the class and the framework will create an object of this type (using newinstance so it has to have a default constructor) its start / stop methods will be called by the framework Methods of interface BundleActitivator start(bundlecontext) Method to allocate resources, start threads, register services Bundles must be stopped by the framework if this method throws an exception stop(bundlecontext) Method called if the bundle is stopped (except if it stopped via an exception thrown by start). Should be used to deallocate resources allocated by start, services do not have to be unregistered. OSGi Service Platform Release 4 Version 4.1 Seite 13

14 Bundle, Bundle Activator and Context Activation Policy: Activation policy: How should a bundle be activated: eager or lazy Manifest entry Bundle-ActivationPolicy: lazy [ ; in/exclude directives] Eager activation (default) bundle is activated when started Lazy activation bundle is not to be activated immediately when started, instead activation is to be deferred until at least one of its classes is loaded Include / exclude directives (optional with lazy activation) include: packages with classes that should trigger activation exclude: packages with classes that should not trigger activation OSGi Core Spec. Seite 14

15 Bundle, Bundle Activator and Context org.osgi.framework Interface BundleContext Bundle Context: Bundle Context : Object of type BundleContext Proxy to the framework for a bundle Created when a bundle is started Passed as argument to the start method Can be used to: Obtain information about the framework Install new bundles Interrogate other bundles Obtain a persistent storage. Retrieve service objects of registered services. Register services. Subscribe or unsubscribe to events. OSGi Core Spec. Seite 15

16 Bundle, Bundle Activator and Context osgi> ss Framework is launched. Example : get information about id State Bundle 0 ACTIVE org.eclipse.osgi_3.6.2.r36x_v bundles and framework 2 INSTALLED HelloWorld_ osgi> start 2 All bundles: Bundle: org.eclipse.osgi_3.6.2.r36x_v [0] state: 32 ACTIVE package helloworld; Bundle: HelloWorld_ [2] state: 8 STARTING Framework Properties: Version: import org.osgi.framework.bundle; Vendor: Eclipse import org.osgi.framework.bundleactivator; OS: Linux import org.osgi.framework.bundlecontext; Processor: x86-64 import org.osgi.framework.constants; public class Activator implements BundleActivator {... public void start(bundlecontext bundlecontext) throws Exception { Activator.context = bundlecontext; System.out.println("All bundles:"); for (Bundle bundle: bundlecontext.getbundles()) { System.out.print("Bundle: " + bundle + " state: " + bundle.getstate()); if (bundle.getstate() == 1) System.out.print(" UNINSTALLED "); if (bundle.getstate() == 2) System.out.print(" INSTALLED "); if (bundle.getstate() == 4) System.out.print(" RESOLVED "); if (bundle.getstate() == 8) System.out.print(" STARTING "); if (bundle.getstate() == 16) System.out.print(" STOPPING "); if (bundle.getstate() == 32) System.out.print(" ACTIVE "); System.out.println(); System.out.println("Framework Properties: "); System.out.println("Version: " + context.getproperty(constants.framework_version) ); System.out.println("Vendor: " + context.getproperty(constants.framework_vendor) ); System.out.println("OS: " + context.getproperty(constants.framework_os_name) ); System.out.println("Processor: " + context.getproperty(constants.framework_processor) );... Seite 16

17 Bundle: Activator and Context org.osgi.framework Interface Bundle Bundle Objects of type Bundle represent installed bundles Bundle objects may be used to: get information about the bundle including the bundle's meta information manage the lifecycle of an installed bundle access a bundle's context Seite 17

18 Bundle, Bundle Activator and Context Example : List all headers of bundle with id 0 public void start(bundlecontext bundlecontext) throws Exception { Activator.context = bundlecontext; Bundle bundle_0 = context.getbundle(0); System.out.println(bundle_0 + " with Enumeration<String> keys = bundle_0.getheaders().keys(); while (keys.hasmoreelements()) { String key = keys.nextelement(); System.out.println(key + " \t" + bundle_0.getheaders().get(key)); org.eclipse.osgi_3.6.2.r36x_v [0] with headers: Manifest-Version 1.0 Bundle-DocUrl Main-Class org.eclipse.core.runtime.adaptor.eclipsestarter Bundle-Localization systembundle Bundle-RequiredExecutionEnvironment J2SE-1.5,OSGi/Minimum-1.2 Bundle-SymbolicName org.eclipse.osgi; singleton:=true...etc... the Mainfest headers Manifest-Version: 1.0 Bundle-DocUrl: Main-Class: org.eclipse.core.runtime.adaptor.eclipsestarter Bundle-Localization: systembundle Bundle-RequiredExecutionEnvironment: J2SE-1.5,OSGi/Minimum-1.2 Bundle-SymbolicName: org.eclipse.osgi; singleton:=true... org.eclipse.osgi_3.6.2.r36x_v jar/meta-inf/manifest Seite 18

19 Bundle, Bundle Activator and Context Example : install and start HelloWorld bundle public void start(bundlecontext context) throws Exception { System.out.println("The bundle loading bundle is starting"); Bundle bundle = context.installbundle("file:/path/to/helloworld.jar"); bundle.start(); System.out.println(bundle + " with headers:"); Enumeration<String> keys = bundle.getheaders().keys(); while (keys.hasmoreelements()) { String key = keys.nextelement(); System.out.println(key + " \t" + bundle.getheaders().get(key)); bundle.stop(); Seite 19

20 Events and Listener org.osgi.framework Class BundleEvent org.osgi.framework Class FrameworkEvent Events Objects of type BundleEvent are generated by the framework report on changes in the life-cycle of a bundle are delivered to BundleListeners registered with the framework have a type that represents the bundle's state change INSTALLED, RESOVED, STARTED, Objects of type FrameworkEvent are generated by the framework report on changes in the life-cycle of the framework are delivered to FrameworkListeners registered with the framework have a type that represents events within the framework STARTED, ERROR, WARNING, Seite 20

21 Events and Listeners org.osgi.framework Interface BundleListener org.osgi.framework Interface FrameworkListener Listener Objects of type BundleListner are registered with the framework (representet by a bundle context object) are called with an event of type BundleEvent when a bundle's lifecycle state has changed Objects of type FrameworkEvent are registered with the framework (representet by a bundle context object) are called with an event of type FrameworkEvent when the framework starts, stops, is refreshed, or when an error occurs Seite 21

22 Events and Listeners Example : monitor bundle events public void start(bundlecontext bundlecontext) throws Exception { bundlecontext.addbundlelistener(new BundleListener() public void bundlechanged(bundleevent event) { System.out.println("EVENT : a Bundle event occured "); System.out.println("\t type: " + decode(event.gettype()) + "\n\t for bundle:" + event.getbundle().getsymbolicname()); ); Bundle bundle = bundlecontext.installbundle( "file:/home/thomas/tmp/rcp/plugins/helloworld_ jar"); bundle.start(); bundle.update(); bundle.stop(); EVENT : a Bundle event occured bundle.uninstall(); Goodby world - the bundle stops. type: STARTED for bundle:helloworld public void stop(bundlecontext bundlecontext) throws Exception { EVENT : a Bundle event occured Activator.context = null; type: STOPPED System.out.println("Goodby world - the bundle stops."); for bundle:helloworld EVENT : a Bundle event occured type: UNRESOLVED for bundle:helloworld private static String decode(int type) { EVENT : a Bundle event occured switch (type) { type: UNINSTALLED case 1: return "INSTALLED"; case 2: return "STARTED"; for bundle:helloworld case 4: return "STOPPED"; case 8: return "UPDATED"; EVENT : a Bundle event occured case 16: return "UNINSTALLED"; case 32: return "RESOLVED"; type: STARTED case 64: return "UNRESOLVED"; case 128: return "STARTING"; for bundle:helloworld case 256: return "STOPPING"; case 512: return "LAZY_ACTIVATION"; EVENT : a Bundle event occured default: return "??" + type + "??"; type: STARTED for bundle:org.eclipse.osgi org.osgi.framework.frameworkevent Seite 22

23 Bundle Relations: Require / Import / Export Seite 23

24 Bundle: Import / Export Inter-bundle relationships direct : Bundle A has access to bundle B via import / export indirect : Bundle A uses a service provided by bundle B, this relationship is always mediated by the framework Direct usage Require Bundle Import every package that is export by the bundle Syntax: Require-Bundle ::= bundle-description ( ',' bundle-description )* bundle-description ::= symbolic-name (';' parameter )* Import Package Import named package of a bundle should be preferred in general Syntax: Import-Package ::= import ( ',' import )* import ::= package-names ( ';' parameter )* package-names ::= package-name ( ';' package-name )* Seite 24

25 Bundle: Import Export / Require Bundle Import via Require Bundle Example: Greeting Bundle Exporter Create Plugin-Project GreetingBundle without Activator Create class greetingbundle.hello with public method sayhello sayhello should print Hello World add Export-Package: greetingbundle to the manifest Importer Create Plugin-Project GreetingUserBundle with Activator add Require-Bundle: GreetingBundle;bundle-version=" " to the manifest Seite 25

26 Bundle: Import Export / Require Bundle Greeting Bundle create, add Class Hello change version and provider package greetingbundle; public class Hello { public void sayhello() { System.out.println("Hello! says the greeting bundle"); generated manifest Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: de.thm.mni.greetingbundle Bundle-SymbolicName: GreetingBundle Bundle-Version: Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-Vendor: de.thm.mni Seite 26

27 Bundle: Import Export / Require Bundle Greeting Bundle add package export modified manifest Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: de.thm.mni.greetingbundle Bundle-SymbolicName: GreetingBundle Bundle-Version: Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-Vendor: de.thm.mni Export-Package: greetingbundle Seite 27

28 Bundle: Import Export / Require Bundle Greeting User Bundle create using bundle, add require bundle modified manifest Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: de.thm.mni.greetinguserbundle Bundle-SymbolicName: GreetingUserBundle Bundle-Version: Bundle-Activator: greetinguserbundle.activator Import-Package: org.osgi.framework;version="1.3.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-Vendor: de.thm.mni Require-Bundle: GreetingBundle;bundle-version="1.0.0" Seite 28

29 Bundle: Import Export / Require Bundle Greeting User Bundle create using/importing class... Eclipse manages import of required bundles! Seite 29

30 Bundle: Import Export / Require Bundle Greeting User Bundle... add using statement to activator Seite 30

31 Bundle: Import - Export / Require Bundle Export bundles ( plugins ) create minimal configuration then export as deployable plug-ins and fragments Seite 31

32 Bundle: Import - Export / Require Bundle Export bundles ( plugins ) create minimal configuration (org.eclipse.osgi, GreetingUserBundle) then export as deployable plug-ins and fragments Seite 32

33 Bundle: Import - Export / Require Bundle Test bundles osgi> ss Framework is launched. id 0 State Bundle ACTIVE org.eclipse.osgi_3.6.2.r36x_v osgi> install file:/home/thomas/tmp/rcp/plugins/greetingbundle_ jar Bundle id is 4 osgi> install file:/home/thomas/tmp/rcp/plugins/greetinguserbundle_ jar Bundle id is 5 osgi> ss Framework is launched. id State Bundle ACTIVE org.eclipse.osgi_3.6.2.r36x_v INSTALLED GreetingBundle_ INSTALLED GreetingUserBundle_ osgi> start 4 osgi> start 5 Hello! says the greeting bundle osgi> Seite 33

34 Bundle: Import - Export / Import Package Import via Import Package modify the using bundle GreetingUserBundle: 1. remove require bundle statement Seite 34

35 Bundle: Import - Export / Import Package Import via Import Package modify the using bundle GreetingUserBundle: 2. Let Eclipse generate the import Seite 35 Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: de.thm.mni.greetinguserbundle Bundle-SymbolicName: GreetingUserBundle Bundle-Version: Bundle-Activator: greetinguserbundle.activator Import-Package: greetingbundle, org.osgi.framework;version="1.3.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-Vendor: de.thm.mni

36 Bundle: Import - Export / Import Package Import via Import Package export the new version and test it osgi> ss Framework is launched. id State ACTIVE ACTIVE INSTALLED Bundle org.eclipse.osgi_3.6.2.r36x_v GreetingBundle_ GreetingUserBundle_ osgi> start 6 Hello! says the greeting bundle osgi> stop 6 osgi> uninstall 6 osgi> install file:/home/thomas/tmp/rcp/plugins/greetinguserbundle_ jar Bundle id is 7 osgi> ss Framework is launched. id State ACTIVE ACTIVE INSTALLED Bundle org.eclipse.osgi_3.6.2.r36x_v GreetingBundle_ GreetingUserBundle_ osgi> start 7 Hello! says the greeting bundle Seite 36

37 Bundle: Import - Export / Version Versions Bundle version Bundles have a version Default value : Specified with the Bundle-Version header Syntax: Bundle-Version ::= version version ::= major( '.' minor ( '.' micro ( '.' qualifier )? )? )? mayor ::= number minor ::= number micro ::= number qualifier ::= ( alphanum _ '-' )+ Components that are not specified, they have a default value of 0. If the qualifier component is not specified, it has a default value of the empty string. Bundles are identified by the combination of symbolic name and version Requiring bundle specifies a version constraint Require-Bundle: <bundlename>; bundle-version= <versionrange> Required bundle must match the version constraint Seite 37

38 Bundle: Import - Export / Version Versions Package version Packages may have a version (not related to bundle version) Specified as part of the package import / export header Import specifies a version constraint Import-Package: <packagename>; version= <versionrange> Export must match the version constraint Seite 38

39 Bundle: Import - Export / Version Versions Version Ranges Example: 1.1 means all versions v with <= v Example: (1.1, 2.1] means all versions v with < v <= [, ] range inclusive (, ) range exclusive Seite 39

40 Bundle: Import - Export / Dynamic Import Dynamic Import of Packages Header: DynamicImport-Package: <comma separated list of package names with wildcards> Example: DynamicImport-Package: * Packages are imported when needed Dynamic Imports The DynamicImport-Package header is intended to look for an exported package when that package is needed. The key use case for dynamic import is the Class forname method when a bundle does not know in advance the class name it may be requested to load. [OSGi-Spec] Seite 40

41 Bundle: Class Loading Class Loading Each bundle has its own class loader Bundle loader is created by the framework after the bundle has been resolved Class loading in a bundle is performed in these steps: java.* classes are loaded by the parent class loader of the bundle (usually the boot loader) bundles referencing classes of imported packages loading is delegated to the exporting bundle, starting with this step bundles referencing classes of required other bundles or that are importing from several other bundles delegate loading to required bundles in the the order they appear in the manifest the bundle class path is searched for the class search for classes in exported packages ends here if the class may be in a dynamically imported package an appropriate exporter is searched, if successful, the class form now on is treated as if in an explicitly imported package search for the class ends here Seite 41

42 Bundle: Class Loading OSGI-Spec. Seite 42

43 Services Seite 43

44 Services / Example Introductory Example: Hello World Service Create plugin project HelloService with activator Create plugin project HelloServiceUser with activator Seite 44

45 Services / Example Hello World Service / define the service package helloservice; public interface HelloService { void sayhello(); the service definition as interface package helloserviceimpl; import helloservice.helloservice; public class HelloServiceImpl implements HelloService public void sayhello() { System.out.println("Hello - this service is brought to you by the HelloService"); Seite 45 the service implementation

46 Services / Example Hello World Service / register the service in the activator public class Activator implements BundleActivator { private static BundleContext context;... public void start(bundlecontext bundlecontext) throws Exception { Activator.context = bundlecontext; System.out.println("hello service started"); Class<?> serviceinterface = HelloService.class; Object serviceimpl = new HelloServiceImpl(); Dictionary<String, String> properties = new Hashtable<String, String>(); context.registerservice(serviceinterface.getname(), serviceimpl, properties); System.out.println("helloservice: HelloService registered");... Seite 46

47 Services / Example Hello World Service / export package with service interface The generated manifest of the service bundle Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: de.thm.mni.helloservice Bundle-SymbolicName: HelloService Bundle-Version: Bundle-Activator: helloservice.activator Import-Package: org.osgi.framework;version="1.3.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-Vendor: de.thm.mni Export-Package: helloservice Seite 47

48 Services / Example Hello World Service User / use the service within the activator The activator of the service user Seite 48

49 Services / Example Hello World Service User / use the service within the activator package helloserviceuser; import org.osgi.framework.bundleactivator; import org.osgi.framework.bundlecontext; import org.osgi.framework.servicereference; import helloservice.helloservice; public class Activator implements BundleActivator { private static BundleContext context;... public void start(bundlecontext bundlecontext) throws Exception { Activator.context = bundlecontext; System.out.println("hello service user: started"); ServiceReference helloserviceref = context.getservicereference("helloservice.helloservice"); if (helloserviceref == null) { System.out.println("hello service user: cannot reference hello service"); else { try { System.out.println("hello service user: ServiceReference found " + helloserviceref); HelloService helloservice = (HelloService) context.getservice(helloserviceref); System.out.println("hello service user: hello service resolved " + helloservice); helloservice.sayhello(); catch (Exception e) { System.out.println(e);... The activator of the service user Seite 49

50 Services / Example Hello World Service / Test When testing with eclipse make sure that the service defining bundle is started before the service user by setting appropriate start levels! Seite 50

51 Services / Example Hello World Service / Test Seite 51

52 Services Services Service An object registered with the service registry under one or more interfaces together with properties. This object can be discovered and used by bundles. Service Registry Holds the service registrations. Service Reference A reference to a service. Provides access to the service s properties but not the actual service object. The service object must be acquired through a bundle s Bundle Context. Service consumer Service consumer Registry Registry Service Reference Service Service provider Service provider Seite 52

53 Services Service Service name Fully qualified name of the service interface. Service interface Defines the service semantically. - The class of the service object may also be used as interface. Service object Implementation of a service. Owned by and run within the defining bundle. Service properties Dictionary of key (a string) value pairs which describe the service. (Optional) Seite 53

54 Services Service registration Making a service available by publishing it. Service may be unregistered explicitly is unregistered implicitly when the registrating bundle is uninstalled Registration in done by calling methods of a BundleContext registerservice(string name, Object service, Dictionary properties) For a service object registered under a single service interface. registerservice(string[] names, Object service, Dictionary properies) For a service object registered under multiple service interfaces. Framework ensures that the registered object is an instance of the service interface and returns a service reference object. Seite 54

55 Services Service locating Get a reference to a service. To use a service the user first has to obtain a service reference by calling methods of a BundleContext getservicereference(string name) Returns a reference to a service object registered under the name. getservicereference(string name, String filter) Returns a reference to a service object registered under the name satisfying the filter. To get a service object the user calls a method of a BundleContext getservice(servicereference reference) Returns a service object. Seite 55

56 Services / Properties Service properties java.util.dictionary<string, ValueType> object, where ValueType should be a basic Java type defined in defined java.* Properties describe the service and may be used to get information about a service to query the registry for a service using a filter in oder to find a matching service All keys are not case sensitive are within common name-space when filtering and should be unique across services Keys of the form service.* are reserved, some of them are predefined Filtering Filter: An expression according to the syntax of LDAP-search filters may be used to match properties of a service reference Seite 56

57 Services / Filter org.osgi.framework Interface Filter Filtering Creation of filters is supported by objects of type BundleContext and by class FrameworkUtil: Filter createfilter(string filter)throws InvalidSyntaxException A filter supports matching: match(servicereference) Match the properties of the Service Reference performing key lookup in a case insensitive way. match(dictionary) Match the entries in the given Dictionary object performing key lookup in a case insensitive way. matchcase(dictionary) Match the entries in the given Dictionary object performing key lookup in a case sensitive way. Example: String filterstring = "(java.util.currency=chf)" ; Filter filter = FrameworkUtil. createfilter (filterstring); if (filter.match(myserviceref)) { MyService myservice = (MyService) context.getservice(myserviceref); Seite 57

58 Services / Service Factory org.osgi.framework Interface ServiceFactory Service Factories A Service Factory is a Service object that implements ServiceFactory If the service objects implements this interface it will will not be returned directly by context.getservice(servicereference) instead context.getservice delegates creation of the service object to its factory method: getservice(bundle serviceuser, ServiceRegistration registobj) This method is called by the Framework if a call is made to BundleContext.getService and the following are true: The ServiceReference argument to BundleContext.getService refers to a service object that implements the ServiceFactory interface. The bundle s usage count of that service object is zero; that is, the bundle currently does not have any dependencies on the service object. The call to BundleContext.getService must be routed by the framework to this method, passing to it the Bundle object of the caller. Seite 58

59 Services / Service Factory package helloservice; Factory Example import org.osgi.framework.bundle; import org.osgi.framework.servicefactory; import org.osgi.framework.serviceregistration; public class HelloServiceFactory implements ServiceFactory public Object getservice(bundle bundle, ServiceRegistration registration) { System.out.println("Hey bundle " + bundle + " needs my service"); return new public void ungetservice(bundle bundle, ServiceRegistration registration, Object service) { package helloservice; import import import import java.util.dictionary; java.util.hashtable; org.osgi.framework.bundleactivator; org.osgi.framework.bundlecontext; public class Activator implements BundleActivator { public void start(bundlecontext context) throws Exception { Class<?> serviceinterface = HelloService.class; Object serviceimpl = new HelloServiceFactory (); Dictionary<String, String> properties = new Hashtable<String, String>(); context.registerservice(serviceinterface.getname(), serviceimpl, properties); public void stop(bundlecontext context) throws Exception { Seite 59

OSGi in Action. Ada Diaconescu

OSGi in Action. Ada Diaconescu OSGi in Action Karl Pauls Clement Escoffier karl.pauls@akquinet.de clement.escoffier@akquinet.de INF 346. Ada Diaconescu ada.diaconescu@telecom-paristech.fr 2 OSGi in Action - Clement Escoffier (clement.escoffier@akquinet.de)

More information

First Steps in RCP. Jan Blankenhorn, WeigleWilczek GmbH, Stuttgart, Germany. February 19th, 2009

First Steps in RCP. Jan Blankenhorn, WeigleWilczek GmbH, Stuttgart, Germany. February 19th, 2009 First Steps in RCP Jan Blankenhorn, WeigleWilczek GmbH, Stuttgart, Germany February 19th, 2009 Agenda» About us» RCP Architecture and Bundles» Extension Points and Views» Bundle Dependencies 2 Jan Blankenhorn»

More information

Equinox Framework: How to get Hooked

Equinox Framework: How to get Hooked Equinox Framework: How to get Hooked Thomas Watson, IBM Lotus Equinox Project co-lead Equinox Framework lead developer 2008 by IBM Corp; made available under the EPL v1.0 March 2008 Tutorial Agenda Equinox

More information

Apache Felix Shell. Apache Felix Shell. Overview. How the Shell Service Works. package org.apache.felix.shell;

Apache Felix Shell. Apache Felix Shell. Overview. How the Shell Service Works. package org.apache.felix.shell; Apache Felix Shell Apache Felix Shell Overview How the Shell Service Works How Commands Work Creating a Command Security and the Shell Service Feedback Overview In order to interact with Felix it is necessary

More information

Beware: Testing RCP Applications in Tycho can cause Serious Harm to your Brain. OSGi p2

Beware: Testing RCP Applications in Tycho can cause Serious Harm to your Brain. OSGi p2 JUnit Beware: Testing RCP Applications in Tycho can cause Serious Harm to your Brain Dependencies Debugging Surefire OSGi p2 Mac OS X Update Site Tycho Redistribution and other use of this material requires

More information

Patterns and Best Practices for dynamic OSGi Applications

Patterns and Best Practices for dynamic OSGi Applications Patterns and Best Practices for dynamic OSGi Applications Kai Tödter, Siemens Corporate Technology Gerd Wütherich, Freelancer Martin Lippert, akquinet it-agile GmbH Agenda» Dynamic OSGi applications» Basics»

More information

Introduction to OSGi. Marcel Offermans. luminis

Introduction to OSGi. Marcel Offermans. luminis Introduction to OSGi Marcel Offermans luminis Introduction Marcel Offermans marcel.offermans@luminis.nl Luminis Arnhem Apeldoorn Enschede IT solutions from idea to implementation with and for customers:

More information

Developing Java Applications with OSGi Capital District Java Developers Network. Michael P. Redlich March 20, 2008

Developing Java Applications with OSGi Capital District Java Developers Network. Michael P. Redlich March 20, 2008 Developing Java Applications with OSGi Capital District Java Developers Network Michael P. Redlich March 20, My Background (1) Degree B.S. in Computer Science Rutgers University (go Scarlet Knights!) Petrochemical

More information

Building LinkedIn's Next Generation Architecture with OSGI

Building LinkedIn's Next Generation Architecture with OSGI OSGi Building LinkedIn's Next Generation Architecture with OSGI Yan Pujante Distinguished Software Engineer Member of the Founding Team @ LinkedIn ypujante@linkedin.com http://www.linkedin.com/in/yan Yan

More information

Apache Felix Framework Launching and Embedding

Apache Felix Framework Launching and Embedding Apache Felix Framework Launching and Embedding Apache Felix Framework Launching and Embedding [This document describes framework launching introduced in Felix Framework 2.0.0 and continuing with the latest

More information

Equinox OSGi: Pervasive Componentization

Equinox OSGi: Pervasive Componentization Equinox OSGi: Pervasive Componentization Thomas Watson Equinox Development Lead IBM Lotus Jeff McAffer, Eclipse RCP and Equinox Lead IBM Rational Software 10/3/2006 Why is Eclipse interesting? Extensible

More information

OSGi. Building LinkedIn's Next Generation Architecture with OSGI

OSGi. Building LinkedIn's Next Generation Architecture with OSGI OSGi Building LinkedIn's Next Generation Architecture with OSGI Yan Pujante Distinguished Software Engineer Member of the Founding Team @ LinkedIn ypujante@linkedin.com http://www.linkedin.com/in/yan Background

More information

OSGi. Building and Managing Pluggable Applications

OSGi. Building and Managing Pluggable Applications OSGi Building and Managing Pluggable Applications What A Mess Billing Service Orders Shipping Accounting Workflow Inventory Application From The View Of... Building monolithic applications is evil nuf

More information

Modular Java Applications with Spring, dm Server and OSGi

Modular Java Applications with Spring, dm Server and OSGi Modular Java Applications with Spring, dm Server and OSGi Copyright 2005-2008 SpringSource. Copying, publishing or distributing without express written permission is prohibit Topics in this session Introduction

More information

20. Eclipse and Framework Extension Languages

20. Eclipse and Framework Extension Languages 20. Eclipse and Framework Extension Languages Prof. Uwe Aßmann TU Dresden Institut für Software und Multimediatechnik Lehrstuhl Softwaretechnologie Version 11-1.0, 12/17/11 Design Patterns and Frameworks,

More information

G l a r I m y Presentation on

G l a r I m y Presentation on G l a r I m y Presentation on OSGi with Apache Karaf Krishna Mohan Koyya Proprietor & Principle Consultant Glarimy Technology Services Benguluru Bharat http://www.glarimy.com krishna@glarimy.com . The

More information

Using the Bridge Design Pattern for OSGi Service Update

Using the Bridge Design Pattern for OSGi Service Update Using the Bridge Design Pattern for OSGi Service Update Hans Werner Pohl Jens Gerlach {hans,jens@first.fraunhofer.de Fraunhofer Institute for Computer Architecture and Software Technology (FIRST) Berlin

More information

The Interceptor Architectural Pattern

The Interceptor Architectural Pattern Dr.-Ing. Michael Eichberg eichberg@informatik.tu-darmstadt.de The Interceptor Architectural Pattern Pattern-oriented Software Architecture Volume 2 Patterns for Concurrent and Networked Objects; Douglas

More information

Agenda. Why OSGi. What is OSGi. How OSGi Works. Apache projects related to OSGi Progress Software Corporation. All rights reserved.

Agenda. Why OSGi. What is OSGi. How OSGi Works. Apache projects related to OSGi Progress Software Corporation. All rights reserved. OSGi Overview freeman.fang@gmail.com ffang@apache.org Apache Servicemix Commiter/PMC member Apache Cxf Commiter/PMC member Apache Karaf Commiter/PMC member Apache Felix Commiter Agenda Why OSGi What is

More information

WFCE - Build and deployment. WFCE - Deployment to Installed Polarion. WFCE - Execution from Workspace. WFCE - Configuration.

WFCE - Build and deployment. WFCE - Deployment to Installed Polarion. WFCE - Execution from Workspace. WFCE - Configuration. Workflow function and condition Example WFCE - Introduction 1 WFCE - Java API Workspace preparation 1 WFCE - Creating project plugin 1 WFCE - Build and deployment 2 WFCE - Deployment to Installed Polarion

More information

CS486: Tutorial on SOC, OSGi, and Knopflerfish. Ryan Babbitt (props to Dr. Hen-I Yang, CS415X) Feb. 3, 2011

CS486: Tutorial on SOC, OSGi, and Knopflerfish. Ryan Babbitt (props to Dr. Hen-I Yang, CS415X) Feb. 3, 2011 CS486: Tutorial on SOC, OSGi, and Knopflerfish Ryan Babbitt (rbabbitt@iastate.edu) (props to Dr. Hen-I Yang, CS415X) Feb. 3, 2011 Basic Concepts Service-oriented computing (SOC) Service-oriented architectures

More information

OSGi and Equinox. Creating Highly Modular Java. Systems

OSGi and Equinox. Creating Highly Modular Java. Systems OSGi and Equinox Creating Highly Modular Java Systems Part I: Introduction This first part of the book introduces OSGi and Equinox, Eclipse s implementation of the OSGi standard. Chapter 1outlines the

More information

OSGi Best Practices. Emily

OSGi Best Practices. Emily OSGi Best Practices Emily Jiang @IBM Use OSGi in the correct way... AGENDA > Why OSGi? > What is OSGi? > How to best use OSGi? 3 Modularization in Java > Jars have no modularization characteristics No

More information

8. Component Software

8. Component Software 8. Component Software Overview 8.1 Component Frameworks: An Introduction 8.2 OSGi Component Framework 8.2.1 Component Model and Bundles 8.2.2 OSGi Container and Framework 8.2.3 Further Features of the

More information

OSGi Remote Services with SCA using Apache Tuscany. Raymond Feng

OSGi Remote Services with SCA using Apache Tuscany. Raymond Feng OSGi Remote s with SCA using Apache Tuscany Raymond Feng rfeng@apache.org Agenda What are OSGi remote services? A sample scenario: Distributed Calculator Representing OSGi entities using SCA Predefined

More information

Java Modularity Support in OSGi R4. Richard S. Hall ApacheCon (San Diego) December 14 th, 2005

Java Modularity Support in OSGi R4. Richard S. Hall ApacheCon (San Diego) December 14 th, 2005 Java Modularity Support in OSGi R4 Richard S. Hall ApacheCon (San Diego) December 14 th, 2005 Modularity What is it? What is Modularity? (Desirable) property of a system, such that individual components

More information

ESB, OSGi, and the Cloud

ESB, OSGi, and the Cloud ESB, OSGi, and the Cloud Making it Rain with ServiceMix 4 Jeff Genender CTO Savoir Technologies Jeff Genender - Who is this Shmoe? Apache CXF JSR 316 - Java EE 6 Rules of Engagement Engage yourself! Agenda

More information

Modularity in Java 9. Balázs Lájer Software Architect, GE HealthCare. HOUG Oracle Java conference, 04. Apr

Modularity in Java 9. Balázs Lájer Software Architect, GE HealthCare. HOUG Oracle Java conference, 04. Apr Modularity in Java 9 Balázs Lájer Software Architect, GE HealthCare HOUG Oracle Java conference, 04. Apr. 2016. Modularity in Java before Java 9 Source: https://www.osgi.org/developer/architecture/ 2 MANIFEST.MF

More information

BEAWebLogic. Event Server. WebLogic Event Server Reference

BEAWebLogic. Event Server. WebLogic Event Server Reference BEAWebLogic Event Server WebLogic Event Server Reference Version 2.0 July 2007 Contents 1. Introduction and Roadmap Document Scope and Audience............................................. 1-1 WebLogic

More information

7. Component Models. Distributed Systems Prof. Dr. Alexander Schill

7. Component Models. Distributed Systems Prof. Dr. Alexander Schill 7. Component Models Distributed Systems http://www.rn.inf.tu-dresden.de Outline Motivation for Component Approach Software Components - Definition Component Platforms EJB (Enterprise JavaBeans) Spring

More information

JSR 277, 291 and OSGi, Oh My! - OSGi and Java Modularity

JSR 277, 291 and OSGi, Oh My! - OSGi and Java Modularity JSR 277, 291 and OSGi, Oh My! - OSGi and Java Modularity Richard S. Hall June 28 th, 2006 Agenda Modularity Modularity in Java Modularity in Java + OSGi technology Introduction to OSGi technology Apache

More information

Patterns and Best Practices for Dynamic OSGi Applications

Patterns and Best Practices for Dynamic OSGi Applications Patterns and Best Practices for Dynamic OSGi Applications Kai Tödter, Siemens Corporate Technology Gerd Wütherich, Freelancer Martin Lippert, akquinet it-agile GmbH Agenda» Dynamic OSGi applications» Basics»

More information

CHAPTER 20. Integrating Code Libraries Plug-ins as JARs

CHAPTER 20. Integrating Code Libraries Plug-ins as JARs CHAPTER 20 Integrating Code Libraries Even the most Eclipse-biased developer would concede that the majority of Java libraries out there are not shipped as plug-ins. This chapter discusses the integration

More information

Building Secure OSGi Applications. Karl Pauls Marcel Offermans. luminis

Building Secure OSGi Applications. Karl Pauls Marcel Offermans. luminis Building Secure OSGi Applications Karl Pauls Marcel Offermans luminis Who are we? image 2008 Google Earth luminis Who are we? Karl Pauls Marcel Offermans image 2008 Google Earth luminis Who are we? Arnhem

More information

Red Hat JBoss Fuse 6.1

Red Hat JBoss Fuse 6.1 Red Hat JBoss Fuse 6.1 Managing OSGi Dependencies How to package applications for OSGi containers Last Updated: 2017-10-12 Red Hat JBoss Fuse 6.1 Managing OSGi Dependencies How to package applications

More information

ECLIPSE RICH CLIENT PLATFORM

ECLIPSE RICH CLIENT PLATFORM ECLIPSE RICH CLIENT PLATFORM DESIGNING, CODING, AND PACKAGING JAVA TM APPLICATIONS Jeff McAffer Jean-Michel Lemieux v:addison-wesley Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto

More information

Apache Felix. Richard S. Hall. A Standard Plugin Model for Apache. Atlanta, Georgia U.S.A. November 13th, 2007

Apache Felix. Richard S. Hall. A Standard Plugin Model for Apache. Atlanta, Georgia U.S.A. November 13th, 2007 Apache Felix A Standard Plugin Model for Apache Richard S. Hall Atlanta, Georgia U.S.A. November 13th, 2007 Agenda Why OSGi technology? OSGi technology overview Apache Felix status Example application

More information

CTK Plugin Framework. Technical Introduction. Sascha Zelzer. Presented by

CTK Plugin Framework. Technical Introduction. Sascha Zelzer. Presented by CTK Plugin Framework Technical Introduction Presented by Sascha Zelzer MBI@DKFZ Today's Topics 1. About OSGi 2. Architecture 3. The CTK Plug-in 4. Programming Basics 5. Dealing with services About OSGi

More information

OSGi & Java Modularity

OSGi & Java Modularity OSGi & Java Modularity Jazoon 2009, Zürich by Peter Kriens Productivity Application Complexity Productivity Assembly Application Complexity Productivity Structured Programming Assembly Application Complexity

More information

Using the Plug in Development Environment

Using the Plug in Development Environment IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation bo Table of Contents Introduction to PDE...1 Preparing the workbench...2

More information

SAP Edge Services, cloud edition Edge Services Predictive Analytics Service Guide Version 1803

SAP Edge Services, cloud edition Edge Services Predictive Analytics Service Guide Version 1803 SAP Edge Services, cloud edition Edge Services Predictive Analytics Service Guide Version 1803 Table of Contents MACHINE LEARNING AND PREDICTIVE ANALYTICS... 3 Model Trained with R and Exported as PMML...

More information

Richard S. Hall Karl Pauls Stuart McCulloch David Savage

Richard S. Hall Karl Pauls Stuart McCulloch David Savage Creating modular applications in Java Richard S. Hall Karl Pauls Stuart McCulloch David Savage FOREWORD BY PETER KRIENS SAMPLE CHAPTER MANNING OSGi in Action by Richard S. Hall, Karl Pauls, Stuart McCulloch,

More information

Oracle Fusion Middleware

Oracle Fusion Middleware Oracle Fusion Middleware Developing Extensions for Oracle JDeveloper 12c (12.1.2) E23013-01 June 2013 Documentation for Oracle JDeveloper users that describes how to develop downloadable extensions to

More information

Modularity in Java. With OSGi. Alex Docklands.LJC January Copyright 2016 Alex Blewitt

Modularity in Java. With OSGi. Alex Docklands.LJC January Copyright 2016 Alex Blewitt Modularity in Java With OSGi Alex Blewitt @alblue Docklands.LJC January 2016 Modularity in Java Modularity is Easy? Modularity is Hard! Modularity is Hard! Modularity is Hard! Modularity is Hard! Modularity

More information

PART 1. Eclipse IDE Tutorial. 1. What is Eclipse? Eclipse Java IDE

PART 1. Eclipse IDE Tutorial. 1. What is Eclipse? Eclipse Java IDE PART 1 Eclipse IDE Tutorial Eclipse Java IDE This tutorial describes the usage of Eclipse as a Java IDE. It describes the installation of Eclipse, the creation of Java programs and tips for using Eclipse.

More information

Just Enough Eclipse What is Eclipse(TM)? Why is it important? What is this tutorial about?

Just Enough Eclipse What is Eclipse(TM)? Why is it important? What is this tutorial about? Just Enough Eclipse What is Eclipse(TM)? Eclipse is a kind of universal tool platform that provides a feature-rich development environment. It is particularly useful for providing the developer with an

More information

8. Component Software

8. Component Software 8. Component Software Overview 8.1 Component Frameworks: An Introduction 8.2 OSGi Component Framework 8.2.1 Component Model and Bundles 8.2.2 OSGi Container and Framework 8.2.3 Further Features of the

More information

Eclipse Architecture and Patterns. Mirko Stocker. Advanced Patterns and Frameworks May, 2015 IFS INSTITUTE FOR SOFTWARE

Eclipse Architecture and Patterns. Mirko Stocker. Advanced Patterns and Frameworks May, 2015 IFS INSTITUTE FOR SOFTWARE Eclipse Architecture and Patterns Mirko Stocker Advanced Patterns and Frameworks May, 2015 IFS INSTITUTE FOR SOFTWARE Outline 1 Eclipse Overview 2 SWT and JFace 3 OSGi Bundles and Eclipse Plug-ins 4 Eclipse

More information

An Extensible Open Source AADL Tool Environment (OSATE)

An Extensible Open Source AADL Tool Environment (OSATE) An Extensible Open Source AADL Tool Environment (OSATE) Release 1.0 May 23, 2005 The SEI AADL Team Software Engineering Institute tools@aadl.info 1 Table of Content An Extensible Open Source AADL Tool

More information

Leverage Rational Application Developer v8 to develop OSGi application and test with Websphere Application Server v8

Leverage Rational Application Developer v8 to develop OSGi application and test with Websphere Application Server v8 Leverage Rational Application Developer v8 to develop OSGi application and test with Websphere Application Server v8 Author: Ying Liu cdlliuy@cn.ibm.com Date: June,29 2011 2010 IBM Corporation THE INFORMATION

More information

Oracle Fusion Middleware Developing Extensions for Oracle JDeveloper. 12c ( )

Oracle Fusion Middleware Developing Extensions for Oracle JDeveloper. 12c ( ) Oracle Fusion Middleware Developing Extensions for Oracle JDeveloper 12c (12.2.1.3.0) E67105-01 August 2017 Oracle Fusion Middleware Developing Extensions for Oracle JDeveloper, 12c (12.2.1.3.0) E67105-01

More information

Distributed OSGi through Apache CXF and Web Services

Distributed OSGi through Apache CXF and Web Services Distributed OSGi through Apache CXF and Web Services Irina Astrova Arne Koschel Institute of Cybernetics Faculty IV, Department for Computer Science Tallinn University of Technology University of Applied

More information

IBM Workplace Client Technology API Toolkit

IBM Workplace Client Technology API Toolkit IBM Workplace Client Technology API Toolkit Version 2.5 User s Guide G210-1984-00 IBM Workplace Client Technology API Toolkit Version 2.5 User s Guide G210-1984-00 Note Before using this information and

More information

Class Dependency Analyzer CDA Developer Guide

Class Dependency Analyzer CDA Developer Guide CDA Developer Guide Version 1.4 Copyright 2007-2017 MDCS Manfred Duchrow Consulting & Software Author: Manfred Duchrow Table of Contents: 1 Introduction 3 2 Extension Mechanism 3 1.1. Prerequisites 3 1.2.

More information

13 th Windsor Regional Secondary School Computer Programming Competition

13 th Windsor Regional Secondary School Computer Programming Competition SCHOOL OF COMPUTER SCIENCE 13 th Windsor Regional Secondary School Computer Programming Competition Hosted by The School of Computer Science, University of Windsor WORKSHOP I [ Overview of the Java/Eclipse

More information

Europe on a Disk Geodata Processing with Eclipse and OSGi. Harald Wellmann 10 Nov 2008

Europe on a Disk Geodata Processing with Eclipse and OSGi. Harald Wellmann 10 Nov 2008 Europe on a Disk Geodata Processing with Eclipse and OSGi Harald Wellmann 10 Nov 2008 Overview Past and Present of Navigation Data Processing Anaconda: The Future Our usage of OSGi and Eclipse 2008 Harman

More information

Perceptive Connect Runtime

Perceptive Connect Runtime Perceptive Connect Runtime Developer's Guide Version: 1.4.x Written by: Product Knowledge, R&D Date: August 2016 2016 Lexmark. All rights reserved. Lexmark is a trademark of Lexmark International, Inc.,

More information

Developing Eclipse Rich-Client Applications Tutorial

Developing Eclipse Rich-Client Applications Tutorial Developing Eclipse Rich-Client Applications Tutorial Dr. Frank Gerhardt Gerhardt Informatics Kft. fg@gerhardtinformatics.com Michael Scharf Wind River eclipsecon@scharf.gr 2008 by Frank Gerhardt and Michael

More information

JDT Plug in Developer Guide. Programmer's Guide

JDT Plug in Developer Guide. Programmer's Guide JDT Plug in Developer Guide Programmer's Guide Table of Contents Java Development Tooling overview...1 Java elements and resources...1 Java elements...1 Java elements and their resources...3 Java development

More information

How-to use ipojo factories

How-to use ipojo factories How-to use ipojo factories Overview»» Home Why choose ipojo Success stories Features Download Documentation»» Getting Started»» ipojo in 10 minutes Using Annotations Maven tutorial Advanced tutorial Using

More information

Writing an Axis2 Service from Scratch By Deepal Jayasinghe Axis2 has designed and implemented in a way that makes the end user's job easier. Once he has learnt and understood the Axis2 basics, working

More information

ewon Flexy JAVA J2SE Toolkit User Guide

ewon Flexy JAVA J2SE Toolkit User Guide Application User Guide ewon Flexy JAVA J2SE Toolkit User Guide AUG 072 / Rev. 1.0 This document describes how to install the JAVA development environment on your PC, how to create and how to debug a JAVA

More information

Using Apache Felix: OSGi best practices. Marcel Offermans luminis

Using Apache Felix: OSGi best practices. Marcel Offermans luminis Using Apache Felix: OSGi best practices Marcel Offermans luminis 1 About me Marcel Offermans Software architect at luminis Consultancy & product development Over 4 years of experience with OSGi Committer

More information

Replication and Migration of OSGi Bundles in the Virtual OSGi Framework

Replication and Migration of OSGi Bundles in the Virtual OSGi Framework Systems Group Master s Thesis Replication and Migration of OSGi Bundles in the Virtual OSGi Framework by Damianos Maragkos January 7th, 2008 - July 6th, 2008 Advisor: Jan S. Rellermeyer Prof. Gustavo Alonso

More information

Maven POM project modelversion groupid artifactid packaging version name

Maven POM project modelversion groupid artifactid packaging version name Maven The goal of this document is to introduce the Maven tool. This document just shows some of the functionalities of Maven. A complete guide about Maven can be found in http://maven.apache.org/. Maven

More information

OSGi Cloud Ecosystems. David Bosschaert Principal Engineer, JBoss/Red Hat March 2013

OSGi Cloud Ecosystems. David Bosschaert Principal Engineer, JBoss/Red Hat March 2013 OSGi Cloud Ecosystems David Bosschaert Principal Engineer, JBoss/Red Hat david@redhat.com March 2013 Agenda PaaS today OSGi Cloud Ecosystems 'Demo' PaaS offerings today (1) General deployment containers

More information

Remote Method Invocation

Remote Method Invocation Non-101samples available here: https://github.com/101companies/101repo/tree/master/languages/aspectj/javarmisamples Remote Method Invocation Prof. Dr. Ralf Lämmel Universität Koblenz-Landau Software Languages

More information

Carsten Ziegeler

Carsten Ziegeler Embrace OSGi Change A Developer's Quickstart Carsten Ziegeler cziegeler@apache.org About Member of the ASF Sling, Felix, Cocoon, Portals, Sanselan, Excalibur, Incubator PMC: Felix, Portals, Cocoon, Incubator,

More information

Lesson learned from using EMF to build Desktop & Web Applications. Ludwigsburg, Oct

Lesson learned from using EMF to build Desktop & Web Applications. Ludwigsburg, Oct Lesson learned from using EMF to build Desktop & Web Applications Ludwigsburg, Oct 26 2017 About us Lorenzo Bettini Dip. Informatica, Univ. Firenze, Italy bettini@disia.unifi.it @lorenzo_bettini www.lorenzobettini.it

More information

The Eclipse Rich Client Platform

The Eclipse Rich Client Platform The Eclipse Rich Client Platform Slides by various members of the Eclipse JDT and Platform teams Slides 2004 IBM Corporation Outline Rich Client Application? The Eclipse Plug-in Architecture Eclipse Plug-ins

More information

Getting the Most from Eclipse

Getting the Most from Eclipse Getting the Most from Eclipse Darin Swanson IBM Rational Portland, Oregon Darin_Swanson@us.ibm.com March 17, 2005 What is Eclipse An extensible tools platform Out-of-box function and quality to attract

More information

Lab 1: First Steps in C++ - Eclipse

Lab 1: First Steps in C++ - Eclipse Lab 1: First Steps in C++ - Eclipse Step Zero: Select workspace 1. Upon launching eclipse, we are ask to chose a workspace: 2. We select a new workspace directory (e.g., C:\Courses ): 3. We accept the

More information

What s NetBeans? Like Eclipse:

What s NetBeans? Like Eclipse: What s NetBeans? Like Eclipse: It is a free software / open source platform-independent software framework for delivering what the project calls "richclient applications" It is an Integrated Development

More information

Studienarbeit Nr Web-based Application Integration: Advanced Business Process Monitoring in WSO2 Carbon. Jakob Krein

Studienarbeit Nr Web-based Application Integration: Advanced Business Process Monitoring in WSO2 Carbon. Jakob Krein Institut für Architektur von Anwendungssystemen Universität Stuttgart Universitätsstraße 38 D 70569 Stuttgart Studienarbeit Nr. 2311 Web-based Application Integration: Advanced Business Process Monitoring

More information

CHAPTER 6. Java Project Configuration

CHAPTER 6. Java Project Configuration CHAPTER 6 Java Project Configuration Eclipse includes features such as Content Assist and code templates that enhance rapid development and others that accelerate your navigation and learning of unfamiliar

More information

SAS 9.4 Foundation Services: Administrator s Guide

SAS 9.4 Foundation Services: Administrator s Guide SAS 9.4 Foundation Services: Administrator s Guide SAS Documentation July 18, 2017 The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2013. SAS 9.4 Foundation Services:

More information

Creating an application with dm Server

Creating an application with dm Server Creating an application with dm Server GreenPages: a demonstration Christopher Frost Ben Hale Rob Harrop Glyn Normington Steve Powell Andy Wilkinson 2.0.0.M3 Abstract Spring application programmers are

More information

An Introduction to Eclipse: Quick Guide. Part 1: Getting Started with Eclipse Part 2: Working with Eclipse Useful Online Guides

An Introduction to Eclipse: Quick Guide. Part 1: Getting Started with Eclipse Part 2: Working with Eclipse Useful Online Guides An Introduction to Eclipse: Quick Guide Part 1: Getting Started with Eclipse Part 2: Working with Eclipse Useful Online Guides 1 1 Part 1: Getting Started with Eclipse Installation & Running The User Interface

More information

Advanced User Interface Programming Using the Eclipse Rich Client Platform

Advanced User Interface Programming Using the Eclipse Rich Client Platform Advanced User Interface Programming Using the Eclipse Rich Client Platform Tod Creasey IBM Canada Tod Creasey Advanced User Interface Programming Using the Eclipse Rich Client Platform Page 1 About the

More information

Extensibility, Componentization, and Infrastructure

Extensibility, Componentization, and Infrastructure Extensibility, Componentization, and Infrastructure Ted Slupesky (slupesky@us.ibm.com) Copyright 2006 IBM Corp. Available under terms of the Eclipse Public License http://www.eclipse.org/legal/epl-v10.html

More information

OSGi Subsystems from theory to practice Glyn Normington. Eclipse Virgo Project Lead SpringSource/VMware

OSGi Subsystems from theory to practice Glyn Normington. Eclipse Virgo Project Lead SpringSource/VMware from theory to practice Glyn Normington Eclipse Virgo Project Lead SpringSource/VMware 1 Software rots 2 modularity helps 3 but... 4 A clean design 5 without enforcement 6 works fine for a while 7 then

More information

Oracle Complex Event Processing

Oracle Complex Event Processing Oracle Complex Event Processing Reference Guide Release 3.0 July 2008 Alpha/Beta Draft Oracle Complex Event Processing Reference Guide, Release 3.0 Copyright 2007, 2008, Oracle and/or its affiliates. All

More information

Javac and Eclipse tutorial

Javac and Eclipse tutorial Javac and Eclipse tutorial Author: Balázs Simon, BME IIT, 2013. Contents 1 Introduction... 2 2 JRE and JDK... 2 3 Java and Javac... 2 4 Environment variables... 3 4.1 Setting the environment variables

More information

OSGi on the Server. Martin Lippert (it-agile GmbH)

OSGi on the Server. Martin Lippert (it-agile GmbH) OSGi on the Server Martin Lippert (it-agile GmbH) lippert@acm.org 2009 by Martin Lippert; made available under the EPL v1.0 October 6 th, 2009 Overview OSGi in 5 minutes Apps on the server (today and tomorrow)

More information

Tutorial ipojo. 2. Preparation

Tutorial ipojo. 2. Preparation Tutorial ipojo 1. Context This tutorial is based on a pretty simple application. This application simulates a snack bar where products (hotdog, popcorn) are provided by vendors exposed as services. This

More information

SAS 9.2 Foundation Services. Administrator s Guide

SAS 9.2 Foundation Services. Administrator s Guide SAS 9.2 Foundation Services Administrator s Guide The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2009. SAS 9.2 Foundation Services: Administrator s Guide. Cary, NC:

More information

TestingofScout Application. Ludwigsburg,

TestingofScout Application. Ludwigsburg, TestingofScout Application Ludwigsburg, 27.10.2014 The Tools approach The Testing Theory approach Unit testing White box testing Black box testing Integration testing Functional testing System testing

More information

Getting Started with Eclipse for Java

Getting Started with Eclipse for Java Getting Started with Eclipse for Java Maria Litvin Phillips Academy, Andover, Massachusetts Gary Litvin Skylight Publishing 1. Introduction 2. Downloading and Installing Eclipse 3. Importing and Exporting

More information

What s next for e4. Tom Schindl Website:

What s next for e4. Tom Schindl Website: What s next for e4 Tom Schindl Twitter: @tomsontom Website: http://www.bestsolution.at About Tom CTO BestSolution.at Systemhaus GmbH Eclipse Committer e4 Platform EMF Project

More information

CS5233 Components Models and Engineering

CS5233 Components Models and Engineering CS5233 Components Models and Engineering - Komponententechnologien Master of Science (Informatik) Java Services Seite 1 Services Services Build-in technology Java 6 build-in technology to load services

More information

Rest Client for MicroProfile. John D. Ament, Andy McCright

Rest Client for MicroProfile. John D. Ament, Andy McCright Rest Client for MicroProfile John D. Ament, Andy McCright 1.1, May 18, 2018 Table of Contents Microprofile Rest Client..................................................................... 2 MicroProfile

More information

Creating an application with the Virgo Web Server

Creating an application with the Virgo Web Server Creating an application with the Virgo Web Server GreenPages: a demonstration Christopher Frost Ben Hale Rob Harrop Glyn Normington Steve Powell Andy Wilkinson Abstract 2.1.0.CI-10 Warning Please note

More information

NetBeans IDE Field Guide

NetBeans IDE Field Guide NetBeans IDE Field Guide Copyright 2005 Sun Microsystems, Inc. All rights reserved. Table of Contents Extending Web Applications with Business Logic: Introducing EJB Components...1 EJB Project type Wizards...2

More information

Creating an application with dm Server

Creating an application with dm Server Creating an application with dm Server GreenPages: a demonstration Christopher Frost Ben Hale Rob Harrop Glyn Normington Steve Powell Andy Wilkinson 2.0.0.RC1 Abstract Spring application programmers are

More information

HPE Security Fortify Plugins for Eclipse

HPE Security Fortify Plugins for Eclipse HPE Security Fortify Plugins for Eclipse Software Version: 17.20 Installation and Usage Guide Document Release Date: November 2017 Software Release Date: November 2017 Legal Notices Warranty The only warranties

More information

3 CREATING YOUR FIRST JAVA APPLICATION (USING WINDOWS)

3 CREATING YOUR FIRST JAVA APPLICATION (USING WINDOWS) GETTING STARTED: YOUR FIRST JAVA APPLICATION 15 3 CREATING YOUR FIRST JAVA APPLICATION (USING WINDOWS) GETTING STARTED: YOUR FIRST JAVA APPLICATION Checklist: The most recent version of Java SE Development

More information

B. Assets are shared-by-copy by default; convert the library into *.jar and configure it as a shared library on the server runtime.

B. Assets are shared-by-copy by default; convert the library into *.jar and configure it as a shared library on the server runtime. Volume A~B: 114 Questions Volume A 1. Which component type must an integration solution developer define for a non-sca component such as a Servlet that invokes a service component interface? A. Export

More information

Updated after review Removed paragraph mentioned java source code.

Updated after review Removed paragraph mentioned java source code. Functional Specification for DCR Plug-in Support Author(s): joel.binnquist.xc@ericsson.com Version: 1.3 Version Date Comment 0.1 2009-01-20 First version 1.0 2009-04-02 Updated after review. - Removed

More information

OSGi Service Platform Core Specification. The OSGi Alliance

OSGi Service Platform Core Specification. The OSGi Alliance OSGi Service Platform Core Specification The OSGi Alliance Release 4, Version 4.3 April 2011 Copyright OSGi Alliance (2000,2011). All Rights Reserved. OSGi Specification License, Version 1.0 The OSGi Alliance

More information

Java WebStart, Applets & RMI

Java WebStart, Applets & RMI Java WebStart, Applets & RMI 11-13-2013 Java WebStart & Applets RMI Read: Java Web Start Tutorial Doing More with Rich Internet Applications Java Web Start guide Exam#2 is scheduled for Tues., Nov. 19,

More information