[jboss-cvs] JBossAS SVN: r58697 - projects/aop/trunk/aop/src/main/org/jboss/aop

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Nov 27 18:55:56 EST 2006


Author: stalep
Date: 2006-11-27 18:55:52 -0500 (Mon, 27 Nov 2006)
New Revision: 58697

Modified:
   projects/aop/trunk/aop/src/main/org/jboss/aop/AspectManager.java
Log:
changed the translate method to be synchronized. a user reported
a deadlock issue. this is a quickfix and should be further investigated.

Modified: projects/aop/trunk/aop/src/main/org/jboss/aop/AspectManager.java
===================================================================
--- projects/aop/trunk/aop/src/main/org/jboss/aop/AspectManager.java	2006-11-27 23:13:43 UTC (rev 58696)
+++ projects/aop/trunk/aop/src/main/org/jboss/aop/AspectManager.java	2006-11-27 23:55:52 UTC (rev 58697)
@@ -847,13 +847,16 @@
 
    /**
     * This is to be backward compatible with JBoss 3.2.3 Translator interface
-    *
+    * TODO: stalep, added a synchronized block for the entire method to prevent
+    *  a deadlock. its not optimal and should be further reviewed. 
+    *  (commented out sync block inside the method)
+    * 
     * @param className
     * @param loader
     * @return
     * @throws Exception
     */
-   public byte[] translate(String className, ClassLoader loader, byte[] classfileBuffer) throws Exception
+   public synchronized byte[] translate(String className, ClassLoader loader, byte[] classfileBuffer) throws Exception
    {
       try
       {
@@ -863,8 +866,8 @@
          }
          if (weavingStrategy == null)
          {
-           synchronized (this)
-            {
+//           synchronized (this)
+//            {
                if (TransformerCommon.isCompileTime() || classicOrder)
                {
                   weavingStrategy = new ClassicWeavingStrategy();
@@ -878,7 +881,7 @@
                {
                   weavingStrategy = new ClassicWeavingStrategy();
                }
-            }
+//            }
          }
 
          return weavingStrategy.translate(this, className, loader, classfileBuffer);




More information about the jboss-cvs-commits mailing list