Search in sources :

Example 6 with InjectionCollection

use of org.eclipse.jetty.plus.annotation.InjectionCollection in project jetty.project by eclipse.

the class PlusDescriptorProcessor method start.

/**
     * @see org.eclipse.jetty.webapp.IterativeDescriptorProcessor#start(WebAppContext, org.eclipse.jetty.webapp.Descriptor)
     */
public void start(WebAppContext context, Descriptor descriptor) {
    InjectionCollection injections = (InjectionCollection) context.getAttribute(InjectionCollection.INJECTION_COLLECTION);
    if (injections == null) {
        injections = new InjectionCollection();
        context.setAttribute(InjectionCollection.INJECTION_COLLECTION, injections);
    }
    LifeCycleCallbackCollection callbacks = (LifeCycleCallbackCollection) context.getAttribute(LifeCycleCallbackCollection.LIFECYCLE_CALLBACK_COLLECTION);
    if (callbacks == null) {
        callbacks = new LifeCycleCallbackCollection();
        context.setAttribute(LifeCycleCallbackCollection.LIFECYCLE_CALLBACK_COLLECTION, callbacks);
    }
    RunAsCollection runAsCollection = (RunAsCollection) context.getAttribute(RunAsCollection.RUNAS_COLLECTION);
    if (runAsCollection == null) {
        runAsCollection = new RunAsCollection();
        context.setAttribute(RunAsCollection.RUNAS_COLLECTION, runAsCollection);
    }
}
Also used : InjectionCollection(org.eclipse.jetty.plus.annotation.InjectionCollection) LifeCycleCallbackCollection(org.eclipse.jetty.plus.annotation.LifeCycleCallbackCollection) RunAsCollection(org.eclipse.jetty.plus.annotation.RunAsCollection)

Aggregations

InjectionCollection (org.eclipse.jetty.plus.annotation.InjectionCollection)6 InitialContext (javax.naming.InitialContext)3 Injection (org.eclipse.jetty.plus.annotation.Injection)3 Resource (javax.annotation.Resource)2 NameNotFoundException (javax.naming.NameNotFoundException)2 NamingException (javax.naming.NamingException)2 LifeCycleCallbackCollection (org.eclipse.jetty.plus.annotation.LifeCycleCallbackCollection)2 RunAsCollection (org.eclipse.jetty.plus.annotation.RunAsCollection)2 MetaData (org.eclipse.jetty.webapp.MetaData)2 Server (org.eclipse.jetty.server.Server)1 WebAppContext (org.eclipse.jetty.webapp.WebAppContext)1 XmlParser (org.eclipse.jetty.xml.XmlParser)1 Before (org.junit.Before)1