Skip to main content
Jump to: navigation, search

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

Line 1: Line 1:
 
==Introduction==
 
==Introduction==
  
See the [[Tutorial:_Building_your_first_OSGi_Remote_Service | Building your first OSGi Remote Services Tutorial]] to understand how to design and build this example TimeService.
+
See the [[Tutorial:_Building_your_first_OSGi_Remote_Service | Building your first OSGi Remote Services Tutorial]] to understand how to design and build this example.
  
To run the remote time service host example on Apache Karaf with ECF Remote Services simply install the timeservice host example feature
+
Prior to running this tutorial you must [[EIG:Install_into_Apache_Karaf | install ECF Remote Services into your Karaf server]].
 +
 
 +
==Exporting the Remote Service==
 +
 
 +
To export the remote time service host with Apache Karaf simply install the timeservice host example feature
  
 
'''feature:install -v ecf-remoteservices-examples-timeservice-host'''
 
'''feature:install -v ecf-remoteservices-examples-timeservice-host'''
  
This will install the timeservice host, and when it starts it producing the following output on console
+
This will install two bundles: the timeservice API bundle (com.mycorp.examples.timeservice) and the timeservice host bundle (com.mycorp.examples.timeservice.host).  When Karaf start these bundles, they are exported, and will produce the following output on console
  
 
[[File:Karafinst4.png]]
 
[[File:Karafinst4.png]]
Line 13: Line 17:
 
The output after the EXPORT_REGISTRATION indicates that the TimeService has been exported as a remote service and is ready for remote consumer discovery and usage.   
 
The output after the EXPORT_REGISTRATION indicates that the TimeService has been exported as a remote service and is ready for remote consumer discovery and usage.   
  
For reference, this output is produced by the TimeService Examples Host activator class  [http://git.eclipse.org/c/ecf/org.eclipse.ecf.git/tree/examples/bundles/com.mycorp.examples.timeservice.host/src/com/mycorp/examples/timeservice/host/Activator.java com.mycorp.examples.timeservice.host.Activator]
+
For reference, this output is produced by the TimeService Examples Host activator class  [http://git.eclipse.org/c/ecf/org.eclipse.ecf.git/tree/examples/bundles/com.mycorp.examples.timeservice.host/src/com/mycorp/examples/timeservice/host/Activator.java com.mycorp.examples.timeservice.host.Activator].

Revision as of 19:20, 10 August 2015

Introduction

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

Prior to running this tutorial you must install ECF Remote Services into your Karaf server.

Exporting the Remote Service

To export the remote time service host with Apache Karaf simply install the timeservice host example feature

feature:install -v ecf-remoteservices-examples-timeservice-host

This will install two bundles: the timeservice API bundle (com.mycorp.examples.timeservice) and the timeservice host bundle (com.mycorp.examples.timeservice.host). When Karaf start these bundles, they are exported, and will produce the following output on console

Karafinst4.png

The output after the EXPORT_REGISTRATION indicates that the TimeService has been exported as a remote service and is ready for remote consumer discovery and usage.

For reference, this output is produced by the TimeService Examples Host activator class com.mycorp.examples.timeservice.host.Activator.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.