axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clive Brettingham-Moore (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Commented: (AXIS-1562) SocketFactoryFactory & HTTPSender limit to one socket factory per protocol
Date Tue, 14 Dec 2004 00:14:57 GMT
     [ http://nagoya.apache.org/jira/browse/AXIS-1562?page=comments#action_56613 ]
     
Clive Brettingham-Moore commented on AXIS-1562:
-----------------------------------------------

Sorry, dropped out for a while there. I was leaving the choice of a specific resolution to
somone who had an idea of how it would fit into the Axis architectural vision as a whole.
Basically the problem was that although multable EngineConfigurations can exist in one Classloading
context, each with transport configurations that may contain parameters passed to the socket
factories, once a socket factory is instantiated for a given protocol it is cached in a static
hashtable [in SocketFactoryFactory] keyed only by protocol - and all subsequent socket requests
for this protocol are filled using this first factory, regardless of the actual congifuration
of the requesting system.

I worked around this problem by altering HTTPSender to have a protected protected getSocket
method (as opposed to private) and writing a subclass that bypassed SocketFactoryFactory and
cached the factory in the sender instance, allowing me to set up the SSLContext on a per engine
[per service] basis; there are many other similar workarounds possible (MessageContext, static
threadlocal, JNDI, ect).

Axis 1.2RC2 pretty much resolved this issue, since getSocket method has been changed to protected
so I can now use the subclassing technique with the canonical version; this is quite adequate.
(a possibly more elegant solution would be to use an aggregate key (protocol, options) for
factory caching, but as I said, subclassing is entirely sufficient).

> SocketFactoryFactory & HTTPSender limit to one socket factory per protocol
> --------------------------------------------------------------------------
>
>          Key: AXIS-1562
>          URL: http://nagoya.apache.org/jira/browse/AXIS-1562
>      Project: Axis
>         Type: Bug
>   Components: Basic Architecture
>     Versions: 1.2 Beta
>  Environment: All
>     Reporter: Clive Brettingham-Moore
>     Priority: Minor

>
> org.apahce.axis.components.net.SocketFactoryFactory has a static method used to get a
socket factory, with parameters for the protocol and a set of options. The method caches using
a static hashtable with protocol as key; as a concequence axis can only support one SocketFactory
per protocol. Since for HTTPS certificate configuration is carried out via the SocketFactory
this is a problem for enterprise apps that must use multiple SSL web services concurrently
(or even non-concurrently).
> I have submitted this as a bug since it is a deficiency in a core function of the library,
and is in stark contrast to the flexability of almost every other axis feature.
> (There are work arounds, thanks to the configurability mentioned, such as a custom context-aware
SocketFactory, but there are still issues with running multiple applications in the same classloader
scope wrt axis)
> there are many solutions to this issue, some sort of finer factory configuration is needed,
eg instance based configuration, or ContextClassLoader keyed static config; simple static
management is not workable in enterprise applications.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message