neeme       2003/06/05 17:35:03

  Modified:    fortress/src/java/org/apache/avalon/fortress/impl/factory
                        BCELWrapperGenerator.java
  Log:
  synchronizing on classloader is not enough if we are in an application server and 
there is other code besides fortress that is using BCEL (for example, CGLIB or 
Hibernate)
  synchronizing on Type.class should be enough as this is the class where most of the 
static stuff is going on.
  
  Revision  Changes    Path
  1.11      +2 -1      
avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/factory/BCELWrapperGenerator.java
  
  Index: BCELWrapperGenerator.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/factory/BCELWrapperGenerator.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- BCELWrapperGenerator.java 4 Jun 2003 13:19:40 -0000       1.10
  +++ BCELWrapperGenerator.java 6 Jun 2003 00:35:03 -0000       1.11
  @@ -53,6 +53,7 @@
   import org.apache.bcel.classfile.JavaClass;
   import org.apache.bcel.classfile.Method;
   import org.apache.bcel.generic.ClassGen;
  +import org.apache.bcel.generic.Type;
   import org.apache.bcel.util.ClassLoaderRepository;
   import org.apache.bcel.util.Repository;
   
  @@ -246,7 +247,7 @@
               classToWrap.getName() + WRAPPER_CLASS_SUFFIX;
   
           Class generatedClass;
  -        synchronized ( m_bcelClassLoader )
  +        synchronized ( Type.class )
           {
               // Create BCEL class generator
               m_classGenerator =
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to