felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vlad Arkhipov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FELIX-3096) Could not add FrameworkListener from ServiceListener
Date Wed, 31 Aug 2011 06:37:10 GMT
Could not add FrameworkListener from ServiceListener

                 Key: FELIX-3096
                 URL: https://issues.apache.org/jira/browse/FELIX-3096
             Project: Felix
          Issue Type: Bug
    Affects Versions: framework-3.2.2
            Reporter: Vlad Arkhipov
            Priority: Critical

It's now impossible to add a FrameworkListener from ServiceListener in 3.2.x, worked in 3.0.9.
The code below hangs in addFrameworkListener when it tries to acquire a global lock on the
framework bundle.

Framework framework = ...

final BundleContext ctx = framework.getBundleContext();
ctx.addServiceListener(new ServiceListener() {
    public void serviceChanged(ServiceEvent event) {
        if (...) {
            ctx.addFrameworkListener(new FrameworkListener() {
                public void frameworkEvent(FrameworkEvent event) {

StartLevel sl = (StartLevel) ctx.getService(ctx.getServiceReference(StartLevel.class.getName()));

// Install bundles, set start level.


This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message