You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Jon Brisbin (JIRA)" <ji...@apache.org> on 2008/11/25 19:09:05 UTC

[jira] Created: (SM-1705) Make Resources in ServiceMix-Saxon smart enough to reload themselves

Make Resources in ServiceMix-Saxon smart enough to reload themselves
--------------------------------------------------------------------

                 Key: SM-1705
                 URL: https://issues.apache.org/activemq/browse/SM-1705
             Project: ServiceMix
          Issue Type: New Feature
          Components: servicemix-saxon
    Affects Versions: servicemix-saxon-2008.01
            Reporter: Jon Brisbin
            Priority: Minor


It would be nice if the XSLT and XQuery resources inside the Saxon SE could monitor themselves for modifications and reload the Source when that event happens. This would work easily for file:/// resources (and classpath: for that matter, since Spring IO gives you the modification time of the jar file in which the resource lives), but other protocols would have to be fetched and hashed to tell if they've changed or not.

I've implemented a simple patch against trunk that allows you to add a "reload" attribute to the saxon:xslt element that tells it to always reload the resource. This isn't ideal, but will work for all URL types that Resource handles. Anything more smart would have to be multi-threaded, like a File watcher.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SM-1705) Make Resources in ServiceMix-Saxon smart enough to reload themselves

Posted by "Jon Brisbin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jon Brisbin updated SM-1705:
----------------------------

    Attachment: always_reload.diff.txt

This patch adds an "always reload" attribute to the saxon:xslt, saxon:query, and saxon:proxy elements. It blindly reloads the resource every time and doesn't check modification times so that it will work in all circumstances and with all protocols.

> Make Resources in ServiceMix-Saxon smart enough to reload themselves
> --------------------------------------------------------------------
>
>                 Key: SM-1705
>                 URL: https://issues.apache.org/activemq/browse/SM-1705
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-saxon
>    Affects Versions: servicemix-saxon-2008.01
>            Reporter: Jon Brisbin
>            Priority: Minor
>         Attachments: always_reload.diff.txt
>
>
> It would be nice if the XSLT and XQuery resources inside the Saxon SE could monitor themselves for modifications and reload the Source when that event happens. This would work easily for file:/// resources (and classpath: for that matter, since Spring IO gives you the modification time of the jar file in which the resource lives), but other protocols would have to be fetched and hashed to tell if they've changed or not.
> I've implemented a simple patch against trunk that allows you to add a "reload" attribute to the saxon:xslt element that tells it to always reload the resource. This isn't ideal, but will work for all URL types that Resource handles. Anything more smart would have to be multi-threaded, like a File watcher.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SM-1705) Make Resources in ServiceMix-Saxon smart enough to reload themselves

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet resolved SM-1705.
---------------------------------

       Resolution: Fixed
    Fix Version/s: servicemix-saxon-2008.02
         Assignee: Guillaume Nodet

Thanks a lot for this patch.

Sending        trunk/src/main/java/org/apache/servicemix/saxon/SaxonEndpoint.java
Sending        trunk/src/main/java/org/apache/servicemix/saxon/XQueryEndpoint.java
Sending        trunk/src/main/java/org/apache/servicemix/saxon/XsltEndpoint.java
Sending        trunk/src/main/java/org/apache/servicemix/saxon/XsltProxyEndpoint.java
Sending        trunk/src/test/resources/spring.xml
Transmitting file data .....
Committed revision 722067.

> Make Resources in ServiceMix-Saxon smart enough to reload themselves
> --------------------------------------------------------------------
>
>                 Key: SM-1705
>                 URL: https://issues.apache.org/activemq/browse/SM-1705
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-saxon
>    Affects Versions: servicemix-saxon-2008.01
>            Reporter: Jon Brisbin
>            Assignee: Guillaume Nodet
>            Priority: Minor
>             Fix For: servicemix-saxon-2008.02
>
>         Attachments: always_reload.diff.txt
>
>
> It would be nice if the XSLT and XQuery resources inside the Saxon SE could monitor themselves for modifications and reload the Source when that event happens. This would work easily for file:/// resources (and classpath: for that matter, since Spring IO gives you the modification time of the jar file in which the resource lives), but other protocols would have to be fetched and hashed to tell if they've changed or not.
> I've implemented a simple patch against trunk that allows you to add a "reload" attribute to the saxon:xslt element that tells it to always reload the resource. This isn't ideal, but will work for all URL types that Resource handles. Anything more smart would have to be multi-threaded, like a File watcher.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.