Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EIG:Install TimeService Tutorial into Apache Karaf"

Line 11: Line 11:
 
karaf@root()> '''feature:install -v ecf.rs.examples.timeservice.host'''
 
karaf@root()> '''feature:install -v ecf.rs.examples.timeservice.host'''
  
Once complete, the install process should look like this
+
This will install the timeservice host, and start it producing the following output on console
  
 
[[File:Karafinst4.png]]
 
[[File:Karafinst4.png]]

Revision as of 15:43, 6 July 2015

Introduction

See the Building your first OSGi Remote Services Tutorial to understand how to design and build this example TimeService.

To run the remote time service host example on Apache Karaf with ECF Remote Services, first install Install the ECF Remote Service SDK into Apache Karaf. Then use the command shell to set a debug system property

karaf@root()> system:property verboseRemoteServiceAdmin true

Then install the timeservice host example

karaf@root()> feature:install -v ecf.rs.examples.timeservice.host

This will install the timeservice host, and start it producing the following output on console

Karafinst4.png

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 service.exported.configs ecf.generic.server

Then using the webconsole (or the command shell) start the bundle

ECF RS Example Timeservice Host (bundle symbolic id: com.mycorp.examples.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 Properties=ecf.endpoint.id=
ecftcp://localhost:3288/server, ecf.endpoint.id.ns=org.eclipse.ecf.core.identity.StringID, 
ecf.endpoint.ts=1394381999769, ecf.generic.server.hostname=localhost, ecf.generic.server.port=3288, 
ecf.rsvc.id=1, endpoint.framework.uuid=0a22aaf0-e110-4a89-ac62-edd97e44b2c1, 
endpoint.id=a7d3c846-5304-4e34-bf43-03224a4a138f, endpoint.package.version.com.mycorp.examples.timeservice=1.0.0,
endpoint.service.id=485, objectClass=Ljava.lang.String;@78d2df8c, remote.configs.supported=
[Ljava.lang.String;@6faf2576, remote.intents.supported=[Ljava.lang.String;@53c49f42, service.id=485,
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 com.mycorp.examples.timeservice.host.Activator

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

Copyright © Eclipse Foundation, Inc. All Rights Reserved.