I agree, I think SynchronousBundleListener is better. (Wasn’t license management one of the primary reasons for this class?) This can prevent a bundle being installed and uninstall it when it attempts to get resolved and its license is expired.
I’ve also once experimented with encrypting the class files and using the weaving hook. But I agree that creates awkward error reporting. And it might be expensive. Of course, just as the hooks, the Synchronous Bundle Listener does have an ordering issue. (One of the few good reasons for start levels.) Kind regards, Peter Kriens > On 11 nov. 2015, at 14:43, Thomas Watson <tjwat...@us.ibm.com> wrote: > > A resolver hook seems like a good option for doing this but there are > drawbacks. One drawback of this approach is that the resolver error from the > framework is going to give not indication for why the bundle is not allowed > to resolve, only that a hook prevented it from resolving. It would seem a > better approach would be for the management agent to check licenses when > installing bundles and to not even let the bundles into the framework if they > are not appropriate. > > Tom > > > > > > From: Raymond Auge <raymond.a...@liferay.com> > To: OSGi Developer Mail List <osgi-dev@mail.osgi.org> > Date: 11/10/2015 07:39 PM > Subject: [osgi-dev] resolver hook for license checks > Sent by: osgi-dev-boun...@mail.osgi.org > > > > Hey All, > > We're using a resolver hook for application license checking. > > I like this since it's nice clean and stops bundles early and efficiently. > > However I'm wondering how other people may have done this! > > -- > Raymond Augé <http://www.liferay.com/web/raymond.auge/profile> (@rotty3000) > Senior Software Architect Liferay, Inc. <http://www.liferay.com/> (@Liferay) > Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org/> > (@OSGiAlliance)_______________________________________________ > OSGi Developer Mail List > osgi-dev@mail.osgi.org > https://mail.osgi.org/mailman/listinfo/osgi-dev > <https://mail.osgi.org/mailman/listinfo/osgi-dev> > > _______________________________________________ > OSGi Developer Mail List > osgi-dev@mail.osgi.org > https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev