public static void replaceInstanceManager(ServletContext context, WeldManager manager) { StandardContext stdContext = getStandardContext(context); setInstanceManager(stdContext, createInstance(manager, stdContext)); }
public void newInstance(Object o) throws IllegalAccessException, InvocationTargetException, NamingException { inject(o); }
private static WeldForwardingInstanceManager createInstance(WeldManager manager, StandardContext stdContext) { try { InstanceManager weldProcessor = new WeldInstanceManager(manager); return new WeldForwardingInstanceManager(getInstanceManager(stdContext), weldProcessor); } catch (Exception e) { throw TomcatLogger.LOG.cannotCreatWeldForwardingAnnotationProcessor(e); } }
private static <E> Object getContextFieldValue(E obj, Class<E> clazz) throws NoSuchFieldException, IllegalAccessException { Field field = SecurityActions.lookupField(clazz, CONTEXT_FIELD_NAME); SecurityActions.ensureAccessible(field); return field.get(obj); }
@Override public Object newInstance(String fqcn, ClassLoader classLoader) throws IllegalAccessException, InvocationTargetException, NamingException, InstantiationException, ClassNotFoundException, NoSuchMethodException { Object a = super.newInstance(fqcn, classLoader); secondProcessor.newInstance(a); return a; }
@Override public void processAnnotations(Object instance) throws IllegalAccessException, InvocationTargetException, NamingException { super.processAnnotations(instance); getProcessor().processAnnotations(instance); }
@Override public void postConstruct(Object instance) throws IllegalAccessException, InvocationTargetException { super.postConstruct(instance); getProcessor().postConstruct(instance); }
@Override public void preDestroy(Object instance) throws IllegalAccessException, InvocationTargetException { super.preDestroy(instance); getProcessor().preDestroy(instance); }
@Override public boolean equals(Object obj) { return this == obj || delegate().equals(obj); }
private static WeldForwardingInstanceManager createInstance(WeldManager manager, StandardContext stdContext) { try { InstanceManager weldProcessor = new WeldInstanceManager(manager); return new WeldForwardingInstanceManager(getInstanceManager(stdContext), weldProcessor); } catch (Exception e) { throw TomcatLogger.LOG.cannotCreatWeldForwardingAnnotationProcessor(e); } }
public static void replaceInstanceManager(ServletContext context, WeldManager manager) { StandardContext stdContext = getStandardContext(context); setInstanceManager(stdContext, createInstance(manager, stdContext)); }
private static <E> Object getContextFieldValue(E obj, Class<E> clazz) throws NoSuchFieldException, IllegalAccessException { Field field = SecurityActions.lookupField(clazz, CONTEXT_FIELD_NAME); SecurityActions.ensureAccessible(field); return field.get(obj); }
@Override public Object newInstance(String fqcn) throws IllegalAccessException, InvocationTargetException, NamingException, InstantiationException, ClassNotFoundException, NoSuchMethodException { Object a = super.newInstance(fqcn); secondProcessor.newInstance(a); return a; }
public void newInstance(Object o) throws IllegalAccessException, InvocationTargetException, NamingException { inject(o); }
private static WeldForwardingInstanceManager createInstance(WeldManager manager, StandardContext stdContext) { try { InstanceManager weldProcessor = new WeldInstanceManager(manager); return new WeldForwardingInstanceManager(getInstanceManager(stdContext), weldProcessor); } catch (Exception e) { throw TomcatLogger.LOG.cannotCreatWeldForwardingAnnotationProcessor(e); } }
public static void replaceInstanceManager(ServletContext context, WeldManager manager) { StandardContext stdContext = getStandardContext(context); setInstanceManager(stdContext, createInstance(manager, stdContext)); }
@Override public Object newInstance(String fqcn) throws IllegalAccessException, InvocationTargetException, NamingException, InstantiationException, ClassNotFoundException, NoSuchMethodException { Object a = super.newInstance(fqcn); secondProcessor.newInstance(a); return a; }
public void newInstance(Object o) throws IllegalAccessException, InvocationTargetException, NamingException { inject(o); }
@Override public Object newInstance(Class<?> clazz) throws IllegalAccessException, InvocationTargetException, NamingException, InstantiationException, NoSuchMethodException { Object a = super.newInstance(clazz); secondProcessor.newInstance(a); return a; }
@Override public Object newInstance(String fqcn) throws IllegalAccessException, InvocationTargetException, NamingException, InstantiationException, ClassNotFoundException, NoSuchMethodException { Object a = super.newInstance(fqcn); secondProcessor.newInstance(a); return a; }