Examples of CachingAnnotationRepository


Examples of org.jboss.ejb3.aop.annotation.CachingAnnotationRepository

      JBossEnterpriseBeanMetaData beanMetaData = null;     
      String canonicalObjectName = "GreeterBean";
      ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
     
      AnnotationRepositoryToMetaData delegate = new AnnotationRepositoryToMetaData(beanClass, beanMetaData, canonicalObjectName, classLoader);
      AnnotationRepository repository = new CachingAnnotationRepository(delegate, classLoader);
     
      Method member = beanClass.getDeclaredMethod("sayHi", String.class);
      String annotation = "javax.interceptor.Interceptors";
      String value = "@javax.interceptor.Interceptors (value={" + DummyInterceptor.class.getName() + ".class})";
      repository.addAnnotation(member, annotation, value);
     
      Interceptors interceptors = (Interceptors) repository.resolveAnnotation(member, Interceptors.class);
      assertArrayEquals(new Class[] { DummyInterceptor.class }, interceptors.value());
   }
View Full Code Here

Examples of org.jboss.ejb3.aop.annotation.CachingAnnotationRepository

  
   public void initialize(String name, Domain domain, Class<? extends Object> beanClass, JBossEnterpriseBeanMetaData beanMetaData, ClassLoader classLoader)
   {
      AnnotationRepositoryToMetaData annotationRepo = this.container.getMetaDataBasedAnnotationRepository();
     
      initializeAdvisor(name, domain, beanClass, new CachingAnnotationRepository(annotationRepo, classLoader));
   }
View Full Code Here

Examples of org.jboss.ejb3.aop.annotation.CachingAnnotationRepository

      //Add a security domain bridge
      annotations.addMetaDataBridge(new SecurityDomainMetaDataBridge());
      // Ensure that an @Clustered annotation is visible to AOP if the XML says the bean is  clustered.
      annotations.addMetaDataBridge(new ClusteredMetaDataBridge());
     
      initializeAdvisor(name, domain, beanClass, new CachingAnnotationRepository(annotations, classLoader));
   }
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.