[jboss-cvs] JBossAS SVN: r68905 - in projects/ejb3/trunk/metadata: src/main/java/org/jboss/ejb3/metadata and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jan 11 15:32:58 EST 2008


Author: wolfc
Date: 2008-01-11 15:32:58 -0500 (Fri, 11 Jan 2008)
New Revision: 68905

Removed:
   projects/ejb3/trunk/metadata/src/main/java/org/jboss/ejb3/metadata/EJBMetaDataLoader.java
   projects/ejb3/trunk/metadata/src/main/java/org/jboss/ejb3/metadata/plugins/loader/ClassMetaDataLoader.java
   projects/ejb3/trunk/metadata/src/main/java/org/jboss/ejb3/metadata/plugins/loader/InterceptorClassMetaDataLoader.java
Modified:
   projects/ejb3/trunk/metadata/pom.xml
Log:
Removed dead code and fixed dependencies

Modified: projects/ejb3/trunk/metadata/pom.xml
===================================================================
--- projects/ejb3/trunk/metadata/pom.xml	2008-01-11 20:27:07 UTC (rev 68904)
+++ projects/ejb3/trunk/metadata/pom.xml	2008-01-11 20:32:58 UTC (rev 68905)
@@ -24,10 +24,12 @@
     <dependency>
       <groupId>org.jboss.ejb3</groupId>
       <artifactId>jboss-ejb3-ext-api</artifactId>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.jboss.ejb3</groupId>
       <artifactId>jboss-ejb3-impl</artifactId>
+      <scope>test</scope>
     </dependency>
 
     <!-- external -->
@@ -56,14 +58,9 @@
     <dependency>
       <groupId>org.jboss.javaee</groupId>
       <artifactId>jboss-ejb-api</artifactId>
+      <scope>test</scope>
     </dependency>
     
-    <!-- broken transitive dependencies of AOP -->
-    <!--
-    <dependency>
-      <groupId>org.jboss.microcontainer</groupId>
-      <artifactId>jboss-container</artifactId>
-    </dependency>
-    -->
+    <!-- TODO: javassist -->
   </dependencies>
 </project>

