Package com.ibm.domino.xsp.module.nsf

Examples of com.ibm.domino.xsp.module.nsf.NSFComponentModule


      }
      return result;
    }

    public lotus.domino.Session getXspSessionAsUser() {
      final NSFComponentModule mod = this.module;
      lotus.domino.Session result = null;
      try {
        result = AccessController.doPrivileged(new PrivilegedExceptionAction<lotus.domino.Session>() {
          @Override
          public Session run() throws Exception {
View Full Code Here


              break;
            }
          }
          if (nsfservice != null) {
            try {
              NSFComponentModule forcedMod = nsfservice.loadModule(filepath);
              Class<?> klazz = forcedMod.getModuleClassLoader().loadClass(className);
              Object cacheMeIfYouCan = klazz.newInstance();
              thisBean.put(key, cacheMeIfYouCan);
            } catch (Throwable t) {
              t.printStackTrace();
            }
View Full Code Here

    System.out.println("DEBUG ALERT!! XotsService has been asked to service an HttpRequest!");
    return super.doService(arg0, arg1, arg2, arg3, arg4);
  }

  public void loadXotsTasklets(final String arg0, final String[] classNames) throws ServletException {
    NSFComponentModule module = (NSFComponentModule) getComponentModule(arg0);
    final LoaderRunnable loaderRunnable = new LoaderRunnable(module, classNames, this);
    Thread t = new lotus.domino.NotesThread(loaderRunnable);
    t.start();
    try {
      t.join();// RPr: should we really load all modules in an own thread async?s
View Full Code Here

      e.printStackTrace();
    }
  }

  public void loaderCallback(final LoaderRunnable runner) {
    NSFComponentModule referenceMod = runner.getModule();

    Set<Class<?>> classes = runner.getClasses();
    for (Class<?> clazz : classes) {
      Persistent persistent = clazz.getAnnotation(Persistent.class);
      Persistent.Context ctx = persistent.appContext();
      Persistent.Scope scope = persistent.scope();
      // TODO de-dupe based on replica ID to handle faux text ".nsf" redirection files
      if (scope == Persistent.Scope.APPLICATION) {
        if (ctx == Persistent.Context.XSPFORCED) {
          try {
            NSFComponentModule forcedMod = getNsfService().loadModule(referenceMod.getDatabasePath());
            synchronized (classMap_) {
              classMap_.put(forcedMod, classes);
            }
          } catch (Throwable t) {
            t.printStackTrace();
          }
        } else if (ctx == Persistent.Context.XSPSCOPED) {

        }

      } else if (scope == Persistent.Scope.SERVER) {
        NSFComponentModule mod = runner.getModule();
        synchronized (classMap_) {
          classMap_.put(mod, classes)// TODO need to put actual objects rather than classes into the map
        }
      } else {
        NSFComponentModule mod = runner.getModule();
        synchronized (classMap_) {
          classMap_.put(mod, classes);
        }
      }
    }
View Full Code Here

TOP

Related Classes of com.ibm.domino.xsp.module.nsf.NSFComponentModule

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.