Examples of ContextManager


Examples of org.apache.sandesha2.context.ContextManager

            worker.setLock(getWorkerLock());
            worker.setWorkId(workId);
           
            // Wrap the invoker worker with the correct context, if needed.
            Runnable work = worker;
            ContextManager contextMgr = SandeshaUtil.getContextManager(context);
            if(contextMgr != null) {
              work = contextMgr.wrapWithContext(work, invoker.getContext());
            }
           
            threadPool.execute(work);
         
            //adding the workId to the lock after assigning it to a thread makes sure
View Full Code Here

Examples of org.apache.tomcat.core.ContextManager

    }

    public void contextInit(Context ctx)
        throws TomcatException
    {
        ContextManager cm=ctx.getContextManager();
        if( cm.getState() >= ContextManager.STATE_INIT ) {
            // a context has been added after the server was started.
            // regenerate the config ( XXX send a restart signal to
            // the server )
            // Generate the config only if "regenerate" property is
            // set on the module or if an explicit "jkconf" option has
            // been set on context manager.
            if( regenerate ||
                cm.getProperty("jkconf") !=null) {
                    execute( cm );
            }
        }
    }
View Full Code Here

Examples of org.eclipse.core.commands.contexts.ContextManager

   * The widgets affected by this method are: scheme combo, bindings
   * table/tree model, and the when combo.
   */
  private final void fill() {
    // Make an internal binding manager to track changes.
    localChangeManager = new BindingManager(new ContextManager(),
        new CommandManager());
    final Scheme[] definedSchemes = bindingService.getDefinedSchemes();
    try {
      for (int i = 0; i < definedSchemes.length; i++) {
        final Scheme scheme = definedSchemes[i];
View Full Code Here

Examples of org.eclipse.help.internal.context.ContextManager

  /**
   * Used to obtain Context Manager returns an instance of ContextManager
   */
  public static ContextManager getContextManager() {
    if (getDefault().contextManager == null)
      getDefault().contextManager = new ContextManager();
    return getDefault().contextManager;
  }
View Full Code Here

Examples of org.exoplatform.container.context.ContextManager

      if (!exocontainer.isContextManagerLoaded() && ContextManager.class.isAssignableFrom(getComponentImplementation()))
      {
         return create();
      }
      ContextManager manager = exocontainer.getContextManager();
      if (manager == null)
      {
         return create();
      }
      return create(manager, true);
View Full Code Here

Examples of org.jboss.arquillian.context.ContextManager

            jmxTestRunner = new JMXTestRunner() {

                @Override
                public TestResult runTestMethod(String className, String methodName, Map<String, String> props) {
                    Map<String, Object> properties = Collections.<String, Object> singletonMap(TEST_CLASS_PROPERTY, className);
                    ContextManager contextManager = initializeContextManager(className, properties);
                    try {
                        // actually run the tests
                        return super.runTestMethod(className, methodName, props);
                    } finally {
                        contextManager.teardown(properties);
                    }
                }

                @Override
                public InputStream runTestMethodEmbedded(String className, String methodName, Map<String, String> props) {
                    Map<String, Object> properties = Collections.<String, Object> singletonMap(TEST_CLASS_PROPERTY, className);
                    ContextManager contextManager = initializeContextManager(className, properties);
                    try {
                        // actually run the tests
                        return super.runTestMethodEmbedded(className, methodName, props);
                    } finally {
                        contextManager.teardown(properties);
                    }
                }

                @Override
                protected TestClassLoader getTestClassLoader() {
                    return testClassLoader;
                }

                private ContextManager initializeContextManager(String className, Map<String, Object> properties) {
                    final ContextManagerBuilder builder = new ContextManagerBuilder();
                    ArquillianConfig config = getConfig(className);
                    if (config != null) {
                        final DeploymentUnit deployment = config.getDeploymentUnitContext();
                        final Module module = deployment.getAttachment(Attachments.MODULE);
                        if (module != null) {
                            builder.add(new TCCLSetup(module.getClassLoader()));
                        }
                        builder.addAll(deployment);
                    }

                    ContextManager contextManager = builder.build();
                    contextManager.setup(properties);
                    return contextManager;
                }
            };
            jmxTestRunner.registerMBean(mbeanServer);
        } catch (Throwable t) {
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.