users@glassfish.java.net

Re: How to add Java network server into OSGI bundle

From: <forums_at_java.net>
Date: Sat, 11 Feb 2012 03:59:46 -0600 (CST)

I register the Java network server as service. When I try to deploy the OSGI
bundle with the java server Glassfish freezes. But I can successfully make a
connection with the java network client. It seems that when I try to deploy
the OSGI bundle there is a infinite loop. How I can solve the problem? This
is the code of the Activator:
package org.DX_57.osgi.CB_27.impl;
import java.util.Properties;
import org.DX_57.osgi.CB_27.api.CBridge;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
public class CBridgeApp implements BundleActivator {
    public void start(BundleContext bc) throws Exception {
        bc.registerService(CBridge.class.getName(), new CBridgeImpl(),
new Properties());
        bc.registerService(EchoServer.class.getName(), new EchoServer(),
new Properties());
    }
    public void stop(BundleContext bc) throws Exception {
        bc.ungetService(bc.getServiceReference(CBridge.class.getName()));
    }
}
 


--
[Message sent by forum member 'rcbandit']
View Post: http://forums.java.net/node/883397