Deleted: projects/ejb3/trunk/metadata/src/main/java/org/jboss/ejb3/metadata/EJBMetaDataLoader.java
===================================================================
--- projects/ejb3/trunk/metadata/src/main/java/org/jboss/ejb3/metadata/EJBMetaDataLoader.java	2008-01-11 20:27:07 UTC (rev 68904)
+++ projects/ejb3/trunk/metadata/src/main/java/org/jboss/ejb3/metadata/EJBMetaDataLoader.java	2008-01-11 20:32:58 UTC (rev 68905)
@@ -1,271 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ejb3.metadata;
-
-import java.lang.annotation.Annotation;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.interceptor.AroundInvoke;
-import javax.interceptor.Interceptors;
-
-import org.jboss.ejb3.annotation.SecurityDomain;
-import org.jboss.ejb3.annotation.impl.InterceptorsImpl;
-import org.jboss.ejb3.annotation.impl.SecurityDomainImpl;
-import org.jboss.ejb3.metadata.plugins.loader.ClassMetaDataLoader;
-import org.jboss.ejb3.metadata.plugins.loader.InterceptorClassMetaDataLoader;
-import org.jboss.ejb3.metadata.spi.signature.ClassSignature;
-import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
-import org.jboss.metadata.ejb.jboss.JBossMessageDrivenBeanMetaData;
-import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
-import org.jboss.metadata.ejb.spec.AroundInvokesMetaData;
-import org.jboss.metadata.ejb.spec.InterceptorBindingMetaData;
-import org.jboss.metadata.ejb.spec.InterceptorBindingsMetaData;
-import org.jboss.metadata.ejb.spec.InterceptorClassesMetaData;
-import org.jboss.metadata.ejb.spec.InterceptorMetaData;
-import org.jboss.metadata.ejb.spec.InterceptorsMetaData;
-import org.jboss.metadata.spi.retrieval.AnnotationItem;
-import org.jboss.metadata.spi.retrieval.AnnotationsItem;
-import org.jboss.metadata.spi.retrieval.MetaDataRetrieval;
-import org.jboss.metadata.spi.retrieval.simple.SimpleAnnotationItem;
-import org.jboss.metadata.spi.retrieval.simple.SimpleAnnotationsItem;
-import org.jboss.metadata.spi.scope.ScopeKey;
-import org.jboss.metadata.spi.signature.MethodSignature;
-import org.jboss.metadata.spi.signature.Signature;
-
-/**
- * EJBMetaDataLoader.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class EJBMetaDataLoader extends ClassMetaDataLoader<JBossEnterpriseBeanMetaData>
-{
-   /** The container */
-   private JBossEnterpriseBeanMetaData beanMetaData;
-   
-   private ClassLoader classLoader;
-   
-   /**
-    * Create a new EJBMetaDataLoader.
-    * 
-    * @param key            the scope
-    * @param beanMetaData   the meta data associated with this EJB or null
-    * @param classLoader    the class loader that must be used to load new classes
-    */
-   public EJBMetaDataLoader(ScopeKey key, JBossEnterpriseBeanMetaData beanMetaData, ClassLoader classLoader)
-   {
-      super(key, beanMetaData);
-      assert classLoader != null : "classLoader is null";
-      
-      this.beanMetaData = beanMetaData;
-      this.classLoader = classLoader;
-   }
-   
-   protected MetaDataRetrieval createComponentMetaDataRetrieval(Signature signature)
-   {
-      JBossEnterpriseBeanMetaData beanMetaData = getBeanMetaData();
-      if (beanMetaData == null)
-         return null;
-
-      MetaDataRetrieval retrieval = null;
-      if(signature instanceof ClassSignature)
-      {
-         // FIXME: it's not always an interceptor, could be a super class
-         retrieval = new InterceptorClassMetaDataLoader(getScope(), findInterceptor(signature.getName()));
-      }
-      else if(signature instanceof MethodSignature)
-         retrieval = new MethodMetaDataRetrieval((MethodSignature) signature);
-      
-      return retrieval;
-   }
-
-   private InterceptorMetaData findInterceptor(String name)
-   {
-      InterceptorsMetaData interceptors = beanMetaData.getEjbJarMetaData().getInterceptors();
-      for(InterceptorMetaData interceptorMetaData : interceptors)
-      {
-         if(interceptorMetaData.getInterceptorClass().equals(name))
-            return interceptorMetaData;
-      }
-      return null;
-   }
-   
-   /**
-    * Get the bean metadata
-    * 
-    * @return the bean metadata
-    */
-   protected JBossEnterpriseBeanMetaData getBeanMetaData()
-   {
-      return beanMetaData;
-   }
-   
-   public boolean isEmpty()
-   {
-      return getBeanMetaData() != null;
-   }
-
-   private Class<?> loadClass(String name)
-   {
-      try
-      {
-         return classLoader.loadClass(name);
-      }
-      catch (ClassNotFoundException e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-   
-   public <T extends Annotation> AnnotationItem<T> retrieveAnnotation(Class<T> annotationType)
-   {
-      JBossEnterpriseBeanMetaData beanMetaData = getBeanMetaData();
-      if (beanMetaData == null)
-         return null;
-      
-      String ejbName = beanMetaData.getEjbName();
-      
-      if(annotationType == Interceptors.class)
-      {
-         InterceptorBindingsMetaData bindings = beanMetaData.getEjbJarMetaData().getAssemblyDescriptor().getInterceptorBindings();
-         if(bindings != null)
-         {
-            for(InterceptorBindingMetaData binding : bindings)
-            {
-               // For the method component
-               if(binding.getMethod() != null)
-                  continue;
-               
-               String bindingEjbName = binding.getEjbName();
-               if(bindingEjbName.equals("*") || bindingEjbName.equals(ejbName))
-               {
-                  //List<Class<?>> interceptorClasses = new ArrayList<Class<?>>();
-                  InterceptorsImpl interceptors = new InterceptorsImpl();
-                  InterceptorClassesMetaData interceptorClassesMetaData;
-                  if(binding.isTotalOrdering())
-                  {
-                     interceptorClassesMetaData = binding.getInterceptorOrder();
-                  }
-                  else
-                  {
-                     interceptorClassesMetaData = binding.getInterceptorClasses();
-                  }
-                  for(String interceptorClassName : interceptorClassesMetaData)
-                  {
-                     interceptors.addValue(loadClass(interceptorClassName));
-                  }
-                  return new SimpleAnnotationItem<T>(annotationType.cast(interceptors));
-               }
-            }
-         }
-      }
-      
-      if (annotationType == SecurityDomain.class)
-      {
-         String securityDomain = beanMetaData.getSecurityDomain();
-         if (securityDomain != null)
-            return new SimpleAnnotationItem<T>(annotationType.cast(new SecurityDomainImpl(securityDomain)));
-      }
-      return null;
-   }
-   
-   public AnnotationsItem retrieveAnnotations()
-   {
-      List<AnnotationItem<?>> annotations = new ArrayList<AnnotationItem<?>>();
-      AnnotationItem<SecurityDomain> annotation = retrieveAnnotation(SecurityDomain.class);
-      if (annotation != null)
-         annotations.add(annotation);
-      if (annotations.isEmpty())
-         return SimpleAnnotationsItem.NO_ANNOTATIONS;
-      else
-         return new SimpleAnnotationsItem(annotations.toArray(new AnnotationItem[annotations.size()]));
-   }
-
-   /**
-    * MethodMetaDataRetrieval.
-    */
-   private class MethodMetaDataRetrieval extends ClassMetaDataLoader<JBossEnterpriseBeanMetaData>.MethodMetaDataRetrieval
-   {
-      /**
-       * Create a new MethodMetaDataRetrieval.
-       * 
-       * @param methodSignature the signature
-       */
-      public MethodMetaDataRetrieval(MethodSignature methodSignature)
-      {
-         super(methodSignature);
-      }
-
-      public MetaDataRetrieval getComponentMetaDataRetrieval(Signature signature)
-      {
-         return null;
-      }
-
-      public boolean isEmpty()
-      {
-         return false;
-      }
-
-      public <T extends Annotation> AnnotationItem<T> retrieveAnnotation(Class<T> annotationType)
-      {
-         if(beanMetaData == null)
-            return null;
-         
-         if(annotationType == AroundInvoke.class)
-         {
-            AroundInvokesMetaData aroundInvokes = null;
-//            if(beanMetaData instanceof JBossGenericBeanMetaData)
-//               aroundInvokes = ((JBossGenericBeanMetaData) beanMetaData).getAroundInvokes();
-            if(beanMetaData instanceof JBossMessageDrivenBeanMetaData)
-               aroundInvokes = ((JBossMessageDrivenBeanMetaData) beanMetaData).getAroundInvokes();
-            else if(beanMetaData instanceof JBossSessionBeanMetaData)
-               aroundInvokes = ((JBossSessionBeanMetaData) beanMetaData).getAroundInvokes();
-            if(aroundInvokes != null)
-            {
-               Annotation annotation = getAroundInvokeAnnotation(aroundInvokes);
-               if(annotation != null)
-                  return new SimpleAnnotationItem<T>(annotationType.cast(annotation));
-            }
-         }
-         /* Example 
-         JBossEnterpriseBeanMetaData beanMetaData = getBeanMetaData();
-         if (beanMetaData == null)
-            return null;
-         
-         if (annotationType == TransactionTimeout.class)
-         {
-            MethodAttributesMetaData methodAttributes = beanMetaData.getMethodAttributes();
-            int timeout = methodAttributes.getMethodTransactionTimeout(signature.getName());
-            return new SimpleAnnotationItem(new TransactionTimeoutImpl(timeout));
-         }
-         */
-         return super.retrieveAnnotation(annotationType);
-      }
-
-      public AnnotationsItem retrieveAnnotations()
-      {
-         // TODO
-         return SimpleAnnotationsItem.NO_ANNOTATIONS;
-      }
-   }
-}

Deleted: projects/ejb3/trunk/metadata/src/main/java/org/jboss/ejb3/metadata/plugins/loader/ClassMetaDataLoader.java
===================================================================
--- projects/ejb3/trunk/metadata/src/main/java/org/jboss/ejb3/metadata/plugins/loader/ClassMetaDataLoader.java	2008-01-11 20:27:07 UTC (rev 68904)
+++ projects/ejb3/trunk/metadata/src/main/java/org/jboss/ejb3/metadata/plugins/loader/ClassMetaDataLoader.java	2008-01-11 20:32:58 UTC (rev 68905)
@@ -1,199 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2007, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
-  *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ejb3.metadata.plugins.loader;
-
-import java.lang.annotation.Annotation;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.interceptor.AroundInvoke;
-
-import org.jboss.ejb3.annotation.impl.AroundInvokeImpl;
-import org.jboss.ejb3.annotation.impl.PostConstructImpl;
-import org.jboss.ejb3.annotation.impl.PreDestroyImpl;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.ejb.spec.AroundInvokesMetaData;
-import org.jboss.metadata.javaee.spec.Environment;
-import org.jboss.metadata.javaee.spec.LifecycleCallbacksMetaData;
-import org.jboss.metadata.plugins.loader.BasicMetaDataLoader;
-import org.jboss.metadata.spi.retrieval.AnnotationItem;
-import org.jboss.metadata.spi.retrieval.AnnotationsItem;
-import org.jboss.metadata.spi.retrieval.MetaDataRetrieval;
-import org.jboss.metadata.spi.retrieval.simple.SimpleAnnotationItem;
-import org.jboss.metadata.spi.scope.ScopeKey;
-import org.jboss.metadata.spi.signature.MethodSignature;
-import org.jboss.metadata.spi.signature.Signature;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public abstract class ClassMetaDataLoader<M extends Environment> extends BasicMetaDataLoader
-{
-   private static final Logger log = Logger.getLogger(ClassMetaDataLoader.class);
-
-   /**
-    * MethodMetaDataRetrieval.
-    */
-   protected class MethodMetaDataRetrieval extends AbstractMethodMetaDataLoader
-   {
-      /** The signature */
-      private MethodSignature signature;
-      
-      /**
-       * Create a new MethodMetaDataRetrieval.
-       * 
-       * @param methodSignature the signature
-       */
-      public MethodMetaDataRetrieval(MethodSignature methodSignature)
-      {
-         this.signature = methodSignature;
-      }
-
-      protected <T extends Annotation> T createAnnotationImpl(Class<T> annotationImplType)
-      {
-         try
-         {
-            return annotationImplType.newInstance();
-         }
-         catch (InstantiationException e)
-         {
-            throw new RuntimeException(e);
-         }
-         catch (IllegalAccessException e)
-         {
-            throw new RuntimeException(e);
-         }
-      }
-      
-      protected AroundInvoke getAroundInvokeAnnotation(AroundInvokesMetaData callbacks)
-      {
-         if(callbacks == null || callbacks.isEmpty())
-            return null;
-         
-         assert callbacks.size() == 1;
-         String methodName = callbacks.get(0).getMethodName();
-         if(methodName.equals(signature.getName()))
-            return new AroundInvokeImpl();
-         return null;
-      }
-      
-      private <T extends Annotation> T getLifeCycleAnnotation(LifecycleCallbacksMetaData callbacks, Class<T> annotationImplType)
-      {
-         if(callbacks == null || callbacks.isEmpty())
-            return null;
-         
-         assert callbacks.size() == 1;
-         String methodName = callbacks.get(0).getMethodName();
-         if(methodName.equals(signature.getName()))
-            return createAnnotationImpl(annotationImplType);
-         return null;
-      }
-      
-      public <T extends Annotation> AnnotationItem<T> retrieveAnnotation(Class<T> annotationType)
-      {
-         if(annotationType == PostConstruct.class)
-         {
-            Annotation lifeCycleAnnotation = getLifeCycleAnnotation(metaData.getPostConstructs(), PostConstructImpl.class);
-            if(lifeCycleAnnotation != null)
-               return new SimpleAnnotationItem<T>(annotationType.cast(lifeCycleAnnotation));
-         }
-         else if(annotationType == PreDestroy.class)
-         {
-            Annotation lifeCycleAnnotation = getLifeCycleAnnotation(metaData.getPreDestroys(), PreDestroyImpl.class);
-            if(lifeCycleAnnotation != null)
-               return new SimpleAnnotationItem<T>(annotationType.cast(lifeCycleAnnotation));
-         }
-         /* Example 
-         JBossEnterpriseBeanMetaData beanMetaData = getBeanMetaData();
-         if (beanMetaData == null)
-            return null;
-         
-         if (annotationType == TransactionTimeout.class)
-         {
-            MethodAttributesMetaData methodAttributes = beanMetaData.getMethodAttributes();
-            int timeout = methodAttributes.getMethodTransactionTimeout(signature.getName());
-            return new SimpleAnnotationItem(new TransactionTimeoutImpl(timeout));
-         }
-         */
-         return null;
-      }
-   }
-   
-   /** The meta data */
-   private M metaData;
-   
-   /** Component cache */
-   private Map<Signature, MetaDataRetrieval> cache = new ConcurrentHashMap<Signature, MetaDataRetrieval>();
-   
-   protected abstract MetaDataRetrieval createComponentMetaDataRetrieval(Signature signature);
-   
-   protected ClassMetaDataLoader(ScopeKey key, M metaData)
-   {
-      super(key);
-      this.metaData = metaData;
-   }
-   
-   @Override
-   public MetaDataRetrieval getComponentMetaDataRetrieval(Signature signature)
-   {
-      MetaDataRetrieval retrieval = cache.get(signature);
-      if (retrieval != null)
-         return retrieval;
-      
-      retrieval = createComponentMetaDataRetrieval(signature);
-      
-      if(retrieval != null)
-         cache.put(signature, retrieval);
-      
-      return retrieval;
-   }
-   
-   /* (non-Javadoc)
-    * @see org.jboss.metadata.spi.retrieval.MetaDataRetrieval#isEmpty()
-    */
-   public boolean isEmpty()
-   {
-      // TODO Auto-generated method stub
-      return false;
-   }
-
-   /* (non-Javadoc)
-    * @see org.jboss.metadata.spi.retrieval.MetaDataRetrieval#retrieveAnnotations()
-    */
-   public AnnotationsItem retrieveAnnotations()
-   {
-      // TODO Auto-generated method stub
-      return null;
-   }
-   
-   @Override
-   public <T extends Annotation> AnnotationItem<T> retrieveAnnotation(Class<T> annotationType)
-   {
-      // Resources, EJBs etc
-      return null;
-   }
-}

Deleted: projects/ejb3/trunk/metadata/src/main/java/org/jboss/ejb3/metadata/plugins/loader/InterceptorClassMetaDataLoader.java
===================================================================
--- projects/ejb3/trunk/metadata/src/main/java/org/jboss/ejb3/metadata/plugins/loader/InterceptorClassMetaDataLoader.java	2008-01-11 20:27:07 UTC (rev 68904)
+++ projects/ejb3/trunk/metadata/src/main/java/org/jboss/ejb3/metadata/plugins/loader/InterceptorClassMetaDataLoader.java	2008-01-11 20:32:58 UTC (rev 68905)
@@ -1,103 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2007, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
-  *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ejb3.metadata.plugins.loader;
-
-import java.lang.annotation.Annotation;
-
-import javax.interceptor.AroundInvoke;
-
-import org.jboss.logging.Logger;
-import org.jboss.metadata.ejb.spec.InterceptorMetaData;
-import org.jboss.metadata.spi.retrieval.AnnotationItem;
-import org.jboss.metadata.spi.retrieval.MetaDataRetrieval;
-import org.jboss.metadata.spi.retrieval.simple.SimpleAnnotationItem;
-import org.jboss.metadata.spi.scope.ScopeKey;
-import org.jboss.metadata.spi.signature.MethodSignature;
-import org.jboss.metadata.spi.signature.Signature;
-
-/**
- * Comment
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public class InterceptorClassMetaDataLoader extends ClassMetaDataLoader<InterceptorMetaData>
-{
-   private static final Logger log = Logger.getLogger(InterceptorClassMetaDataLoader.class);
-   
-   /**
-    * MethodMetaDataRetrieval.
-    */
-   protected class MethodMetaDataRetrieval extends ClassMetaDataLoader<InterceptorMetaData>.MethodMetaDataRetrieval
-   {
-      /**
-       * Create a new MethodMetaDataRetrieval.
-       * 
-       * @param methodSignature the signature
-       */
-      public MethodMetaDataRetrieval(MethodSignature methodSignature)
-      {
-         super(methodSignature);
-      }
-
-      @Override
-      public <T extends Annotation> AnnotationItem<T> retrieveAnnotation(Class<T> annotationType)
-      {
-         if(annotationType == AroundInvoke.class)
-         {
-            Annotation annotation = getAroundInvokeAnnotation(interceptorMetaData.getAroundInvokes());
-            if(annotation != null)
-               return new SimpleAnnotationItem<T>(annotationType.cast(annotation));
-         }
-         /* Example 
-         JBossEnterpriseBeanMetaData beanMetaData = getBeanMetaData();
-         if (beanMetaData == null)
-            return null;
-         
-         if (annotationType == TransactionTimeout.class)
-         {
-            MethodAttributesMetaData methodAttributes = beanMetaData.getMethodAttributes();
-            int timeout = methodAttributes.getMethodTransactionTimeout(signature.getName());
-            return new SimpleAnnotationItem(new TransactionTimeoutImpl(timeout));
-         }
-         */
-         return super.retrieveAnnotation(annotationType);
-      }
-   }
-   
-   private InterceptorMetaData interceptorMetaData;
-   
-   public InterceptorClassMetaDataLoader(ScopeKey key, InterceptorMetaData interceptorMetaData)
-   {
-      super(key, interceptorMetaData);
-      assert interceptorMetaData != null;
-      this.interceptorMetaData = interceptorMetaData;
-   }
-   
-   @Override
-   protected MetaDataRetrieval createComponentMetaDataRetrieval(Signature signature)
-   {
-      if(signature instanceof MethodSignature)
-         return new MethodMetaDataRetrieval((MethodSignature) signature);
-      return null;
-   }
-}




More information about the jboss-cvs-commits mailing list