[jboss-cvs] JBossAS SVN: r68579 - trunk/server/src/main/org/jboss/deployment.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Dec 29 09:04:32 EST 2007


Author: alesj
Date: 2007-12-29 09:04:31 -0500 (Sat, 29 Dec 2007)
New Revision: 68579

Modified:
   trunk/server/src/main/org/jboss/deployment/AnnotatedClassFilter.java
   trunk/server/src/main/org/jboss/deployment/AnnotationMetaDataDeployer.java
Log:
Trace log.

Modified: trunk/server/src/main/org/jboss/deployment/AnnotatedClassFilter.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/AnnotatedClassFilter.java	2007-12-29 13:40:23 UTC (rev 68578)
+++ trunk/server/src/main/org/jboss/deployment/AnnotatedClassFilter.java	2007-12-29 14:04:31 UTC (rev 68579)
@@ -47,7 +47,6 @@
 {
    private static Logger log = Logger.getLogger(AnnotatedClassFilter.class);
    private ClassLoader loader;
-   private VirtualFile classpathRoot;
    private int rootLength;
    private HashSet<String> childPaths = new HashSet<String>();
    private HashMap<VirtualFile, Class<?>> pathToClasses = new HashMap<VirtualFile, Class<?>>();
@@ -55,8 +54,7 @@
    public AnnotatedClassFilter(VFSDeploymentUnit unit, ClassLoader loader, VirtualFile classpathRoot)
    {
       this.loader = loader;
-      this.classpathRoot = classpathRoot;
-      
+
       // Work out the root length. If there is a root, we need to add one to jump across the next /
       String rootName = classpathRoot.getPathName();
       rootLength = rootName.length();
@@ -146,12 +144,13 @@
    }
 
    /**
-    * Search the classpaths for the root of this file
-    * @param classFile
-    * @return
+    * Search the classpaths for the root of this file.
+    *
+    * @param classFile the class file
+    * @return fqn class name
+    * @throws IOException for any error
     */
-   protected String getClassName(VirtualFile classFile)
-      throws IOException
+   protected String getClassName(VirtualFile classFile) throws IOException
    {
       String pathName = classFile.getPathName();
       String name = pathName.substring(rootLength, pathName.length()-6);

Modified: trunk/server/src/main/org/jboss/deployment/AnnotationMetaDataDeployer.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/AnnotationMetaDataDeployer.java	2007-12-29 13:40:23 UTC (rev 68578)
+++ trunk/server/src/main/org/jboss/deployment/AnnotationMetaDataDeployer.java	2007-12-29 14:04:31 UTC (rev 68579)
@@ -136,9 +136,12 @@
 
       ClassLoader loader = unit.getClassLoader();
       List<VirtualFile> classpath = unit.getClassPath();
-      if(classpath == null)
+      if(classpath == null || classpath.isEmpty())
          return;
 
+      if (log.isTraceEnabled())
+         log.trace("Deploying annotations for unit: " + unit + ", classpath: " + classpath);
+
       try
       {
          Map<VirtualFile, Class<?>> classpathClasses = new HashMap<VirtualFile, Class<?>>();
@@ -182,9 +185,11 @@
    }
 
    /**
-    * 
-    * @param finder
-    * @param classes
+    * Process annotations.
+    *
+    * @param unit the deployment unit
+    * @param finder the annotation finder
+    * @param classes the candidate classes
     */
    protected void processJBossMetaData(VFSDeploymentUnit unit,
          AnnotationFinder<AnnotatedElement> finder, Map<VirtualFile, Class<?>> classes)
@@ -195,6 +200,14 @@
       if(annotationMetaData != null)
          unit.addAttachment(EJB_ANNOTATED_ATTACHMENT_NAME, annotationMetaData, EjbJarMetaData.class);
    }
+
+   /**
+    * Process annotations.
+    *
+    * @param unit the deployment unit
+    * @param finder the annotation finder
+    * @param classes the candidate classes
+    */
    protected void processJBossWebMetaData(VFSDeploymentUnit unit,
          AnnotationFinder<AnnotatedElement> finder, Map<VirtualFile, Class<?>> classes)
    {
@@ -203,6 +216,14 @@
       if(annotationMetaData != null)
          unit.addAttachment(WEB_ANNOTATED_ATTACHMENT_NAME, annotationMetaData, WebMetaData.class);
    }
+
+   /**
+    * Process annotations.
+    *
+    * @param unit the deployment unit
+    * @param finder the annotation finder
+    * @param classes the candidate classes
+    */
    protected void processJBossClientMetaData(VFSDeploymentUnit unit,
          AnnotationFinder<AnnotatedElement> finder, Map<VirtualFile, Class<?>> classes)
    {




More information about the jboss-cvs-commits mailing list