karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steinar Bang ...@dod.no>
Subject What's the current model for console commands?
Date Tue, 18 Jul 2017 15:24:55 GMT
I need to create a very simple console command to provide a way to
forcibly unlock a liquibase changelog lock (can be left in place as
locked if the liquibase update code crashes during a changelog update).

However I have a hard time figuring out how to do this.

The descriptions that google digs up are very much out of date.

The classes these documents refer to have changed their package names,
have been deprecated for the last 3 years, as a fix for this issue:

What I would have liked to do, was to register an OSGi service and have
karaf pick it up.  But that sounds like the whiteboarding pattern and
that ended up as a won't fix:

Is the current way, the following?
 1. Create a class that implements the interface
 2. Add a @Service annotation to the class
 3. Karaf will find an instantiate this class

(If so, then that's not ideal, because then that action class will need
to use some kind of singleton to get to the OSGi services it needs...)


- Steinar

View raw message