Examples of LifecycleCallbacksMetaData


Examples of org.jboss.metadata.javaee.spec.LifecycleCallbacksMetaData

   }
  
   @XmlTransient
   public LifecycleCallbacksMetaData getPostConstructs()
   {
      LifecycleCallbacksMetaData lcs = null;
      if(jndiEnvironmentRefsGroup != null)
         lcs = jndiEnvironmentRefsGroup.getPostConstructs();
      return lcs;
   }
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.LifecycleCallbacksMetaData

   }

   @XmlTransient
   public LifecycleCallbacksMetaData getPreDestroys()
   {
      LifecycleCallbacksMetaData lcs = null;
      if(jndiEnvironmentRefsGroup != null)
         lcs = jndiEnvironmentRefsGroup.getPreDestroys();
      return lcs;
   }
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.LifecycleCallbacksMetaData

      PostActivate annotation = finder.getAnnotation(element, PostActivate.class);
      if(annotation == null)
         return;

      LifecycleCallbackMetaData callback = super.create(element);
      LifecycleCallbacksMetaData preDestroys = metaData.getPostActivates();
      if(preDestroys == null)
      {
         preDestroys = new LifecycleCallbacksMetaData();
         metaData.setPostActivates(preDestroys);
      }
      preDestroys.add(callback);
   }
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.LifecycleCallbacksMetaData

      PrePassivate annotation = finder.getAnnotation(element, PrePassivate.class);
      if(annotation == null)
         return;

      LifecycleCallbackMetaData callback = super.create(element);
      LifecycleCallbacksMetaData preDestroys = metaData.getPrePassivates();
      if(preDestroys == null)
      {
         preDestroys = new LifecycleCallbacksMetaData();
         metaData.setPrePassivates(preDestroys);
      }
      preDestroys.add(callback);
   }
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.LifecycleCallbacksMetaData

      ResourceEnvironmentReferencesMetaData resEnvRefs = null;
      ResourceEnvironmentReferencesMetaData jbossResEnvRefs = null;
      MessageDestinationReferencesMetaData messageDestinationRefs = null;
      MessageDestinationReferencesMetaData jbossMessageDestinationRefs = null;
      PersistenceUnitReferencesMetaData persistenceUnitRefs = null;
      LifecycleCallbacksMetaData postConstructs = null;
      LifecycleCallbacksMetaData preDestroys = null;
     
      if (environmentRefsGroup != null)
      {
         envEntries = environmentRefsGroup.getEnvironmentEntries();
         ejbRefs = environmentRefsGroup.getEjbReferences();
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.LifecycleCallbacksMetaData

      if(override != null && override.aroundInvokes != null)
         aroundInvokes.addAll(override.aroundInvokes);
      if(original != null && original.aroundInvokes != null)
         aroundInvokes.addAll(original.aroundInvokes);
      if(postActivates == null)
         postActivates = new LifecycleCallbacksMetaData();
      if(override != null && override.postActivates != null)
         postActivates.addAll(override.postActivates);
      if(original != null && original.postActivates != null)
         postActivates.addAll(original.postActivates);
      if(prePassivates == null)
         prePassivates = new LifecycleCallbacksMetaData();
      if(override != null && override.prePassivates != null)
         prePassivates.addAll(override.prePassivates);
      if(original != null && original.prePassivates != null)
         prePassivates.addAll(original.prePassivates);
      if(securityRoleRefs == null)
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.LifecycleCallbacksMetaData

      PostActivate annotation = finder.getAnnotation(element, PostActivate.class);
      if(annotation == null)
         return;

      LifecycleCallbackMetaData callback = super.create(element);
      LifecycleCallbacksMetaData preDestroys = metaData.getPostActivates();
      if(preDestroys == null)
      {
         preDestroys = new LifecycleCallbacksMetaData();
         metaData.setPostActivates(preDestroys);
      }
      preDestroys.add(callback);
   }
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.LifecycleCallbacksMetaData

                }
            }
        }

        // post-construct(s) of the interceptor configured (if any) in the deployment descriptor
        LifecycleCallbacksMetaData postConstructs = metaData.getPostConstructs();
        if (postConstructs != null) {
            for (LifecycleCallbackMetaData postConstruct : postConstructs) {
                final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder();
                String methodName = postConstruct.getMethodName();
                MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(void.class, methodName);
                builder.setPostConstruct(methodIdentifier);
                if (postConstruct.getClassName() == null || postConstruct.getClassName().isEmpty()) {
                    final String className = ClassReflectionIndexUtil.findRequiredMethod(reflectionIndex, componentClass.getModuleClass(), methodIdentifier).getDeclaringClass().getName();
                    component.addInterceptorMethodOverride(className, builder.build());
                } else {
                    component.addInterceptorMethodOverride(postConstruct.getClassName(), builder.build());
                }
            }
        }

        // pre-destroy(s) of the interceptor configured (if any) in the deployment descriptor
        final LifecycleCallbacksMetaData preDestroys = metaData.getPreDestroys();
        if (preDestroys != null) {
            for (final LifecycleCallbackMetaData preDestroy : preDestroys) {
                final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder();
                final String methodName = preDestroy.getMethodName();
                final MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(void.class, methodName);
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.LifecycleCallbacksMetaData

                    }
                }
            }

            // post-construct(s) of the interceptor configured (if any) in the deployment descriptor
            LifecycleCallbacksMetaData postConstructs = interceptor.getPostConstructs();
            if (postConstructs != null) {
                for (LifecycleCallbackMetaData postConstruct : postConstructs) {
                    final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder();
                    String methodName = postConstruct.getMethodName();
                    MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(void.class, methodName, InvocationContext.class);
                    builder.setPostConstruct(methodIdentifier);
                    if (postConstruct.getClassName() == null || postConstruct.getClassName().isEmpty()) {
                        eeModuleDescription.addInterceptorMethodOverride(interceptorClassName, builder.build());
                    } else {
                        eeModuleDescription.addInterceptorMethodOverride(postConstruct.getClassName(), builder.build());
                    }
                }
            }

            // pre-destroy(s) of the interceptor configured (if any) in the deployment descriptor
            LifecycleCallbacksMetaData preDestroys = interceptor.getPreDestroys();
            if (preDestroys != null) {
                for (LifecycleCallbackMetaData preDestroy : preDestroys) {
                    final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder();
                    String methodName = preDestroy.getMethodName();
                    MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(void.class, methodName, InvocationContext.class);
View Full Code Here

Examples of org.jboss.metadata.javaee.spec.LifecycleCallbacksMetaData

      PostConstruct annotation = finder.getAnnotation(element, PostConstruct.class);
      if(annotation == null)
         return;

      LifecycleCallbackMetaData callback = super.create(element);
      LifecycleCallbacksMetaData postConstructs = metaData.getPostConstructs();
      if(postConstructs == null)
      {
         postConstructs = new LifecycleCallbacksMetaData();
         metaData.setPostConstructs(postConstructs);
      }
      postConstructs.add(callback);
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.