Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.4
-
None
-
None
-
Any
Description
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[]
;
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;
}