// save configs of all plugins
ServiceTracker st = new ServiceTracker(ctx, Configurable.class.getName(), null);
st.open();
Object[] plugins = st.getServices();
for (Object plugin : plugins) {
Configurable c = (Configurable) plugin;
c.saveConfig();
}
st.close();
}