Examples of OsgiPlatform


Examples of org.springframework.osgi.test.platform.OsgiPlatform

         return 10L;
    }
   
    /* work-around Felix 1.4.x which doesn't fully support fragments and throws an exception by default */
  protected OsgiPlatform createPlatform() {
    OsgiPlatform platform = super.createPlatform();
    platform.getConfigurationProperties().setProperty("felix.fragment.validation", "warning");
    return platform;
  }   
View Full Code Here

Examples of org.springframework.osgi.test.platform.OsgiPlatform

   */
  protected OsgiPlatform createPlatform() {
    boolean trace = logger.isTraceEnabled();
    String platformClassName = getPlatformName();

    OsgiPlatform platform = null;
    ClassLoader currentCL = getClass().getClassLoader();

    if (StringUtils.hasText(platformClassName)) {
      if (ClassUtils.isPresent(platformClassName, currentCL)) {
        Class platformClass = ClassUtils.resolveClassName(platformClassName, currentCL);
        if (OsgiPlatform.class.isAssignableFrom(platformClass)) {
          if (trace)
            logger.trace("Instantiating platform wrapper...");
          try {
            platform = (OsgiPlatform) platformClass.newInstance();
          }
          catch (Exception ex) {
            logger.warn("cannot instantiate class [" + platformClass + "]; using default");
          }
        }
        else
          logger.warn("Class [" + platformClass + "] does not implement " + OsgiPlatform.class.getName()
              + " interface; falling back to defaults");
      }
      else {
        logger.warn("OSGi platform starter [" + platformClassName + "] not found; using default");
      }

    }
    else
      logger.trace("No platform specified; using default");

    // fall back
    if (platform == null)
      platform = new EquinoxPlatform();

    Properties config = platform.getConfigurationProperties();
    // add boot delegation
    config.setProperty(Constants.FRAMEWORK_BOOTDELEGATION,
      getBootDelegationPackageString());

    return platform;
View Full Code Here

Examples of org.springframework.osgi.test.platform.OsgiPlatform

    unpackBundle(bundle, tmpFile);
  }

  protected OsgiPlatform createPlatform() {
    OsgiPlatform platform = super.createPlatform();
    platform.getConfigurationProperties().setProperty("felix.fragment.validation", "warning");
    return platform;
  }
View Full Code Here

Examples of org.springframework.osgi.test.platform.OsgiPlatform

        }
  }
 
    /* work-around Felix 1.4.x which doesn't fully support fragments and throws an exception by default */
  protected OsgiPlatform createPlatform() {
    OsgiPlatform platform = super.createPlatform();
    platform.getConfigurationProperties().setProperty("felix.fragment.validation", "warning");
    return platform;
 
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.