[
https://issues.apache.org/jira/browse/AXIS2-3011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12515763
]
Jarek Gawor commented on AXIS2-3011:
------------------------------------
Dustin,
I'm not sure about it either but this is about caching *client* configuration
context only. Which means all clients (and in any app) would use the same
configuration but the web services would have their own unshared configuration.
Now, if the client configuration must not be shared or should not be shared
then the ClientConfigurationFactory needs to be changed to do some kind of
scoping like you mentioned - maybe based on the context class loader?.
Bottom line is we need to know if it is safe to share the client configuration
context between all applications. If it is, then this patch should be ok. If it
is not, I can write another patch/factory that does caching based on the
context class loader.
> ServiceDescription caching leads to memory leak
> -----------------------------------------------
>
> Key: AXIS2-3011
> URL: https://issues.apache.org/jira/browse/AXIS2-3011
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: jaxws
> Reporter: Jarek Gawor
> Assignee: Ann Robinson
> Attachments: AXIS2-3011.patch
>
>
> The DescriptionFactoryImpl.createServiceDescription() function attempts to
> cache/reuse the ServiceDescription objects and that leads to memory leaks.
> First, a Hashtable is used for the cache. That means, any ServiceDescription
> created will always live in the cache and won't ever be reclaimed (and there
> is no clear cache function). Some sort of WeakHashMap could help the problem
> so that at least some unused ServiceDescription objects could be reclaimed.
> Second, the createServiceDescription() uses the
> DescriptionFactory.createClientConfigurationFactory().getClientConfigurationContext()
> to get the client configuration context. It looks like by default the
> ClientConfigurationFactory.getClientConfigurationContext() does NOT cache the
> configuration context. Therefore, each call creates a new configuration
> object. That means, that by default ServiceDescription will NOT be reused
> since the configuration context object instance is used to determine if the
> ServiceDescription should be reused or not (see DescriptionKey.equals()
> function).
> So, a simple program that calls createServiceDescription() repeatably in a
> loop (with the same arguments) will quickly run out of memory.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]