You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Anand (JIRA)" <ji...@apache.org> on 2010/03/30 15:37:08 UTC

[jira] Created: (CAMEL-2603) support get operation for cache

support get operation for cache
-------------------------------

                 Key: CAMEL-2603
                 URL: https://issues.apache.org/activemq/browse/CAMEL-2603
             Project: Apache Camel
          Issue Type: Improvement
    Affects Versions: 2.2.0
            Reporter: Anand


Please support get operation on cache component.
here is the discussion.
http://old.nabble.com/read-from-cache-component-ts28071593.html


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


[jira] Resolved: (CAMEL-2603) support get operation for cache

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

Claus Ibsen resolved CAMEL-2603.
--------------------------------

         Assignee: Claus Ibsen
    Fix Version/s: 2.3.0
       Resolution: Fixed

Updated wiki a bit as well. Feel free to help with examples for GET and CHECK

> support get operation for cache
> -------------------------------
>
>                 Key: CAMEL-2603
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2603
>             Project: Apache Camel
>          Issue Type: Improvement
>    Affects Versions: 2.2.0
>            Reporter: Anand
>            Assignee: Claus Ibsen
>             Fix For: 2.3.0
>
>         Attachments: camel-cache_get_refactoring-vb.patch
>
>
> Please support get operation on cache component.
> here is the discussion.
> http://old.nabble.com/read-from-cache-component-ts28071593.html

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


[jira] Updated: (CAMEL-2603) support get operation for cache

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

Volodymyr Buell updated CAMEL-2603:
-----------------------------------

    Attachment: camel-cache_get_refactoring-vb.patch

+ GET operation added.
+ CHECK operation added.
+ Code refactored. Hardcored constants moved to CacheConstants interface.
* Fix for unit tests which were inefficient due to using unregistered endpoints ("direct:b", "direct:c") in their routes.

> support get operation for cache
> -------------------------------
>
>                 Key: CAMEL-2603
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2603
>             Project: Apache Camel
>          Issue Type: Improvement
>    Affects Versions: 2.2.0
>            Reporter: Anand
>         Attachments: camel-cache_get_refactoring-vb.patch
>
>
> Please support get operation on cache component.
> here is the discussion.
> http://old.nabble.com/read-from-cache-component-ts28071593.html

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


[jira] Commented: (CAMEL-2603) support get operation for cache

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

Claus Ibsen commented on CAMEL-2603:
------------------------------------

Thanks Volodymyr for the patch. I have applied it to trunk.
I also did a bit of refactor to better handle lifecycle of the shared CacheManager and have it shutdown when Camel is shutting down.

trunk: 938819.

> support get operation for cache
> -------------------------------
>
>                 Key: CAMEL-2603
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2603
>             Project: Apache Camel
>          Issue Type: Improvement
>    Affects Versions: 2.2.0
>            Reporter: Anand
>         Attachments: camel-cache_get_refactoring-vb.patch
>
>
> Please support get operation on cache component.
> here is the discussion.
> http://old.nabble.com/read-from-cache-component-ts28071593.html

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


[jira] Commented: (CAMEL-2603) support get operation for cache

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

Claus Ibsen commented on CAMEL-2603:
------------------------------------

Thanks for the examples I have added them to the wiki page

> support get operation for cache
> -------------------------------
>
>                 Key: CAMEL-2603
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2603
>             Project: Apache Camel
>          Issue Type: Improvement
>    Affects Versions: 2.2.0
>            Reporter: Anand
>            Assignee: Claus Ibsen
>             Fix For: 2.3.0
>
>         Attachments: camel-cache_get_refactoring-vb.patch
>
>
> Please support get operation on cache component.
> here is the discussion.
> http://old.nabble.com/read-from-cache-component-ts28071593.html

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


[jira] Commented: (CAMEL-2603) support get operation for cache

Posted by "Volodymyr Buell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59303#action_59303 ] 

Volodymyr Buell commented on CAMEL-2603:
----------------------------------------

Example of GET command usage:

                   from("direct:start")
                   // Prepare headers
                   .setHeader(CacheConstants.CACHE_OPERATION, constant(CacheConstants.CACHE_OPERATION_GET))
                   .setHeader(CacheConstants.CACHE_KEY, constant("Ralph_Waldo_Emerson")).
                   .to("cache://TestCache1").
                   // Check if entry was not found
                   .choice().when(header(CacheConstants.CACHE_ELEMENT_WAS_FOUND).isNull()).
                   // If not found, get the payload and put it to cache
                   .to("cxf:bean:someHeavyweightOperation").
                   .setHeader(CacheConstants.CACHE_OPERATION, constant(CacheConstants.CACHE_OPERATION_ADD))
                   .setHeader(CacheConstants.CACHE_KEY, constant("Ralph_Waldo_Emerson"))
                   .to("cache://TestCache1")
                   .end()
                   .to("direct:nextPhase");

Example of CHECK command usage:

                   from("direct:start")
                   // Prepare headers
                   .setHeader(CacheConstants.CACHE_OPERATION, constant(CacheConstants.CACHE_OPERATION_CHECK))
                   .setHeader(CacheConstants.CACHE_KEY, constant("Ralph_Waldo_Emerson")).
                   .to("cache://TestCache1").
                   // Check if entry was not found
                   .choice().when(header(CacheConstants.CACHE_ELEMENT_WAS_FOUND).isNull()).
                   // If not found, get the payload and put it to cache
                   .to("cxf:bean:someHeavyweightOperation").
                   .setHeader(CacheConstants.CACHE_OPERATION, constant(CacheConstants.CACHE_OPERATION_ADD))
                   .setHeader(CacheConstants.CACHE_KEY, constant("Ralph_Waldo_Emerson"))
                   .to("cache://TestCache1")
                   .end();


Note: CHECK command tests existence of the entry in the cache but doesn't place message to the body.

> support get operation for cache
> -------------------------------
>
>                 Key: CAMEL-2603
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2603
>             Project: Apache Camel
>          Issue Type: Improvement
>    Affects Versions: 2.2.0
>            Reporter: Anand
>            Assignee: Claus Ibsen
>             Fix For: 2.3.0
>
>         Attachments: camel-cache_get_refactoring-vb.patch
>
>
> Please support get operation on cache component.
> here is the discussion.
> http://old.nabble.com/read-from-cache-component-ts28071593.html

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