import javax.persistence.PersistenceUnit;\r
import javax.xml.ws.WebServiceRef;\r
\r
-import org.apache.tomcat.util.IntrospectionUtils;\r
-\r
\r
/**\r
* Verify the annotation and Process it.\r
public static void postConstruct(Object instance)\r
throws IllegalAccessException, InvocationTargetException {\r
\r
- Method[] methods = IntrospectionUtils.findMethods(instance.getClass());\r
+ Method[] methods = instance.getClass().getDeclaredMethods();\r
Method postConstruct = null;\r
for (int i = 0; i < methods.length; i++) {\r
if (methods[i].isAnnotationPresent(PostConstruct.class)) {\r
public static void preDestroy(Object instance)\r
throws IllegalAccessException, InvocationTargetException {\r
\r
- Method[] methods = IntrospectionUtils.findMethods(instance.getClass());\r
+ Method[] methods = instance.getClass().getDeclaredMethods();\r
Method preDestroy = null;\r
for (int i = 0; i < methods.length; i++) {\r
if (methods[i].isAnnotationPresent(PreDestroy.class)) {\r
throws IllegalAccessException, InvocationTargetException, NamingException {\r
\r
// Initialize fields annotations\r
- Field[] fields = instance.getClass().getFields();\r
+ Field[] fields = instance.getClass().getDeclaredFields();\r
for (int i = 0; i < fields.length; i++) {\r
if (fields[i].isAnnotationPresent(Resource.class)) {\r
Resource annotation = (Resource) fields[i].getAnnotation(Resource.class);\r
}\r
\r
// Initialize methods annotations\r
- Method[] methods = IntrospectionUtils.findMethods(instance.getClass());\r
+ Method[] methods = instance.getClass().getDeclaredMethods();\r
for (int i = 0; i < methods.length; i++) {\r
if (methods[i].isAnnotationPresent(Resource.class)) {\r
Resource annotation = (Resource) methods[i].getAnnotation(Resource.class);\r