I'm trying to register a service in a thread spawned from an
Activator.start() method but the call is deadlocking. If I make the same
calls within the start() thread it works fine. Should the following work?

    public void start(final BundleContext bundleContext) throws Exception
    {
        Thread bundleStartupThread = new Thread(new Runnable(){
            public void run()
            {
                    Hashtable properties = new Hashtable();
                    properties.put(
                       Constants.SERVICE_PID,
                        "foo.bar");
                    bundleContext.registerService(Integer.class.getName(),
new Integer(4) , properties);
                    
            }
        });

        bundleStartupThread.start();
    }

-- 
View this message in context: 
http://www.nabble.com/Deadlock-registering-service-tp23947039p23947039.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to