Skip to main content
Jump to: navigation, search

EIG:Install TimeService Tutorial into Apache Karaf

Revision as of 12:30, 9 March 2014 by (Talk | contribs) (Introduction)


In ECF 3.8+ it's possible to use Apache Karaf runtime to install the ECF SDK and run remote service applications. Once such example application is the Building your first OSGi Remote Services Tutorial.

The tutorial explains how to first Implement the Remote Service and then Register the Remote Service.

To run the remo]]te service host on Apache Karaf, it's first necessary to install the relevant bundles into the Karaf runtime. To do this, first Install the ECF Remote Service SDK into Apache Karaf. Once the ECF SDK is installed you may install the Timeline Example bundles with the following feature install (may be done from the Karaf command shell or from the webconsole):

karaf@root()> feature:install -v

Once complete, the install process should look like this


Optionally, before starting the TimeService host you can turn on some extra output by issuing this command into the Apache command shell

karaf@root()> system:property verboseRemoteServiceAdmin true

Then using the webconsole (or the command shell) simply start the bundle named ECF RS Example Timeservice Host ( This will produce output in the command shell (System.out) similar to the following, indicating that the service has been exported by RemoteServiceAdmin and the MyTimeService registered.

karaf@root()> Service Exported by RemoteServiceAdmin.  EndpointDescription
ecf.endpoint.ts=1394381999769, ecf.generic.server.hostname=localhost, ecf.generic.server.port=3288,, endpoint.framework.uuid=0a22aaf0-e110-4a89-ac62-edd97e44b2c1,,,, objectClass=Ljava.lang.String;@78d2df8c, remote.configs.supported=
[Ljava.lang.String;@6faf2576, remote.intents.supported=[Ljava.lang.String;@53c49f42,,
service.imported=true, service.imported.configs=[Ljava.lang.String;@6faf2576}
MyTimeService host registered with registration=org.apache.felix.framework.ServiceRegistrationImpl@7a627ff2

For reference, this output is produced by the TimeService Examples Host activator class

The output above indicates that the TimeService has been exported and is ready for remote consumer access.

Back to the top