\r
import javax.annotation.EJB;\r
import javax.annotation.PostConstruct;\r
+import javax.annotation.PreDestroy;\r
import javax.annotation.Resource;\r
import javax.naming.NamingException;\r
import javax.persistence.PersistenceContext;\r
Method[] methods = IntrospectionUtils.findMethods(instance.getClass());\r
Method preDestroy = null;\r
for (int i = 0; i < methods.length; i++) {\r
- if (methods[i].isAnnotationPresent(PostConstruct.class)) {\r
+ if (methods[i].isAnnotationPresent(PreDestroy.class)) {\r
if ((preDestroy != null) \r
|| (methods[i].getParameterTypes().length != 0)\r
|| (Modifier.isStatic(methods[i].getModifiers())) \r
import javax.annotation.EJB;
import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
import javax.annotation.Resource;
import javax.naming.Context;
import javax.naming.InitialContext;
Method[] methods = instance.getClass().getMethods();
Method preDestroy = null;
for (int i = 0; i < methods.length; i++) {
- if (methods[i].isAnnotationPresent(PostConstruct.class)) {
+ if (methods[i].isAnnotationPresent(PreDestroy.class)) {
if ((preDestroy != null)
|| (methods[i].getParameterTypes().length != 0)
|| (Modifier.isStatic(methods[i].getModifiers()))