Examples of ClasspathScanner


Examples of de.kalpatec.pojosr.framework.launch.ClasspathScanner

    FileOutputStream fos = null;
    try {
      // Configure PojoSR
      Map<String, Object> pojoSrConfig = new HashMap<String, Object>();
      pojoSrConfig.put(PojoServiceRegistryFactory.BUNDLE_DESCRIPTORS, new ClasspathScanner());

      // Start PojoSR 'framework'
      Framework framework = new PojoServiceRegistryFactoryImpl().newFramework(pojoSrConfig);
      framework.init();
      framework.start();
View Full Code Here

Examples of de.kalpatec.pojosr.framework.launch.ClasspathScanner

     *
     * @return List pointers to OSGi bundles.
     * @throws Exception If looking up the bundles fails.
     */
    private static List<BundleDescriptor> getBundleDescriptors(final String bundleFilter) throws Exception {
        return new ClasspathScanner().scanForBundles(bundleFilter);
    }
View Full Code Here

Examples of de.kalpatec.pojosr.framework.launch.ClasspathScanner

    }


    private void startBundles(PojoServiceRegistry registry) {
        try {
            List<BundleDescriptor> descriptors = new ClasspathScanner().scanForBundles();
            descriptors = processDescriptors(descriptors);
            registry.startBundles(descriptors);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
View Full Code Here

Examples of de.kalpatec.pojosr.framework.launch.ClasspathScanner

    }


    private void startBundles(PojoServiceRegistry registry) {
        try {
            List<BundleDescriptor> descriptors = new ClasspathScanner().scanForBundles();
            descriptors = Lists.newArrayList(descriptors);
            descriptors = processDescriptors(descriptors);
            registry.startBundles(descriptors);
        } catch (Exception e) {
            throw new RuntimeException(e);
View Full Code Here

Examples of de.kalpatec.pojosr.framework.launch.ClasspathScanner

    }


    private void startBundles(PojoServiceRegistry registry) {
        try {
            List<BundleDescriptor> descriptors = new ClasspathScanner().scanForBundles();
            descriptors = processDescriptors(descriptors);
            registry.startBundles(descriptors);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
View Full Code Here

Examples of de.kalpatec.pojosr.framework.launch.ClasspathScanner

     *
     * @return List pointers to OSGi bundles.
     * @throws Exception If looking up the bundles fails.
     */
    private static List<BundleDescriptor> getBundleDescriptors(final String bundleFilter) throws Exception {
        return new ClasspathScanner().scanForBundles(bundleFilter);
    }
View Full Code Here

Examples of de.kalpatec.pojosr.framework.launch.ClasspathScanner

        enc.setConfig(env);

        System.setProperty("org.osgi.framework.storage", "target/osgi/" + System.currentTimeMillis());
        System.setProperty("karaf.name", "root");

        List<BundleDescriptor> bundles = new ClasspathScanner().scanForBundles("(Bundle-SymbolicName=*)");
        bundles.add(getBundleDescriptor(
                "target/jasypt2.jar",
                bundle().add("OSGI-INF/blueprint/karaf-jaas-jasypt.xml", getClass().getResource("/OSGI-INF/blueprint/karaf-jaas-jasypt.xml"))
                        .set("Manifest-Version", "2")
                        .set("Bundle-ManifestVersion", "2")
View Full Code Here

Examples of de.kalpatec.pojosr.framework.launch.ClasspathScanner

        System.setProperty("foo", val);

        System.setProperty("org.bundles.framework.storage", "target/bundles/" + System.currentTimeMillis());
        System.setProperty("karaf.name", "root");

        List<BundleDescriptor> bundles = new ClasspathScanner().scanForBundles("(Bundle-SymbolicName=*)");
        bundles.add(getBundleDescriptor(
                "target/jasypt.jar",
                bundle().add("OSGI-INF/blueprint/karaf-jaas-jasypt.xml", getClass().getResource("/OSGI-INF/blueprint/karaf-jaas-jasypt.xml"))
                           .set("Manifest-Version", "2")
                           .set("Bundle-ManifestVersion", "2")
View Full Code Here

Examples of org.apache.felix.connect.launch.ClasspathScanner

      start();
    }

    public void start() throws BundleException {
      try {
        m_reg.startBundles((m_filter != null) ? new ClasspathScanner()
          .scanForBundles(m_filter)
          : new ClasspathScanner().scanForBundles());
      } catch (Exception e) {
        throw new BundleException("Error starting framework", e);
      }
    }
View Full Code Here

Examples of org.apache.felix.connect.launch.ClasspathScanner

        }
      }
        Map config = new HashMap();
        config.put(
                PojoServiceRegistryFactory.BUNDLE_DESCRIPTORS,
                (filter != null) ? new ClasspathScanner()
                        .scanForBundles(filter.toString()) : new ClasspathScanner()
                        .scanForBundles());
        new PojoServiceRegistryFactoryImpl().newPojoServiceRegistry(config);
        if (main != null) {
          int count = 0;
          if (filter != null) {
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.