Package javax.annotation

Examples of javax.annotation.PreDestroy


               {
                  prePassivates = new HashMap<DeclaredMethodSignature, PrePassivate>();
               }
               prePassivates.put(method, prePassivate);
            }
            PreDestroy preDestroy = getLifeCycleAnnotation(((JBossSessionBeanMetaData) beanMetaData).getPreDestroys(), PreDestroyImpl.class, method);
            if(preDestroy != null)
            {
               if (preDestroys == null)
               {
                  preDestroys = new HashMap<DeclaredMethodSignature, PreDestroy>();
View Full Code Here


    }

    private void preDestroy(Object resource) throws IllegalAccessException, InvocationTargetException {
        Method[] methods = resource.getClass().getMethods();
        for (Method method : methods) {
            PreDestroy preDestroyAnnotation = method.getAnnotation(PreDestroy.class);
            if (preDestroyAnnotation != null) {
                Object[] args = {};
                method.invoke(resource, args);

            }
View Full Code Here

/*  743 */       return resolveLifecycleMethod(method, ann);
/*      */     }
/*      */
/*      */     Method resolvePreDestroy(Method method)
/*      */     {
/*  748 */       PreDestroy ann = (PreDestroy)getAnnotation(method, PreDestroy.class);
/*  749 */       return resolveLifecycleMethod(method, ann);
/*      */     }
View Full Code Here

/* 50 */     super(finder);
/*    */   }
/*    */
/*    */   public void process(EnvironmentRefsGroupMetaData metaData, Method element)
/*    */   {
/* 55 */     PreDestroy annotation = (PreDestroy)this.finder.getAnnotation(element, PreDestroy.class);
/* 56 */     if (annotation == null) {
/* 57 */       return;
/*    */     }
/* 59 */     LifecycleCallbackMetaData callback = super.create(element);
/* 60 */     LifecycleCallbacksMetaData preDestroys = metaData.getPreDestroys();
View Full Code Here

    public void invokePreDestroy() {
       
        boolean accessible = false;
        for (Method method : getPreDestroyMethods()) {
            PreDestroy pd = method.getAnnotation(PreDestroy.class);
            if (pd != null) {
                try {
                    method.setAccessible(true);
                    method.invoke(target);
                } catch (IllegalAccessException e) {
View Full Code Here

    public void invokePreDestroy() {
       
        boolean accessible = false;
        for (Method method : getPreDestroyMethods()) {
            PreDestroy pd = method.getAnnotation(PreDestroy.class);
            if (pd != null) {
                try {
                    ReflectionUtil.setAccessible(method);
                    method.invoke(target);
                } catch (IllegalAccessException e) {
View Full Code Here

               {
                  prePassivates = new HashMap<String, PrePassivate>();
               }
               prePassivates.put(methodName, prePassivate);
            }
            PreDestroy preDestroy = getLifeCycleAnnotation(((JBossSessionBeanMetaData) beanMetaData).getPreDestroys(), PreDestroyImpl.class, methodName);
            if(preDestroy != null)
            {
               if (preDestroys == null)
               {
                  preDestroys = new HashMap<String, PreDestroy>();
View Full Code Here

         if(lifeCycleAnnotation != null)
            return annotationClass.cast(lifeCycleAnnotation);
      }
      else if(annotationClass == PreDestroy.class)
      {
         PreDestroy lifeCycleAnnotation = getLifeCycleAnnotation(interceptorMetaData.getPreDestroys(), PreDestroyImpl.class, methodName);
         if(lifeCycleAnnotation != null)
            return annotationClass.cast(lifeCycleAnnotation);
      }
      else if(annotationClass == PrePassivate.class)
      {
View Full Code Here

         if(lifeCycleAnnotation != null)
            return annotationClass.cast(lifeCycleAnnotation);
      }
      else if(annotationClass == PreDestroy.class)
      {
         PreDestroy lifeCycleAnnotation = getLifeCycleAnnotation(interceptorMetaData.getPreDestroys(), PreDestroyImpl.class, method);
         if(lifeCycleAnnotation != null)
            return annotationClass.cast(lifeCycleAnnotation);
      }
      else if(annotationClass == PrePassivate.class)
      {
View Full Code Here

         if(lifeCycleAnnotation != null)
            return annotationClass.cast(lifeCycleAnnotation);
      }
      else if(annotationClass == PreDestroy.class)
      {
         PreDestroy lifeCycleAnnotation = getLifeCycleAnnotation(metaData.getPreDestroys(), PreDestroyImpl.class, method);
         if(lifeCycleAnnotation != null)
            return annotationClass.cast(lifeCycleAnnotation);
      }
      return null;
   }
View Full Code Here

TOP

Related Classes of javax.annotation.PreDestroy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.