axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: xml-axis/java/test/concurrency TestApplicationScope.java
Date Wed, 01 May 2002 20:54:04 GMT
gdaniels    02/05/01 13:54:04

  Modified:    java/src/org/apache/axis/encoding/ser
                        ArrayDeserializerFactory.java
                        Base64DeserializerFactory.java
                        BaseDeserializerFactory.java
                        BeanDeserializerFactory.java
                        CalendarDeserializerFactory.java
                        DateDeserializerFactory.java
                        ElementDeserializerFactory.java
                        EnumDeserializerFactory.java
                        HexDeserializerFactory.java
                        JAFDataHandlerDeserializerFactory.java
                        MapDeserializerFactory.java
                        QNameDeserializerFactory.java
                        SimpleDeserializerFactory.java
                        VectorDeserializerFactory.java
               java/src/org/apache/axis/utils XMLUtils.java
               java/test/concurrency TestApplicationScope.java
  Log:
  Fix concurrency issues.
  
  * SAXParserFactory is not guaranteed to be thread safe, so wrap our
    access to it in a synchronized method.
  
  * We can't share Deserializers, as they have state which will get stomped
    on if they're used by multiple threads.  Remove code which did this.  We
    may revisit this type of thing later via some pooling mechanism, but they
    still would have to be obtained, used, and then released - never shared
    between threads.
  
  Revision  Changes    Path
  1.2       +1 -13     xml-axis/java/src/org/apache/axis/encoding/ser/ArrayDeserializerFactory.java
  
  Index: ArrayDeserializerFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/ArrayDeserializerFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ArrayDeserializerFactory.java	26 Jan 2002 02:40:34 -0000	1.1
  +++ ArrayDeserializerFactory.java	1 May 2002 20:54:03 -0000	1.2
  @@ -55,19 +55,7 @@
   
   package org.apache.axis.encoding.ser;
   
  -import org.xml.sax.Attributes;
  -import org.xml.sax.SAXException;
   
  -import javax.xml.rpc.namespace.QName;
  -import java.io.IOException;
  -
  -import org.apache.axis.encoding.Serializer;
  -import org.apache.axis.encoding.SerializerFactory;
  -import org.apache.axis.encoding.SerializationContext;
  -import org.apache.axis.encoding.Deserializer;
  -import org.apache.axis.encoding.DeserializerFactory;
  -import org.apache.axis.encoding.DeserializationContext;
  -import org.apache.axis.encoding.DeserializerImpl;
   /**
    * DeserializerFactory for arrays
    *
  @@ -75,6 +63,6 @@
    */
   public class ArrayDeserializerFactory extends BaseDeserializerFactory {
       public ArrayDeserializerFactory() {
  -        super(ArrayDeserializer.class, false);  // Can't share deserializers     
  +        super(ArrayDeserializer.class);
       }
   }
  
  
  
  1.3       +1 -13     xml-axis/java/src/org/apache/axis/encoding/ser/Base64DeserializerFactory.java
  
  Index: Base64DeserializerFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/Base64DeserializerFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Base64DeserializerFactory.java	31 Jan 2002 03:26:09 -0000	1.2
  +++ Base64DeserializerFactory.java	1 May 2002 20:54:03 -0000	1.3
  @@ -55,19 +55,7 @@
   
   package org.apache.axis.encoding.ser;
   
  -import org.xml.sax.Attributes;
  -import org.xml.sax.SAXException;
  -
   import javax.xml.rpc.namespace.QName;
  -import java.io.IOException;
  -
  -import org.apache.axis.encoding.Serializer;
  -import org.apache.axis.encoding.SerializerFactory;
  -import org.apache.axis.encoding.SerializationContext;
  -import org.apache.axis.encoding.Deserializer;
  -import org.apache.axis.encoding.DeserializerFactory;
  -import org.apache.axis.encoding.DeserializationContext;
  -import org.apache.axis.encoding.DeserializerImpl;
   /**
    * DeserializerFactory for hexBinary.
    *
  @@ -75,6 +63,6 @@
    */
   public class Base64DeserializerFactory extends BaseDeserializerFactory {
       public Base64DeserializerFactory(Class javaType, QName xmlType) {
  -        super(Base64Deserializer.class, false, xmlType, javaType);  // Can't share deserializers
    
  +        super(Base64Deserializer.class, xmlType, javaType);
       }
   }
  
  
  
  1.4       +14 -33    xml-axis/java/src/org/apache/axis/encoding/ser/BaseDeserializerFactory.java
  
  Index: BaseDeserializerFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/BaseDeserializerFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BaseDeserializerFactory.java	29 Mar 2002 22:13:05 -0000	1.3
  +++ BaseDeserializerFactory.java	1 May 2002 20:54:03 -0000	1.4
  @@ -55,28 +55,17 @@
   
   package org.apache.axis.encoding.ser;
   
  -import org.xml.sax.Attributes;
  -import org.xml.sax.SAXException;
  -
  -import javax.xml.rpc.namespace.QName;
  -import javax.xml.rpc.JAXRPCException;
  -
  -import java.io.IOException;
  -import java.util.Vector;
  -import java.util.Iterator;
  -
   import org.apache.axis.Constants;
  -import org.apache.axis.encoding.Serializer;
  -import org.apache.axis.encoding.SerializerFactory;
  -import org.apache.axis.encoding.SerializationContext;
   import org.apache.axis.encoding.Deserializer;
   import org.apache.axis.encoding.DeserializerFactory;
  -import org.apache.axis.encoding.DeserializationContext;
  -import org.apache.axis.encoding.DeserializerImpl;
   
  +import javax.xml.rpc.JAXRPCException;
  +import javax.xml.rpc.namespace.QName;
   import java.lang.reflect.Constructor;
  -import java.lang.reflect.Method;
   import java.lang.reflect.InvocationTargetException;
  +import java.lang.reflect.Method;
  +import java.util.Iterator;
  +import java.util.Vector;
   
   /**
    * Base class for Axis Deserialization Factory classes for code reuse
  @@ -89,8 +78,6 @@
       static Vector mechanisms = null;
       
       protected Class deserClass = null;
  -    protected boolean share = false;
  -    protected Deserializer deser = null;
       protected QName xmlType = null;
       protected Class javaType = null;
       protected Constructor deserClassConstructor = null;
  @@ -100,30 +87,24 @@
       /**
        * Constructor
        * @param deserClass is the class of the Deserializer
  -     * @param share indicates if deserializers can be shared. getDeserializerAs 
  -     * will always return the same deserializer object if share is true.  
  -     * Sharing is only valid for xml primitives.
        */
  -    public BaseDeserializerFactory(Class deserClass, boolean share) {
  +    public BaseDeserializerFactory(Class deserClass) {
           this.deserClass = deserClass;
  -        this.share = share;
       }
  -    public BaseDeserializerFactory(Class deserClass, boolean share, 
  -                                   QName xmlType, Class javaType) {
  +    public BaseDeserializerFactory(Class deserClass,
  +                                   QName xmlType,
  +                                   Class javaType) {
           this.deserClass = deserClass;
  -        this.share = share;
           this.xmlType = xmlType;
           this.javaType = javaType;
       }
   
  -    public javax.xml.rpc.encoding.Deserializer 
  +    public javax.xml.rpc.encoding.Deserializer
           getDeserializerAs(String mechanismType)
           throws JAXRPCException {
  +        Deserializer deser = null;
  +
           // Need to add code to check against mechanisms vector.
  -        if (share && deser != null) {
  -            return deser;
  -        }
  -        deser = null;
           try {
               // Try getting a specialized Deserializer
               deser = getSpecialized(mechanismType);
  @@ -235,8 +216,8 @@
        * public <constructor>(Class javaType, QName xmlType)
        * public <constructor>()
        * @param factory class
  -     * @param QName xmlType
  -     * @param Class javaType
  +     * @param javaType
  +     * @param xmlType
        */
       public static DeserializerFactory createFactory(Class factory, 
                                                       Class javaType, 
  
  
  
  1.2       +2 -13     xml-axis/java/src/org/apache/axis/encoding/ser/BeanDeserializerFactory.java
  
  Index: BeanDeserializerFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/BeanDeserializerFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BeanDeserializerFactory.java	26 Jan 2002 02:40:34 -0000	1.1
  +++ BeanDeserializerFactory.java	1 May 2002 20:54:03 -0000	1.2
  @@ -55,20 +55,9 @@
   
   package org.apache.axis.encoding.ser;
   
  -import org.xml.sax.Attributes;
  -import org.xml.sax.SAXException;
  +import org.apache.axis.utils.JavaUtils;
   
   import javax.xml.rpc.namespace.QName;
  -import java.io.IOException;
  -
  -import org.apache.axis.encoding.Serializer;
  -import org.apache.axis.encoding.SerializerFactory;
  -import org.apache.axis.encoding.SerializationContext;
  -import org.apache.axis.encoding.Deserializer;
  -import org.apache.axis.encoding.DeserializerFactory;
  -import org.apache.axis.encoding.DeserializationContext;
  -import org.apache.axis.encoding.DeserializerImpl;
  -import org.apache.axis.utils.JavaUtils;
   
   /**
    * DeserializerFactory for Bean
  @@ -77,7 +66,7 @@
    */
   public class BeanDeserializerFactory extends BaseDeserializerFactory {
       public BeanDeserializerFactory(Class javaType, QName xmlType) {
  -        super(BeanDeserializer.class, false, xmlType, javaType);  // Can't share deserializers

  +        super(BeanDeserializer.class, xmlType, javaType);
           
           // Sometimes an Enumeration class is registered as a Bean.
           // If this is the case, silently switch to the EnumDeserializer
  
  
  
  1.2       +1 -1      xml-axis/java/src/org/apache/axis/encoding/ser/CalendarDeserializerFactory.java
  
  Index: CalendarDeserializerFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/CalendarDeserializerFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CalendarDeserializerFactory.java	31 Mar 2002 23:09:33 -0000	1.1
  +++ CalendarDeserializerFactory.java	1 May 2002 20:54:03 -0000	1.2
  @@ -65,6 +65,6 @@
   public class CalendarDeserializerFactory extends BaseDeserializerFactory {
   
       public CalendarDeserializerFactory(Class javaType, QName xmlType) {
  -        super(CalendarDeserializer.class, false, xmlType, javaType); 
  +        super(CalendarDeserializer.class, xmlType, javaType);
       }
   }
  
  
  
  1.2       +1 -22     xml-axis/java/src/org/apache/axis/encoding/ser/DateDeserializerFactory.java
  
  Index: DateDeserializerFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/DateDeserializerFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DateDeserializerFactory.java	26 Jan 2002 02:40:34 -0000	1.1
  +++ DateDeserializerFactory.java	1 May 2002 20:54:03 -0000	1.2
  @@ -55,29 +55,8 @@
   
   package org.apache.axis.encoding.ser;
   
  -import java.beans.IntrospectionException;
  -import java.io.IOException;
  -import java.lang.reflect.Constructor;
  -import java.lang.reflect.InvocationTargetException;
  -
  -import javax.xml.rpc.JAXRPCException;
   import javax.xml.rpc.namespace.QName;
   
  -import org.apache.axis.InternalException;
  -import org.apache.axis.message.SOAPHandler;
  -import org.apache.axis.utils.JavaUtils;
  -
  -import org.xml.sax.Attributes;
  -import org.xml.sax.SAXException;
  -
  -import org.apache.axis.encoding.Serializer;
  -import org.apache.axis.encoding.SerializerFactory;
  -import org.apache.axis.encoding.SerializationContext;
  -import org.apache.axis.encoding.Deserializer;
  -import org.apache.axis.encoding.DeserializerFactory;
  -import org.apache.axis.encoding.DeserializationContext;
  -import org.apache.axis.encoding.DeserializerImpl;
  -
   /**
    * A DateDeserializer Factory
    *
  @@ -86,6 +65,6 @@
   public class DateDeserializerFactory extends BaseDeserializerFactory {
   
       public DateDeserializerFactory(Class javaType, QName xmlType) {
  -        super(DateDeserializer.class, false, xmlType, javaType); 
  +        super(DateDeserializer.class, xmlType, javaType);
       }
   }
  
  
  
  1.2       +1 -13     xml-axis/java/src/org/apache/axis/encoding/ser/ElementDeserializerFactory.java
  
  Index: ElementDeserializerFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/ElementDeserializerFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ElementDeserializerFactory.java	26 Jan 2002 02:40:34 -0000	1.1
  +++ ElementDeserializerFactory.java	1 May 2002 20:54:03 -0000	1.2
  @@ -55,19 +55,7 @@
   
   package org.apache.axis.encoding.ser;
   
  -import org.xml.sax.Attributes;
  -import org.xml.sax.SAXException;
   
  -import javax.xml.rpc.namespace.QName;
  -import java.io.IOException;
  -
  -import org.apache.axis.encoding.Serializer;
  -import org.apache.axis.encoding.SerializerFactory;
  -import org.apache.axis.encoding.SerializationContext;
  -import org.apache.axis.encoding.Deserializer;
  -import org.apache.axis.encoding.DeserializerFactory;
  -import org.apache.axis.encoding.DeserializationContext;
  -import org.apache.axis.encoding.DeserializerImpl;
   /**
    * DeserializerFactory for Element.
    *
  @@ -75,6 +63,6 @@
    */
   public class ElementDeserializerFactory extends BaseDeserializerFactory {
       public ElementDeserializerFactory() {
  -        super(ElementDeserializer.class, false);  // Can't share deserializers     
  +        super(ElementDeserializer.class);
       }
   }
  
  
  
  1.2       +1 -13     xml-axis/java/src/org/apache/axis/encoding/ser/EnumDeserializerFactory.java
  
  Index: EnumDeserializerFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/EnumDeserializerFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EnumDeserializerFactory.java	26 Jan 2002 02:40:34 -0000	1.1
  +++ EnumDeserializerFactory.java	1 May 2002 20:54:03 -0000	1.2
  @@ -55,19 +55,7 @@
   
   package org.apache.axis.encoding.ser;
   
  -import org.xml.sax.Attributes;
  -import org.xml.sax.SAXException;
  -
   import javax.xml.rpc.namespace.QName;
  -import java.io.IOException;
  -
  -import org.apache.axis.encoding.Serializer;
  -import org.apache.axis.encoding.SerializerFactory;
  -import org.apache.axis.encoding.SerializationContext;
  -import org.apache.axis.encoding.Deserializer;
  -import org.apache.axis.encoding.DeserializerFactory;
  -import org.apache.axis.encoding.DeserializationContext;
  -import org.apache.axis.encoding.DeserializerImpl;
   /**
    * DeserializerFactory for Enumeration.
    *
  @@ -75,6 +63,6 @@
    */
   public class EnumDeserializerFactory extends BaseDeserializerFactory {
       public EnumDeserializerFactory(Class javaType, QName xmlType) {
  -        super(EnumDeserializer.class, false, xmlType, javaType);  // Can't share deserializers
    
  +        super(EnumDeserializer.class, xmlType, javaType);  // Can't share deserializers
       }
   }
  
  
  
  1.3       +1 -13     xml-axis/java/src/org/apache/axis/encoding/ser/HexDeserializerFactory.java
  
  Index: HexDeserializerFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/HexDeserializerFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HexDeserializerFactory.java	8 Feb 2002 23:18:53 -0000	1.2
  +++ HexDeserializerFactory.java	1 May 2002 20:54:03 -0000	1.3
  @@ -55,19 +55,7 @@
   
   package org.apache.axis.encoding.ser;
   
  -import org.xml.sax.Attributes;
  -import org.xml.sax.SAXException;
  -
   import javax.xml.rpc.namespace.QName;
  -import java.io.IOException;
  -
  -import org.apache.axis.encoding.Serializer;
  -import org.apache.axis.encoding.SerializerFactory;
  -import org.apache.axis.encoding.SerializationContext;
  -import org.apache.axis.encoding.Deserializer;
  -import org.apache.axis.encoding.DeserializerFactory;
  -import org.apache.axis.encoding.DeserializationContext;
  -import org.apache.axis.encoding.DeserializerImpl;
   /**
    * DeserializerFactory for hexBinary.
    *
  @@ -75,6 +63,6 @@
    */
   public class HexDeserializerFactory extends BaseDeserializerFactory {
       public HexDeserializerFactory(Class javaType, QName xmlType) {
  -        super(HexDeserializer.class, false, xmlType, javaType);  // Can't share deserializers
    
  +        super(HexDeserializer.class, xmlType, javaType);
       }
   }
  
  
  
  1.4       +4 -24     xml-axis/java/src/org/apache/axis/encoding/ser/JAFDataHandlerDeserializerFactory.java
  
  Index: JAFDataHandlerDeserializerFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/JAFDataHandlerDeserializerFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JAFDataHandlerDeserializerFactory.java	15 Mar 2002 01:14:10 -0000	1.3
  +++ JAFDataHandlerDeserializerFactory.java	1 May 2002 20:54:03 -0000	1.4
  @@ -55,32 +55,12 @@
   
   package org.apache.axis.encoding.ser;
   
  -import java.beans.IntrospectionException;
  -import java.io.IOException;
  -import java.lang.reflect.Constructor;
  -import java.lang.reflect.InvocationTargetException;
  -
  -import javax.xml.rpc.JAXRPCException;
  -import javax.xml.rpc.namespace.QName;
  -
  -import org.apache.axis.InternalException;
  -import org.apache.axis.message.SOAPHandler;
   import org.apache.axis.utils.JavaUtils;
  -
  -import org.xml.sax.Attributes;
  -import org.xml.sax.SAXException;
  -
  -import org.apache.axis.encoding.Serializer;
  -import org.apache.axis.encoding.SerializerFactory;
  -import org.apache.axis.encoding.SerializationContext;
  -import org.apache.axis.encoding.Deserializer;
  -import org.apache.axis.encoding.DeserializerFactory;
  -import org.apache.axis.encoding.DeserializationContext;
  -import org.apache.axis.encoding.DeserializerImpl;
  -
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  +import javax.xml.rpc.namespace.QName;
  +
   /**
    * A JAFDataHandlerDeserializer Factory
    *
  @@ -90,13 +70,13 @@
      protected static Log log = LogFactory.getLog(JAFDataHandlerDeserializerFactory.class.getName());
   
       public JAFDataHandlerDeserializerFactory(Class javaType, QName xmlType) {
  -        super(JAFDataHandlerDeserializer.class, false, xmlType, javaType); 
  +        super(JAFDataHandlerDeserializer.class, xmlType, javaType);
           log.debug(JavaUtils.getMessage("enter00",
                   "JAFDataHandlerDeserializerFactory(" + javaType + ", "
                   + xmlType + ")"));
       }
       public JAFDataHandlerDeserializerFactory() {
  -        super(JAFDataHandlerDeserializer.class, false); 
  +        super(JAFDataHandlerDeserializer.class);
           log.debug(JavaUtils.getMessage("enter00",
                   "JAFDataHandlerDeserializerFactory()"));
       }
  
  
  
  1.2       +1 -22     xml-axis/java/src/org/apache/axis/encoding/ser/MapDeserializerFactory.java
  
  Index: MapDeserializerFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/MapDeserializerFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MapDeserializerFactory.java	26 Jan 2002 02:40:34 -0000	1.1
  +++ MapDeserializerFactory.java	1 May 2002 20:54:03 -0000	1.2
  @@ -55,29 +55,8 @@
   
   package org.apache.axis.encoding.ser;
   
  -import java.beans.IntrospectionException;
  -import java.io.IOException;
  -import java.lang.reflect.Constructor;
  -import java.lang.reflect.InvocationTargetException;
  -
  -import javax.xml.rpc.JAXRPCException;
   import javax.xml.rpc.namespace.QName;
   
  -import org.apache.axis.InternalException;
  -import org.apache.axis.message.SOAPHandler;
  -import org.apache.axis.utils.JavaUtils;
  -
  -import org.xml.sax.Attributes;
  -import org.xml.sax.SAXException;
  -
  -import org.apache.axis.encoding.Serializer;
  -import org.apache.axis.encoding.SerializerFactory;
  -import org.apache.axis.encoding.SerializationContext;
  -import org.apache.axis.encoding.Deserializer;
  -import org.apache.axis.encoding.DeserializerFactory;
  -import org.apache.axis.encoding.DeserializationContext;
  -import org.apache.axis.encoding.DeserializerImpl;
  -
   /**
    * A MapDeserializer Factory
    *
  @@ -86,6 +65,6 @@
   public class MapDeserializerFactory extends BaseDeserializerFactory {
   
       public MapDeserializerFactory(Class javaType, QName xmlType) {
  -        super(MapDeserializer.class, false, xmlType, javaType); 
  +        super(MapDeserializer.class, xmlType, javaType);
       }
   }
  
  
  
  1.2       +1 -1      xml-axis/java/src/org/apache/axis/encoding/ser/QNameDeserializerFactory.java
  
  Index: QNameDeserializerFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/QNameDeserializerFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- QNameDeserializerFactory.java	2 Apr 2002 22:05:18 -0000	1.1
  +++ QNameDeserializerFactory.java	1 May 2002 20:54:03 -0000	1.2
  @@ -63,6 +63,6 @@
   public class QNameDeserializerFactory extends BaseDeserializerFactory {
   
       public QNameDeserializerFactory(Class javaType, QName xmlType) {
  -        super(QNameDeserializer.class, false, xmlType, javaType); 
  +        super(QNameDeserializer.class, xmlType, javaType);
       }
   }
  
  
  
  1.4       +3 -20     xml-axis/java/src/org/apache/axis/encoding/ser/SimpleDeserializerFactory.java
  
  Index: SimpleDeserializerFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/SimpleDeserializerFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SimpleDeserializerFactory.java	27 Mar 2002 17:53:06 -0000	1.3
  +++ SimpleDeserializerFactory.java	1 May 2002 20:54:03 -0000	1.4
  @@ -55,28 +55,11 @@
   
   package org.apache.axis.encoding.ser;
   
  -import java.beans.IntrospectionException;
  -import java.io.IOException;
  -import java.lang.reflect.Constructor;
  -import java.lang.reflect.InvocationTargetException;
  +import org.apache.axis.utils.JavaUtils;
   
   import javax.xml.rpc.JAXRPCException;
   import javax.xml.rpc.namespace.QName;
  -
  -import org.apache.axis.InternalException;
  -import org.apache.axis.message.SOAPHandler;
  -import org.apache.axis.utils.JavaUtils;
  -
  -import org.xml.sax.Attributes;
  -import org.xml.sax.SAXException;
  -
  -import org.apache.axis.encoding.Serializer;
  -import org.apache.axis.encoding.SerializerFactory;
  -import org.apache.axis.encoding.SerializationContext;
  -import org.apache.axis.encoding.Deserializer;
  -import org.apache.axis.encoding.DeserializerFactory;
  -import org.apache.axis.encoding.DeserializationContext;
  -import org.apache.axis.encoding.DeserializerImpl;
  +import java.lang.reflect.Constructor;
   
   /**
    * A deserializer for any simple type with a (String) constructor.  Note:
  @@ -95,7 +78,7 @@
        * to allow distinction between primitive values and java.lang wrappers.
        **/
       public SimpleDeserializerFactory(Class javaType, QName xmlType) {
  -        super(SimpleDeserializer.class, false, xmlType, javaType); 
  +        super(SimpleDeserializer.class, xmlType, javaType);
           try {
               if (!javaType.isPrimitive()) {
                   constructor = 
  
  
  
  1.2       +1 -22     xml-axis/java/src/org/apache/axis/encoding/ser/VectorDeserializerFactory.java
  
  Index: VectorDeserializerFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/VectorDeserializerFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VectorDeserializerFactory.java	26 Jan 2002 02:40:34 -0000	1.1
  +++ VectorDeserializerFactory.java	1 May 2002 20:54:03 -0000	1.2
  @@ -55,29 +55,8 @@
   
   package org.apache.axis.encoding.ser;
   
  -import java.beans.IntrospectionException;
  -import java.io.IOException;
  -import java.lang.reflect.Constructor;
  -import java.lang.reflect.InvocationTargetException;
  -
  -import javax.xml.rpc.JAXRPCException;
   import javax.xml.rpc.namespace.QName;
   
  -import org.apache.axis.InternalException;
  -import org.apache.axis.message.SOAPHandler;
  -import org.apache.axis.utils.JavaUtils;
  -
  -import org.xml.sax.Attributes;
  -import org.xml.sax.SAXException;
  -
  -import org.apache.axis.encoding.Serializer;
  -import org.apache.axis.encoding.SerializerFactory;
  -import org.apache.axis.encoding.SerializationContext;
  -import org.apache.axis.encoding.Deserializer;
  -import org.apache.axis.encoding.DeserializerFactory;
  -import org.apache.axis.encoding.DeserializationContext;
  -import org.apache.axis.encoding.DeserializerImpl;
  -
   /**
    * A VectorDeserializer Factory
    *
  @@ -86,6 +65,6 @@
   public class VectorDeserializerFactory extends BaseDeserializerFactory {
   
       public VectorDeserializerFactory(Class javaType, QName xmlType) {
  -        super(VectorDeserializer.class, false, xmlType, javaType); 
  +        super(VectorDeserializer.class, xmlType, javaType);
       }
   }
  
  
  
  1.47      +19 -20    xml-axis/java/src/org/apache/axis/utils/XMLUtils.java
  
  Index: XMLUtils.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/XMLUtils.java,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- XMLUtils.java	19 Apr 2002 17:18:52 -0000	1.46
  +++ XMLUtils.java	1 May 2002 20:54:04 -0000	1.47
  @@ -71,8 +71,8 @@
   import org.xml.sax.InputSource;
   import org.xml.sax.SAXException;
   import org.xml.sax.SAXParseException;
  -import org.xml.sax.helpers.DefaultHandler;
   import org.xml.sax.XMLReader;
  +import org.xml.sax.helpers.DefaultHandler;
   
   
   import javax.xml.parsers.DocumentBuilder;
  @@ -180,21 +180,18 @@
           return( dbf );
       }
   
  -    private static DefaultHandler doNothingContentHandler = new DefaultHandler(); //no
events should h
       private static boolean tryReset= true;
   
       /** Get a SAX parser instance from the JAXP factory.
        *
        * @return a SAXParser instance.
        */
  -    public static SAXParser getSAXParser() {
  -        synchronized (XMLUtils.class ) {
  -          if(!saxParsers.empty()) 
  -                 return (SAXParser )saxParsers.pop();
  -         }
  +    public synchronized static SAXParser getSAXParser() {
  +        if(!saxParsers.empty())
  +            return (SAXParser )saxParsers.pop();
  +
           try {
  -                return saxFactory.newSAXParser();
  -            
  +            return saxFactory.newSAXParser();
           } catch (ParserConfigurationException e) {
               log.error(JavaUtils.getMessage("parserConfigurationException00"), e);
               return null;
  @@ -210,22 +207,24 @@
        */
       public static void releaseSAXParser(SAXParser parser) {
           if(!tryReset) return;
  -       
  +
           //Free up possible ref. held by past contenthandler.
           try{
  -            XMLReader xmlReader= parser.getXMLReader(); 
  +            XMLReader xmlReader= parser.getXMLReader();
               if(null != xmlReader){
  -                xmlReader.setContentHandler(doNothingContentHandler); 
  -                xmlReader.setDTDHandler(doNothingContentHandler); 
  -                xmlReader.setEntityResolver(doNothingContentHandler);
  -                xmlReader.setErrorHandler(doNothingContentHandler);
  +//                xmlReader.setContentHandler(doNothingContentHandler);
  +//                xmlReader.setDTDHandler(doNothingContentHandler);
  +//                xmlReader.setEntityResolver(doNothingContentHandler);
  +//                xmlReader.setErrorHandler(doNothingContentHandler);
                   synchronized (XMLUtils.class ) {
  -                saxParsers.push(parser);
  +                    saxParsers.push(parser);
                   }
  -            }    
  -            else     
  -             tryReset= false;
  -        }catch(org.xml.sax.SAXException e){ tryReset= false;}
  +            }
  +            else
  +                tryReset= false;
  +        } catch (org.xml.sax.SAXException e) {
  +            tryReset= false;
  +        }
       }
   
       public static Document newDocument() {
  
  
  
  1.3       +5 -4      xml-axis/java/test/concurrency/TestApplicationScope.java
  
  Index: TestApplicationScope.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/concurrency/TestApplicationScope.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestApplicationScope.java	1 May 2002 14:20:39 -0000	1.2
  +++ TestApplicationScope.java	1 May 2002 20:54:04 -0000	1.3
  @@ -125,10 +125,11 @@
                           String respStr = msgContext.getResponseMessage().getSOAPPart().getAsString();
   
                           String reqStr = msgContext.getRequestMessage().getSOAPPart().getAsString();
  -                        log.fatal("Got null response! Request message:\r\n" + reqStr +
"\r\n\r\n" +
  -                                  "Response message:\r\n" + respStr);
  -                    }
  -                    if (!ret.equals(TestService.MESSAGE)) {
  +                        String nullStr = "Got null response! Request message:\r\n" + reqStr
+ "\r\n\r\n" +
  +                                  "Response message:\r\n" + respStr;
  +                        log.fatal(nullStr);
  +                        setError(new Exception(nullStr));
  +                    } else if (!ret.equals(TestService.MESSAGE)) {
                           setError(new Exception("Messages didn't match (got '" +
                                                  ret +
                                                  "' wanted '" +
  
  
  

Mime
View raw message