cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/transformation BetwixtTransformer.java
Date Wed, 10 Sep 2003 18:04:06 GMT
reinhard    2003/09/10 11:04:06

  Modified:    src/blocks/scratchpad/java/org/apache/cocoon/transformation
                        BetwixtTransformer.java
  Log:
  After diving into synchronization
  (http://www.javaworld.com/javaworld/jw-07-1997/jw-07-hood.html) I changed
  the synchronized block synchronizing the class instead of the object as a
  static variable should be synchronized
  
  Revision  Changes    Path
  1.2       +5 -7      cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/transformation/BetwixtTransformer.java
  
  Index: BetwixtTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/scratchpad/java/org/apache/cocoon/transformation/BetwixtTransformer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BetwixtTransformer.java	10 Sep 2003 14:57:12 -0000	1.1
  +++ BetwixtTransformer.java	10 Sep 2003 18:04:05 -0000	1.2
  @@ -133,11 +133,7 @@
           this.refIds = "false".equals(refIds) || "no".equals(refIds);
       }
   
  -    public void setup(
  -        SourceResolver resolver,
  -        Map objectModel,
  -        String src,
  -        Parameters par) {
  +    public void setup( SourceResolver resolver, Map objectModel, String src, Parameters
par) {
           this.objectModel = objectModel;
       }
   
  @@ -231,11 +227,12 @@
           try {
               if (this.beanWriter == null) {
                   this.beanWriter = new SAXBeanWriter(this.contentHandler);
  -                synchronized (introspector) {
  +
  +                synchronized (BetwixtTransformer.class) {
                       if (introspector == null) {
                           introspector = this.beanWriter.getXMLIntrospector();
                           introspector.setLog(new LogKitLogger("betwixt"));
  -                        /* The following is needed for EJB */
  +                        // The following is needed for EJB
                           introspector.setClassNormalizer(new ClassNormalizer() {
                               public Class normalize(Class clazz) {
                                   if (Proxy.isProxyClass(clazz)
  @@ -250,6 +247,7 @@
                           this.beanWriter.setXMLIntrospector(introspector);
                       }
                   }
  +
                   beanWriter.getBindingConfiguration().setMapIDs(this.refIds);
               }
   
  
  
  

Mime
View raw message