Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Extending Eclipse monitoring, profiling, and testing functions
Previous Page Home Next Page

Using Common Services APIs in Stand Alone Mode

It is possible to run the common service APIs in stand alone mode. One should first note that the common service runtime is based on a plug-in development paradigm. These plug-ins are managed by several OSGI services implemented in the Equinox project. Therefore, before calling any of the common service APIs in stand alone mode the OSGI services should be started. For convenience a helper class called org.eclipse.tptp.platform.common.provisional.OSGIStarter is provided to start up the OSGI services. One would use this helper class as follows:

  1. Create an instance of the OSGIStarter.
  2. Start the OSGI services.
  3. Call the common service APIs.
  4. Shutdown the OSGI services.

The following code snippet illustrates this workflow.

1

OSGIStarter osgiLauncher = new OSGIStarter( );

2

osgiLauncher.startup( "C:\driver\eclipse", null );

3
....
4
osgiLauncher.shutdown()

1. Create an instance of the OSGIStarter

org.eclipse.tptp.platform.common.provisional.OSGIStarter is a helper class that provides methods to start and shutdown the OSGI services.

2. Start up the OSGI services

The startup method takes in a directory location containing the plug-ins directory and configuration directory. The plug-ins directory contains the list of plug-ins The configuration directory contains the config.ini file. The config.ini file contains a list of plug-ins that will be loaded when the OSGI services start. To run in stand alone mode the content of the config.ini file should be as follows:

#Product Runtime Configuration File
eclipse.product=org.eclipse.tptp.platform.lta.la.core.ServicesSDK
osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.core.jobs@2:start,org.eclipse.core.runtime.compatibility.registry,org.eclipse.equinox.registry@2:start,org.eclipse.equinox.preferences@2:start,org.eclipse.core.contenttype,org.eclipse.core.runtime@2:start,org.eclipse.update.configurator@3:start,com.ibm.icu,org.eclipse.tptp.platform.lta.la.core@2:start osgi.bundles.defaultStartLevel=4

Note one can configure how the plug-ins are loaded by modifying this file. Refer to the Equinox home page for information how to configure this file.

3. Call the common service APIs

After starting the OSGI services the common service APIs can be called to import, export log files, symptom catalogs, correlate, analyze log files, etc.

4. Shutdown OSGI services

Once done the OSGI services should be shutdown.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire