Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-5854

Add property "refreshTemplates" to XSLTJaxbProvider

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0.4, 3.1
    • Component/s: JAX-RS
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      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.

      XSLTJaxbProvider.java
      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 */
          }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              sergey_beryozkin Sergey Beryozkin
              Reporter:
              slavb18 Vjacheslav Borisov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: