You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (Created) (JIRA)" <ji...@apache.org> on 2011/10/09 10:02:29 UTC

[jira] [Created] (CAMEL-4528) XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded

XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded
-------------------------------------------------------------------------------------------------------------------------

                 Key: CAMEL-4528
                 URL: https://issues.apache.org/jira/browse/CAMEL-4528
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
            Reporter: Claus Ibsen
            Priority: Minor
             Fix For: 2.9.0


This allows people to force a re-load of the resources using JMX, but still have cache by default.

See nabble
http://camel.465427.n5.nabble.com/Updating-cached-content-without-restart-tp4883378p4883378.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] [Commented] (CAMEL-4528) XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded

Posted by Claus Ibsen <cl...@gmail.com>.
Rich

Great work.

There are components outside camel-core which could benefit from JMX
attributes/operations on their endpoint classes.
This is now very easy on Camel trunk as you just use the Camel JMX annotations.

Likewise you may want to look into the abstract ResourceEndpoint from
camel-core, to see what it takes to add JMX support for clearing
cache. This then allows freemarker, velocity and other components
which uses this class to have that ability.

Fell free to create JIRA tickets so we have this tracked.



On Thu, Nov 10, 2011 at 10:20 PM, Rich Newcomb <ri...@gmail.com> wrote:
> Agreed.  Thanks Christian.
>
> On Thu, Nov 10, 2011 at 1:01 PM, Christian Müller (Commented) (JIRA) <
> jira@apache.org> wrote:
>
>>
>>    [
>> https://issues.apache.org/jira/browse/CAMEL-4528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148006#comment-13148006]
>>
>> Christian Müller commented on CAMEL-4528:
>> -----------------------------------------
>>
>> Hey Rich!
>>
>> Thank you for the patch. We really appreciate it.
>> We should update the WIKI page *after* we committed the patch. So we can
>> make sure we do not document something we didn't commit/implement. :-)
>> I will take care of this, if Claus do not grab this issue in the next
>> couple of days...
>>
>> Best,
>> Christian
>>
>> > XSLT component - Add JMX to the endpoint, and expose operations to clear
>> the cache, so resources is forced to be reloaded
>> >
>> -------------------------------------------------------------------------------------------------------------------------
>> >
>> >                 Key: CAMEL-4528
>> >                 URL: https://issues.apache.org/jira/browse/CAMEL-4528
>> >             Project: Camel
>> >          Issue Type: Improvement
>> >          Components: camel-core
>> >            Reporter: Claus Ibsen
>> >            Priority: Minor
>> >             Fix For: 2.9.0
>> >
>> >         Attachments: camel-4528.patch
>> >
>> >
>> > This allows people to force a re-load of the resources using JMX, but
>> still have cache by default.
>> > See nabble
>> >
>> http://camel.465427.n5.nabble.com/Updating-cached-content-without-restart-tp4883378p4883378.html
>>
>> --
>> This message is automatically generated by JIRA.
>> If you think it was sent incorrectly, please contact your JIRA
>> administrators:
>> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
>> For more information on JIRA, see: http://www.atlassian.com/software/jira
>>
>>
>>
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: [jira] [Commented] (CAMEL-4528) XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded

Posted by Rich Newcomb <ri...@gmail.com>.
Agreed.  Thanks Christian.

On Thu, Nov 10, 2011 at 1:01 PM, Christian Müller (Commented) (JIRA) <
jira@apache.org> wrote:

>
>    [
> https://issues.apache.org/jira/browse/CAMEL-4528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148006#comment-13148006]
>
> Christian Müller commented on CAMEL-4528:
> -----------------------------------------
>
> Hey Rich!
>
> Thank you for the patch. We really appreciate it.
> We should update the WIKI page *after* we committed the patch. So we can
> make sure we do not document something we didn't commit/implement. :-)
> I will take care of this, if Claus do not grab this issue in the next
> couple of days...
>
> Best,
> Christian
>
> > XSLT component - Add JMX to the endpoint, and expose operations to clear
> the cache, so resources is forced to be reloaded
> >
> -------------------------------------------------------------------------------------------------------------------------
> >
> >                 Key: CAMEL-4528
> >                 URL: https://issues.apache.org/jira/browse/CAMEL-4528
> >             Project: Camel
> >          Issue Type: Improvement
> >          Components: camel-core
> >            Reporter: Claus Ibsen
> >            Priority: Minor
> >             Fix For: 2.9.0
> >
> >         Attachments: camel-4528.patch
> >
> >
> > This allows people to force a re-load of the resources using JMX, but
> still have cache by default.
> > See nabble
> >
> http://camel.465427.n5.nabble.com/Updating-cached-content-without-restart-tp4883378p4883378.html
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators:
> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>

[jira] [Commented] (CAMEL-4528) XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded

Posted by "Christian Müller (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148006#comment-13148006 ] 

Christian Müller commented on CAMEL-4528:
-----------------------------------------

Hey Rich!

Thank you for the patch. We really appreciate it.
We should update the WIKI page *after* we committed the patch. So we can make sure we do not document something we didn't commit/implement. :-)
I will take care of this, if Claus do not grab this issue in the next couple of days...

Best,
Christian
                
> XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4528
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4528
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: camel-4528.patch
>
>
> This allows people to force a re-load of the resources using JMX, but still have cache by default.
> See nabble
> http://camel.465427.n5.nabble.com/Updating-cached-content-without-restart-tp4883378p4883378.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (CAMEL-4528) XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded

Posted by "Rich Newcomb (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rich Newcomb updated CAMEL-4528:
--------------------------------

    Attachment: camel-4528.patch

Updated patch with synchronized loadResource() operation. Good catch Raul!
                
> XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4528
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4528
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: camel-4528.patch
>
>
> This allows people to force a re-load of the resources using JMX, but still have cache by default.
> See nabble
> http://camel.465427.n5.nabble.com/Updating-cached-content-without-restart-tp4883378p4883378.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4528) XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded

Posted by "Rich Newcomb (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149084#comment-13149084 ] 

Rich Newcomb commented on CAMEL-4528:
-------------------------------------

Thanks Claus. We should probably add one more cycle to the unit test to verify that the caching is still in effect after the cache is reset. (I lost that flag reset during a refactor.)
                
> XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4528
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4528
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: camel-4528.patch
>
>
> This allows people to force a re-load of the resources using JMX, but still have cache by default.
> See nabble
> http://camel.465427.n5.nabble.com/Updating-cached-content-without-restart-tp4883378p4883378.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4528) XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded

Posted by "Rich Newcomb (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rich Newcomb updated CAMEL-4528:
--------------------------------

    Attachment: camel-4528.patch

Patch with unit tests attached.

I also added a note to the XSLT wiki page.
                
> XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4528
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4528
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Rich Newcomb
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: camel-4528.patch
>
>
> This allows people to force a re-load of the resources using JMX, but still have cache by default.
> See nabble
> http://camel.465427.n5.nabble.com/Updating-cached-content-without-restart-tp4883378p4883378.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4528) XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded

Posted by "Rich Newcomb (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rich Newcomb updated CAMEL-4528:
--------------------------------

    Patch Info: Patch Available
    
> XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4528
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4528
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: camel-4528.patch
>
>
> This allows people to force a re-load of the resources using JMX, but still have cache by default.
> See nabble
> http://camel.465427.n5.nabble.com/Updating-cached-content-without-restart-tp4883378p4883378.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CAMEL-4528) XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded

Posted by "Rich Newcomb (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rich Newcomb reassigned CAMEL-4528:
-----------------------------------

    Assignee: Rich Newcomb
    
> XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4528
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4528
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Rich Newcomb
>            Priority: Minor
>             Fix For: 2.9.0
>
>
> This allows people to force a re-load of the resources using JMX, but still have cache by default.
> See nabble
> http://camel.465427.n5.nabble.com/Updating-cached-content-without-restart-tp4883378p4883378.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4528) XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded

Posted by "Rich Newcomb (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rich Newcomb updated CAMEL-4528:
--------------------------------

    Attachment:     (was: camel-4528.patch)
    
> XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4528
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4528
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>
> This allows people to force a re-load of the resources using JMX, but still have cache by default.
> See nabble
> http://camel.465427.n5.nabble.com/Updating-cached-content-without-restart-tp4883378p4883378.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4528) XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded

Posted by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148408#comment-13148408 ] 

Claus Ibsen commented on CAMEL-4528:
------------------------------------

Raul yeah the same problem can happen here, so the load method should be synchronized, or some other way of only loading it once for concurrent access.
                
> XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4528
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4528
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: camel-4528.patch
>
>
> This allows people to force a re-load of the resources using JMX, but still have cache by default.
> See nabble
> http://camel.465427.n5.nabble.com/Updating-cached-content-without-restart-tp4883378p4883378.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CAMEL-4528) XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded

Posted by "Rich Newcomb (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rich Newcomb reassigned CAMEL-4528:
-----------------------------------

    Assignee:     (was: Rich Newcomb)
    
> XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4528
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4528
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: camel-4528.patch
>
>
> This allows people to force a re-load of the resources using JMX, but still have cache by default.
> See nabble
> http://camel.465427.n5.nabble.com/Updating-cached-content-without-restart-tp4883378p4883378.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Work started] (CAMEL-4528) XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded

Posted by "Rich Newcomb (Work started) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on CAMEL-4528 started by Rich Newcomb.

> XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4528
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4528
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Rich Newcomb
>            Priority: Minor
>             Fix For: 2.9.0
>
>
> This allows people to force a re-load of the resources using JMX, but still have cache by default.
> See nabble
> http://camel.465427.n5.nabble.com/Updating-cached-content-without-restart-tp4883378p4883378.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-4528) XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded

Posted by "Claus Ibsen (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-4528.
--------------------------------

    Resolution: Fixed
      Assignee: Claus Ibsen

Rich, thanks for the patch.

I added volatile to the boolean, to ensure thread visibility for the state. Likewise the flag should be reset after loading, so you won't keep re-loading it :)
                
> XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4528
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4528
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: camel-4528.patch
>
>
> This allows people to force a re-load of the resources using JMX, but still have cache by default.
> See nabble
> http://camel.465427.n5.nabble.com/Updating-cached-content-without-restart-tp4883378p4883378.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4528) XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded

Posted by "Raul Kripalani (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148403#comment-13148403 ] 

Raul Kripalani commented on CAMEL-4528:
---------------------------------------

Hi - this is a great feature!

Some time ago I opened an issue because camel-validation was not showing a thread-safe behaviour when loading the XSD: CAMEL-1565. Not sure this could also apply here? If two requests come in at the same time just after the cache is cleared, will the code synchronise?

Thanks,
Raúl.
                
> XSLT component - Add JMX to the endpoint, and expose operations to clear the cache, so resources is forced to be reloaded
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4528
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4528
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.0
>
>         Attachments: camel-4528.patch
>
>
> This allows people to force a re-load of the resources using JMX, but still have cache by default.
> See nabble
> http://camel.465427.n5.nabble.com/Updating-cached-content-without-restart-tp4883378p4883378.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira