Package de.kalpatec.pojosr.framework.launch

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


  public static void main(String args[]) {
    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


    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

     *
     * @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

    }


    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

    }


    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

    }


    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

     *
     * @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

        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

        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

TOP

Related Classes of de.kalpatec.pojosr.framework.launch.ClasspathScanner

Copyright © 2018 www.massapicom. 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.