You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2014/12/12 15:01:13 UTC
[jira] [Resolved] (CXF-5854) Add property "refreshTemplates" to
XSLTJaxbProvider
[ https://issues.apache.org/jira/browse/CXF-5854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin resolved CXF-5854.
-----------------------------------
Resolution: Fixed
Fix Version/s: 3.0.4
3.1.0
Assignee: Sergey Beryozkin
Only templates created from the annotations can be refreshed for now
> Add property "refreshTemplates" to XSLTJaxbProvider
> ---------------------------------------------------
>
> Key: CXF-5854
> URL: https://issues.apache.org/jira/browse/CXF-5854
> Project: CXF
> Issue Type: Improvement
> Components: JAX-RS
> Affects Versions: 3.0.0
> Reporter: Vjacheslav Borisov
> Assignee: Sergey Beryozkin
> Priority: Minor
> Fix For: 3.1.0, 3.0.4
>
>
> Netbeans has feature named "Deploy on save" http://wiki.netbeans.org/FaqDeployOnSave, which allows to compile classes and copy static resources to web root "on save".
> But this is not works with XSLTJaxbProvider, which caches internally its templates and XSLTJaxbProvider does not see changed resources.
> This can be "fixed" using parameter like "refreshTemplates", which, if set to true,
> cleans all loaded templates on each request. This can be useful and save lot of time in development environment.
> {code:title=XSLTJaxbProvider.java|borderStyle=solid}
> public class XSLTJaxbProvider<T> extends JAXBElementProvider<T> {
> public boolean isWriteable(Class type, Type genericType, Annotation[] anns, MediaType mt) {
> /* cut */
> if (refreshTemplates) {
> annotationTemplates=new ConcurrentHashMap<String, Templates>();
> //refresh other types of templates
> }
> /* cut */
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)