Christian Weihs created AXIS-2873:
-------------------------------------

             Summary: Cached properties (e.g. timeouts,...)
                 Key: AXIS-2873
                 URL: https://issues.apache.org/jira/browse/AXIS-2873
             Project: Axis
          Issue Type: Bug
          Components: Basic Architecture
    Affects Versions: 1.4
         Environment: Any
            Reporter: Christian Weihs
            Priority: Minor


If a SocketFactory has been initialized threw the SocketFactoryFactory its not 
possible to change the timeout again.

On instanziation the SocketFactory is initialed with a Hashtable of properties. 
If you try to get an instance again it only looks after an instance for the 
same protocol, but not with the same properties.

Because of this it is not possible to change the timeout or any other property 
after first instanziation.

Class: org.apache.axis.components.net.SocketFactoryFactory

public static synchronized SocketFactory getFactory(String protocol,
                                                        Hashtable attributes) {

        
//-----------------------------------------------------------------------------------------------
        //Here we only look for a factory for the current protocol...
        //given properties are ignored completly
        // In my opinion thats a mistake....
        
//-----------------------------------------------------------------------------------------------
        SocketFactory theFactory = (SocketFactory)factories.get(protocol);

        if (theFactory == null) {
            Object objects[] = new Object[] { attributes };
    
            if (protocol.equalsIgnoreCase("http")) {
                theFactory = (SocketFactory)
                    AxisProperties.newInstance(SocketFactory.class, classes, 
objects);
            } else if (protocol.equalsIgnoreCase("https")) {
                theFactory = (SecureSocketFactory)
                    AxisProperties.newInstance(SecureSocketFactory.class, 
classes, objects);
            }
            
            if (theFactory != null) {
                factories.put(protocol, theFactory);
            }
        }
        return theFactory;
    }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to