Package org.osgi.framework

Examples of org.osgi.framework.BundleActivator.start()


                    Class<?> clazz = getClass().getClassLoader().loadClass(s);
                    Object o = clazz.newInstance();
                    if (o instanceof BundleActivator) {
                        BundleActivator ba = (BundleActivator) o;
                        activators.add(ba);
                        ba.start(ctx);
                    }
                } catch (Throwable th) {
                    th.printStackTrace();
                }
            }
View Full Code Here


                    Class<?> clazz = getClass().getClassLoader().loadClass(s);
                    Object o = clazz.newInstance();
                    if (o instanceof BundleActivator) {
                        BundleActivator ba = (BundleActivator) o;
                        activators.add(ba);
                        ba.start(ctx);
                    }
                } catch (Throwable th) {
                    th.printStackTrace();
                }
            }
View Full Code Here

   
    @Override
    public void init(BundleContext context, DependencyManager manager) throws Exception {
        for (int i = 0; i < m_activators.length; i++) {
            BundleActivator a = m_activators[i];
            a.start(context);
        }
       
        manager.add(createComponent()
            .setImplementation(this)
            .add(createServiceDependency()
View Full Code Here

            try {
                Manifest mf = new Manifest(is);
                className = mf.getMainAttributes().getValue(KARAF_ACTIVATOR);
                if (className != null) {
                    BundleActivator activator = (BundleActivator) classLoader.loadClass(className).newInstance();
                    activator.start(framework.getBundleContext());
                    karafActivators.add(activator);
                }
            } catch (Throwable e) {
                if (className != null) {
                    System.err.println("Error starting karaf activator " + className + ": " + e.getMessage());
View Full Code Here

            // start the bundle unless there is a system property with the same package name as
            // the package that the bundle activator is part of that has the value 'disabled'
            // example use case: turn off the embedded scheduler
            String packageName = a.getClass().getPackage().getName();
            if (!"disabled".equals(System.getProperty(packageName))) {
                a.start(context);
            }
            else if (!m_quiet) {
                System.out.println("Not starting activator " + packageName + ".");
            }
        }
View Full Code Here

            try {
                Manifest mf = new Manifest(is);
                className = mf.getMainAttributes().getValue(KARAF_ACTIVATOR);
                if (className != null) {
                    BundleActivator activator = (BundleActivator) classLoader.loadClass(className).newInstance();
                    activator.start(framework.getBundleContext());
                    karafActivators.add(activator);
                }
            } catch (Throwable e) {
                if (className != null) {
                    System.err.println("Error starting karaf activator " + className + ": " + e.getMessage());
View Full Code Here

                    SecurityUtils.doPrivilegedExceptionAction(new PrivilegedExceptionAction<Void>()
                    {
                        public Void run() throws Exception
                        {
                            bundleActivator.start(bundleController.getBundleContext());
                            return null;
                        }
                    },
                                                              framework.getAcc());
                }
View Full Code Here

            try {
                Manifest mf = new Manifest(is);
                className = mf.getMainAttributes().getValue(KARAF_ACTIVATOR);
                if (className != null) {
                    BundleActivator activator = (BundleActivator) classLoader.loadClass(className).newInstance();
                    activator.start(framework.getBundleContext());
                    karafActivators.add(activator);
                }
            } catch (Throwable e) {
                if (className != null) {
                    System.err.println("Error starting karaf activator " + className + ": " + e.getMessage());
View Full Code Here

            try {
                Manifest mf = new Manifest(is);
                className = mf.getMainAttributes().getValue(KARAF_ACTIVATOR);
                if (className != null) {
                    BundleActivator activator = (BundleActivator) classLoader.loadClass(className).newInstance();
                    activator.start(framework.getBundleContext());
                    karafActivators.add(activator);
                }
            } catch (Throwable e) {
                if (className != null) {
                    System.err.println("Error starting karaf activator " + className + ": " + e.getMessage());
View Full Code Here

                String fragmentActivator = frag.getSymbolicName() + ".FragmentActivator";
                Class<?> c = Class.forName(fragmentActivator);
                if (c != null)
                {
                    BundleActivator bActivator = (BundleActivator) c.newInstance();
                    bActivator.start(_context);
                    _activatedFragments.add(bActivator);
                }
            }
            catch (NullPointerException e)
            {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.