Examples of inject()


Examples of org.rioproject.impl.watch.WatchInjector.inject()

            Method getThreadDeadlockCalculable = ThreadDeadlockMonitor.class.getMethod("getThreadDeadlockCalculable");
            ThreadDeadlockMonitor threadDeadlockMonitor = new ThreadDeadlockMonitor();
            threadDeadlockMonitor.setThreadMXBean(ManagementFactory.getThreadMXBean());

            WatchInjector watchInjector = new WatchInjector(this, context);
            ThresholdWatch watch = (ThresholdWatch)watchInjector.inject(threadDeadlockDescriptor,
                                                                        threadDeadlockMonitor,
                                                                        getThreadDeadlockCalculable);
            watch.setThresholdValues(new ThresholdValues(0, 1));
            watch.addThresholdListener(new DeadlockedThreadPolicyHandler());
        } else {
View Full Code Here

Examples of org.springframework.beans.factory.annotation.InjectionMetadata.inject()

  public PropertyValues postProcessPropertyValues(
      PropertyValues pvs, PropertyDescriptor[] pds, Object bean, String beanName) throws BeansException {

    InjectionMetadata metadata = findResourceMetadata(bean.getClass());
    try {
      metadata.inject(bean, beanName, pvs);
    }
    catch (Throwable ex) {
      throw new BeanCreationException(beanName, "Injection of resource dependencies failed", ex);
    }
    return pvs;
View Full Code Here

Examples of org.strecks.injection.internal.InjectionWrapper.inject()

    replay(session);

    InjectionWrapper inputWrapper = inputs.get("autoCreateSession");

    ActionContext injectionContext = new TestContextImpl(request);
    inputWrapper.inject(action, injectionContext);

    verify(request);
    verify(session);

    assert action.getAutoCreateSession() != null;
View Full Code Here

Examples of org.strecks.injection.internal.InjectionWrapper.inject()

    replay(session);

    InjectionWrapper inputWrapper = inputs.get("nonAutoCreateSession");

    ActionContext injectionContext = new TestContextImpl(request);
    inputWrapper.inject(action, injectionContext);

    verify(request);
    verify(session);

    assert action.getAutoCreateSession() == null;
View Full Code Here

Examples of org.strecks.injection.internal.InjectionWrapper.inject()

    replay(session);

    InjectionWrapper inputWrapper = inputs.get("autoCreateSession");

    ActionContext injectionContext = new TestContextImpl(request);
    inputWrapper.inject(action, injectionContext);

    verify(request);
    verify(session);

    assert action.getAutoCreateSession() != null;
View Full Code Here

Examples of org.strecks.injection.internal.InjectionWrapper.inject()

    replay(session);

    InjectionWrapper inputWrapper = inputs.get("requiredSessionAttribute");

    ActionContext injectionContext = new TestContextImpl(request);
    inputWrapper.inject(action, injectionContext);

    verify(request);
    verify(session);

  }
View Full Code Here

Examples of org.strecks.injection.internal.InjectionWrapper.inject()

    replay(session);

    InjectionWrapper inputWrapper = inputs.get("requiredAutoCreateSessionAttribute");

    ActionContext injectionContext = new TestContextImpl(request);
    inputWrapper.inject(action, injectionContext);

    verify(request);
    verify(session);

  }
View Full Code Here

Examples of org.strecks.injection.internal.InjectionWrapper.inject()

    replay(request);

    InjectionWrapper inputWrapper = inputs.get("autoCreateRequest");

    ActionContext injectionContext = new TestContextImpl(request);
    inputWrapper.inject(action, injectionContext);

    verify(request);

    assert action.getAutoCreateRequest() != null;
    assert action.getAutoCreateRequest() instanceof QueryResults;
View Full Code Here

Examples of org.strecks.injection.internal.InjectionWrapper.inject()

    replay(request);

    InjectionWrapper inputWrapper = inputs.get("nonAutoCreateRequest");

    ActionContext injectionContext = new TestContextImpl(request);
    inputWrapper.inject(action, injectionContext);

    verify(request);

    assert action.getAutoCreateRequest() == null;
View Full Code Here

Examples of org.strecks.injection.internal.InjectionWrapper.inject()

    Map<String, InjectionWrapper> inputs = c.getInjectionMap();
    InjectionWrapper inputWrapper = inputs.get("webHelper");

    ActionContext injectionContext = new TestContextImpl(request, null, context, null, null);

    inputWrapper.inject(action, injectionContext);

    assert action.getWebHelper() != null;

  }
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.