sailor
sailor

Reputation: 781

Running equinox OSGi as a Fedora service

till now i implement a fedora service which starts my OSGi when machine starts. I have problem with stopping it. I simply don't know how to stop equinox osgi from my terminal/shell script, when i execute service <osgi servicename> stop

I have a specific requirement, when i stop the OSGi i want to stop by bundles in particular sequence. I wrote a bundle stopper code, but how i call it from outside the osgi terminal ?

i tried with telnet, but not approved solution.

Upvotes: 2

Views: 378

Answers (2)

szhem
szhem

Reputation: 4712

You can use the community edition of Java Service Wrapper. Using WrapperStartStopApp or WrapperListener should fit your needs.

Upvotes: 1

Christian Schneider
Christian Schneider

Reputation: 19606

The simplest way is to use Apache Karaf. It can be configured to use Equinox under the hood and comes with init scripts you can use to start and stop it.

With pure Equinox you have to implement it yourself. There is a good code project that shows how to do it. http://code.google.com/p/equinox-headless-service/

Upvotes: 0

Related Questions