[
https://issues.apache.org/jira/browse/CXF-850?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Kulp resolved CXF-850.
-----------------------------
Resolution: Fixed
The CacheMap is a special kind of WeakHashMap. It's designed to hold onto the
target object (in this case the JAXBContext) as long as anyone strongly
references any of the keys (in this case, the Set<Class<?>>) that were used to
retrieve it. It's perfect for this. To make it work, all that needed to be
done was the JAXBDataBinding instance in the service port just needs to
strongly hold onto the Set<Class<?>> that was used as the key. When the port
goes away, the set is no longer strongly referenced, it goes away, the cache
clears, etc...
In any case, it's committed now. :-)
> performance of repeated calls to jaxws.Service.createPort is poor, jaxb
> context is created every time
> -----------------------------------------------------------------------------------------------------
>
> Key: CXF-850
> URL: https://issues.apache.org/jira/browse/CXF-850
> Project: CXF
> Issue Type: Bug
> Components: JAX-WS Runtime
> Affects Versions: 2.0.1
> Reporter: Gary Tully
> Assignee: Daniel Kulp
> Attachments: jaxb_context_cache.gtully.patch
>
>
> the JAXBContext should be cached
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.