Examples of IWebApplication


Examples of org.emrys.webosgi.core.service.IWebApplication

    BundleContextRunnable runnable = new BundleContextRunnable(
        getBundleContext()) {
      @Override
      protected IStatus execute() {
        // Make sure active the web application dynamically.
        IWebApplication webApp = getBundleContext().getWebApplication();
        if (!FwkRuntime.getInstance().makeSureWabActive(webApp)) {
          return new Status(Status.ERROR, FwkActivator.getInstance()
              .getBundleSymbleName(),
              "Web appliction not actived and wait timeout to do servlet filter:"
                  + filterBase.name);
View Full Code Here

Examples of org.emrys.webosgi.core.service.IWebApplication

        getBundleContext()) {
      @Override
      protected IStatus execute() {
        try {
          // Make sure active the web application dynamically.
          IWebApplication webApp = getBundleContext()
              .getWebApplication();
          if (!FwkRuntime.getInstance().makeSureWabActive(webApp)) {
            return new Status(Status.ERROR, FwkActivator
                .getInstance().getBundleSymbleName(),
                "Web appliction not actived and wait timeout to init servlet:"
View Full Code Here

Examples of org.emrys.webosgi.core.service.IWebApplication

  }

  private static class WebSvcExtScanner implements BundleScanner {

    public List scan(Bundle bundle) {
      IWebApplication app = findWebSvcContribution(bundle);
      if (app != null) {
        List<IWebApplication> result = new ArrayList<IWebApplication>();
        result.add(app);
        return result;
      }
View Full Code Here

Examples of org.emrys.webosgi.core.service.IWebApplication

    if (wabundle.getState() != Bundle.ACTIVE
        || !WebBundleUtil.isWebAppBundle(wabundle))
      return;

    // Search application extensipn point.
    IWebApplication app = findApplication(wabundle);
    if (app != null && app.isDynaServicesStarted())
      return;

    if (app == null) {
      WebApplication tmpApp = new WebApplication(wabundle);
      FwkRuntime.getInstance().regApplication(tmpApp);
      app = tmpApp;
    }

    app.startDynamicServices();
  }
View Full Code Here

Examples of org.emrys.webosgi.core.service.IWebApplication

    app.startDynamicServices();
  }

  public void undeploy(Bundle wabundle) throws Exception {
    // Search application extension point.
    IWebApplication app = findApplication(wabundle);
    if (app != null && app.isDynaServicesStarted())
      app.stopDynamicServices();

    return;
  }
View Full Code Here

Examples of org.emrys.webosgi.core.service.IWebApplication

    return;
  }

  protected IWebApplication findApplication(Bundle bundle) {
    FwkActivator fwkActivator = FwkActivator.getInstance();
    IWebApplication app = FwkRuntime.getInstance().getAppliction(bundle);
    if (app != null)
      return app;
    IExtensionPoint extPoint = Platform.getExtensionRegistry()
        .getExtensionPoint(
            fwkActivator.getBundleSymbleName()
View Full Code Here

Examples of org.emrys.webosgi.core.service.IWebApplication

   * @throws ServletException
   */
  private boolean processJspFile(File jspFile, String virtualPath,
      Bundle targetBundle) throws Exception {

    IWebApplication webApp = FwkRuntime.getInstance().getAppliction(
        targetBundle);
    // Check and make sure this web application actived
    if (!FwkRuntime.getInstance().makeSureWabActive(webApp))
      throw new IllegalStateException(
          "Web bundle not be actived to handle dymamic resource at this time and wait timeout.");

    // here should not remove the bundle prefix before the virtual path.
    // if servlet path is the same, the jasper may not compile the jsp just
    // use the form class
    // file. here set the servlet name to virtual name to hint that
    // these are different. The
    // BundleServletContext will remove the prefix for us.
    // get the target bundle's servlet config.
    /*
     * if (newResPath.startsWith("/" + activator.getServiceNSPrefix() +
     * "/")) newResPath = newResPath.replaceFirst("/" +
     * activator.getServiceNSPrefix() + "/", "/");
     */

    // Get a poolled servlet to process jsp file.
    JasperServletWrapper jspServlet = JspServletPool.getInstance(webApp
        .getBundleServletContext());
    // ClassLoader c = jspServlet.getClass().getClassLoader();
    // if newResPath is the same, the jasper may not compile the jsp
    // just use the form class
    // file. here set the servlet name to virtual name to hint that
View Full Code Here

Examples of org.emrys.webosgi.core.service.IWebApplication

  public synchronized void deploy(Bundle wabundle) throws Exception {
    if (wabundle.getState() == Bundle.RESOLVED
        && WebBundleUtil.isWebAppBundle(wabundle)) {

      // Search application extension point.
      IWebApplication app = findApplication(wabundle);
      if (app != null && app.isDynaServicesStarted())
        return;

      if (app == null) {
        WebApplication tmpApp = new WebApplication(wabundle);
        FwkRuntime.getInstance().regApplication(tmpApp);
        app = tmpApp;
      }

      // Do default resources publish if any.
      app.pubStaticResources();

      // Do our internal static resource publish.
      File webContentRoot = app.findWebContentRoot(false);
      if (webContentRoot != null && webContentRoot.isDirectory()
          && webContentRoot.exists()) {
        IPath webContentPath = new Path(webContentRoot
            .getAbsolutePath());
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.