axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rsi...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/client ServiceFactory.java
Date Fri, 23 Aug 2002 00:56:45 GMT
rsitze      2002/08/22 17:56:45

  Modified:    java/src/org/apache/axis/transport/http AxisServletBase.java
               java/src/org/apache/axis/client ServiceFactory.java
  Log:
  Defer file I/O, and other minor nits
  
  Revision  Changes    Path
  1.13      +3 -1      xml-axis/java/src/org/apache/axis/transport/http/AxisServletBase.java
  
  Index: AxisServletBase.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AxisServletBase.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- AxisServletBase.java	23 Aug 2002 00:33:40 -0000	1.12
  +++ AxisServletBase.java	23 Aug 2002 00:56:45 -0000	1.13
  @@ -280,7 +280,9 @@
               EngineConfigurationFactoryFactory.newServletFactory(context)
                       .getServerEngineConfig();
   
  -        environment.put(EngineConfiguration.PROPERTY_NAME, config);
  +        if (config != null) {
  +            environment.put(EngineConfiguration.PROPERTY_NAME, config);
  +        }
   
           return environment;
       }
  
  
  
  1.16      +15 -6     xml-axis/java/src/org/apache/axis/client/ServiceFactory.java
  
  Index: ServiceFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/ServiceFactory.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ServiceFactory.java	23 Aug 2002 00:33:41 -0000	1.15
  +++ ServiceFactory.java	23 Aug 2002 00:56:45 -0000	1.16
  @@ -89,7 +89,8 @@
    */ 
   
   public class ServiceFactory extends javax.xml.rpc.ServiceFactory
  -        implements ObjectFactory {
  +        implements ObjectFactory
  +{
       // Constants for RefAddrs in the Reference.
       public static final String SERVICE_CLASSNAME  = "service classname";
       public static final String WSDL_LOCATION      = "WSDL location";
  @@ -97,8 +98,7 @@
       public static final String SERVICE_NAMESPACE  = "service namespace";
       public static final String SERVICE_LOCAL_PART = "service local part";
   
  -    private static EngineConfiguration defaultEngineConfig =
  -        EngineConfigurationFactoryFactory.newFactory().getClientEngineConfig();
  +    private static EngineConfiguration _defaultEngineConfig = null;
   
       private static ThreadLocal threadDefaultConfig = new ThreadLocal();
   
  @@ -106,6 +106,14 @@
       {
           threadDefaultConfig.set(config);
       }
  +    
  +    private static EngineConfiguration getDefaultEngineConfig() {
  +        if (_defaultEngineConfig == null) {
  +            _defaultEngineConfig =
  +                EngineConfigurationFactoryFactory.newFactory().getClientEngineConfig();
  +        }
  +        return _defaultEngineConfig;
  +    }
   
       /**
        * Obtain an AxisClient reference, using JNDI if possible, otherwise
  @@ -120,13 +128,14 @@
           Service service = null;
           InitialContext context = null;
   
  -        EngineConfiguration configProvider = (EngineConfiguration)environment.
  -            get(EngineConfiguration.PROPERTY_NAME);
  +        EngineConfiguration configProvider =
  +            (EngineConfiguration)environment.get(EngineConfiguration.PROPERTY_NAME);
  +
           if (configProvider == null)
               configProvider = (EngineConfiguration)threadDefaultConfig.get();
   
           if (configProvider == null)
  -            configProvider = defaultEngineConfig;
  +            configProvider = getDefaultEngineConfig();
   
           // First check to see if JNDI works
           // !!! Might we need to set up context parameters here?
  
  
  

Mime
View raw message