org.apache.tomee.catalina
Class JavaeeInstanceManager

java.lang.Object
  extended by org.apache.tomee.catalina.JavaeeInstanceManager
All Implemented Interfaces:
org.apache.tomcat.InstanceManager

public class JavaeeInstanceManager
extends Object
implements org.apache.tomcat.InstanceManager

Version:
$Rev$ $Date$

Constructor Summary
JavaeeInstanceManager(WebContext webContext)
           
 
Method Summary
 void destroyInstance(Object o)
           
 void inject(Object o)
           
 Object newInstance(Class<?> clazz)
           
 void newInstance(Object o)
           
 Object newInstance(String className)
           
 Object newInstance(String className, ClassLoader classLoader)
           
 void postConstruct(Object instance, Class<?> clazz)
          Call postConstruct method on the specified instance recursively from deepest superclass to actual class.
protected  void preDestroy(Object instance, Class<?> clazz)
          Call preDestroy method on the specified instance recursively from deepest superclass to actual class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaeeInstanceManager

public JavaeeInstanceManager(WebContext webContext)
Method Detail

newInstance

public Object newInstance(Class<?> clazz)
                   throws IllegalAccessException,
                          InvocationTargetException,
                          NamingException,
                          InstantiationException
Specified by:
newInstance in interface org.apache.tomcat.InstanceManager
Throws:
IllegalAccessException
InvocationTargetException
NamingException
InstantiationException

newInstance

public Object newInstance(String className)
                   throws IllegalAccessException,
                          InvocationTargetException,
                          NamingException,
                          InstantiationException,
                          ClassNotFoundException
Specified by:
newInstance in interface org.apache.tomcat.InstanceManager
Throws:
IllegalAccessException
InvocationTargetException
NamingException
InstantiationException
ClassNotFoundException

newInstance

public Object newInstance(String className,
                          ClassLoader classLoader)
                   throws IllegalAccessException,
                          InvocationTargetException,
                          NamingException,
                          InstantiationException,
                          ClassNotFoundException
Specified by:
newInstance in interface org.apache.tomcat.InstanceManager
Throws:
IllegalAccessException
InvocationTargetException
NamingException
InstantiationException
ClassNotFoundException

newInstance

public void newInstance(Object o)
                 throws IllegalAccessException,
                        InvocationTargetException,
                        NamingException
Specified by:
newInstance in interface org.apache.tomcat.InstanceManager
Throws:
IllegalAccessException
InvocationTargetException
NamingException

destroyInstance

public void destroyInstance(Object o)
                     throws IllegalAccessException,
                            InvocationTargetException
Specified by:
destroyInstance in interface org.apache.tomcat.InstanceManager
Throws:
IllegalAccessException
InvocationTargetException

inject

public void inject(Object o)

postConstruct

public void postConstruct(Object instance,
                          Class<?> clazz)
                   throws IllegalAccessException,
                          InvocationTargetException
Call postConstruct method on the specified instance recursively from deepest superclass to actual class.

Parameters:
instance - object to call postconstruct methods on
clazz - (super) class to examine for postConstruct annotation.
Throws:
IllegalAccessException - if postConstruct method is inaccessible.
InvocationTargetException - if call fails

preDestroy

protected void preDestroy(Object instance,
                          Class<?> clazz)
                   throws IllegalAccessException,
                          InvocationTargetException
Call preDestroy method on the specified instance recursively from deepest superclass to actual class.

Parameters:
instance - object to call preDestroy methods on
clazz - (super) class to examine for preDestroy annotation.
Throws:
IllegalAccessException - if preDestroy method is inaccessible.
InvocationTargetException - if call fails


Copyright © 1999–2015 The Apache Software Foundation. All rights reserved.