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 (JIRA)" <ji...@apache.org> on 2011/04/11 10:23:05 UTC

[jira] [Created] (CAMEL-3852) camel-cache - Should use Camel style constant keys

camel-cache - Should use Camel style constant keys
--------------------------------------------------

                 Key: CAMEL-3852
                 URL: https://issues.apache.org/jira/browse/CAMEL-3852
             Project: Camel
          Issue Type: Improvement
          Components: camel-cache
    Affects Versions: 2.7.0
            Reporter: Claus Ibsen
            Priority: Minor


The CacheConstant use all upper cases and they are not using the Camel style which we should use.

It should be
"CamelCacheAdd" instead of "ADD"
and so forth.

This also ensures those headers is not propagated over remote transports as they should not.
In fact we should consider removing those headers in the camel-cache code as they are just input parameters to control the operation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (CAMEL-3852) camel-cache - Should use Camel style constant keys

Posted by "Ben O'Day (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-3852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ben O'Day reassigned CAMEL-3852:
--------------------------------

    Assignee: Ben O'Day

> camel-cache - Should use Camel style constant keys
> --------------------------------------------------
>
>                 Key: CAMEL-3852
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3852
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cache
>    Affects Versions: 2.7.0
>            Reporter: Claus Ibsen
>            Assignee: Ben O'Day
>            Priority: Minor
>
> The CacheConstant use all upper cases and they are not using the Camel style which we should use.
> It should be
> "CamelCacheAdd" instead of "ADD"
> and so forth.
> This also ensures those headers is not propagated over remote transports as they should not.
> In fact we should consider removing those headers in the camel-cache code as they are just input parameters to control the operation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-3852) camel-cache - Should use Camel style constant keys

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

Claus Ibsen commented on CAMEL-3852:
------------------------------------

We have done some improvements to came-cache in 2.8. So we might as well just do this as well.
I think since the commands is to instruct the cache what to do, we should remove them after use, eg so we dont propagate those commands any further.

> camel-cache - Should use Camel style constant keys
> --------------------------------------------------
>
>                 Key: CAMEL-3852
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3852
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cache
>    Affects Versions: 2.7.0
>            Reporter: Claus Ibsen
>            Assignee: Ben O'Day
>            Priority: Minor
>             Fix For: 2.8.0
>
>
> The CacheConstant use all upper cases and they are not using the Camel style which we should use.
> It should be
> "CamelCacheAdd" instead of "ADD"
> and so forth.
> This also ensures those headers is not propagated over remote transports as they should not.
> In fact we should consider removing those headers in the camel-cache code as they are just input parameters to control the operation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-3852) camel-cache - Should use Camel style constant keys

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

Claus Ibsen commented on CAMEL-3852:
------------------------------------

Thanks.

It would be good to specify what's the key name in the exception, eg in this
throw new CacheException("Cache Key is not specified in message header or endpoint URL.");

throw new CacheException("Cache key: " + CacheContestants.CACHE_KEY + " is not specified in message header or endpoint URL.");

I wonder if we should support the old keys for 1 or 2 Camel versions, but mark them as @deprecated on the wiki page. This gives people a chance to migrate?

> camel-cache - Should use Camel style constant keys
> --------------------------------------------------
>
>                 Key: CAMEL-3852
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3852
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cache
>    Affects Versions: 2.7.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3852.patch
>
>
> The CacheConstant use all upper cases and they are not using the Camel style which we should use.
> It should be
> "CamelCacheAdd" instead of "ADD"
> and so forth.
> This also ensures those headers is not propagated over remote transports as they should not.
> In fact we should consider removing those headers in the camel-cache code as they are just input parameters to control the operation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CAMEL-3852) camel-cache - Should use Camel style constant keys

Posted by "Ben O'Day (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-3852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ben O'Day updated CAMEL-3852:
-----------------------------

    Attachment: CAMEL-3852.patch

updated constants/references and removed key/operation headers after processing cache operations...

> camel-cache - Should use Camel style constant keys
> --------------------------------------------------
>
>                 Key: CAMEL-3852
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3852
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cache
>    Affects Versions: 2.7.0
>            Reporter: Claus Ibsen
>            Assignee: Ben O'Day
>            Priority: Minor
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3852.patch
>
>
> The CacheConstant use all upper cases and they are not using the Camel style which we should use.
> It should be
> "CamelCacheAdd" instead of "ADD"
> and so forth.
> This also ensures those headers is not propagated over remote transports as they should not.
> In fact we should consider removing those headers in the camel-cache code as they are just input parameters to control the operation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CAMEL-3852) camel-cache - Should use Camel style constant keys

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

Claus Ibsen resolved CAMEL-3852.
--------------------------------

    Resolution: Fixed

Thanks Ben for the docu update. I will mark this as resolved now.

> camel-cache - Should use Camel style constant keys
> --------------------------------------------------
>
>                 Key: CAMEL-3852
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3852
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cache
>    Affects Versions: 2.7.0
>            Reporter: Claus Ibsen
>            Assignee: Ben O'Day
>            Priority: Minor
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3852.patch, CAMEL-3852.patch
>
>
> The CacheConstant use all upper cases and they are not using the Camel style which we should use.
> It should be
> "CamelCacheAdd" instead of "ADD"
> and so forth.
> This also ensures those headers is not propagated over remote transports as they should not.
> In fact we should consider removing those headers in the camel-cache code as they are just input parameters to control the operation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (CAMEL-3852) camel-cache - Should use Camel style constant keys

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

Claus Ibsen reassigned CAMEL-3852:
----------------------------------

    Assignee: Ben O'Day  (was: Claus Ibsen)

Yeah lets do that Ben. I will apply the patch. Do you mind updating the wiki documentation about this change at the camel cache component page. And as well add notes to the 2.8 release notes?

> camel-cache - Should use Camel style constant keys
> --------------------------------------------------
>
>                 Key: CAMEL-3852
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3852
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cache
>    Affects Versions: 2.7.0
>            Reporter: Claus Ibsen
>            Assignee: Ben O'Day
>            Priority: Minor
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3852.patch, CAMEL-3852.patch
>
>
> The CacheConstant use all upper cases and they are not using the Camel style which we should use.
> It should be
> "CamelCacheAdd" instead of "ADD"
> and so forth.
> This also ensures those headers is not propagated over remote transports as they should not.
> In fact we should consider removing those headers in the camel-cache code as they are just input parameters to control the operation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (CAMEL-3852) camel-cache - Should use Camel style constant keys

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

Claus Ibsen reassigned CAMEL-3852:
----------------------------------

    Assignee: Ben O'Day  (was: Claus Ibsen)

Assigning back to Ben so its easier for us to spot his contribution.

> camel-cache - Should use Camel style constant keys
> --------------------------------------------------
>
>                 Key: CAMEL-3852
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3852
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cache
>    Affects Versions: 2.7.0
>            Reporter: Claus Ibsen
>            Assignee: Ben O'Day
>            Priority: Minor
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3852.patch, CAMEL-3852.patch
>
>
> The CacheConstant use all upper cases and they are not using the Camel style which we should use.
> It should be
> "CamelCacheAdd" instead of "ADD"
> and so forth.
> This also ensures those headers is not propagated over remote transports as they should not.
> In fact we should consider removing those headers in the camel-cache code as they are just input parameters to control the operation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CAMEL-3852) camel-cache - Should use Camel style constant keys

Posted by "Ben O'Day (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-3852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ben O'Day updated CAMEL-3852:
-----------------------------

    Attachment: CAMEL-3852.patch

this patch updates some exception messages to match the new constants.  

As for the deprecation approach, I think this might be overkill and a pain to add/test a ton of ORs in the code.  If they are using the CacheConstants already, then there won't be any change.  If not, they will get a clear error message and is a trivial fix.  We should just document this change well for 2.8+.

Either way, let me know...

> camel-cache - Should use Camel style constant keys
> --------------------------------------------------
>
>                 Key: CAMEL-3852
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3852
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cache
>    Affects Versions: 2.7.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3852.patch, CAMEL-3852.patch
>
>
> The CacheConstant use all upper cases and they are not using the Camel style which we should use.
> It should be
> "CamelCacheAdd" instead of "ADD"
> and so forth.
> This also ensures those headers is not propagated over remote transports as they should not.
> In fact we should consider removing those headers in the camel-cache code as they are just input parameters to control the operation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Issue Comment Edited] (CAMEL-3852) camel-cache - Should use Camel style constant keys

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

Claus Ibsen edited comment on CAMEL-3852 at 4/20/11 10:24 AM:
--------------------------------------------------------------

Thanks.

It would be good to specify what's the key name in the exception, eg in this
throw new CacheException("Cache Key is not specified in message header or endpoint URL.");

throw new CacheException("Cache key: " + CacheContestants.CACHE_KEY + " is not specified in message header or endpoint URL.");

I wonder if we should support the old keys for 1 or 2 Camel versions, but mark them as @deprecated on the wiki page. This gives people a chance to migrate? Then you can support by checking for both the new and old keys. Then we can remove the old keys in a couple of releases or maybe in Camel 3

      was (Author: davsclaus):
    Thanks.

It would be good to specify what's the key name in the exception, eg in this
throw new CacheException("Cache Key is not specified in message header or endpoint URL.");

throw new CacheException("Cache key: " + CacheContestants.CACHE_KEY + " is not specified in message header or endpoint URL.");

I wonder if we should support the old keys for 1 or 2 Camel versions, but mark them as @deprecated on the wiki page. This gives people a chance to migrate?
  
> camel-cache - Should use Camel style constant keys
> --------------------------------------------------
>
>                 Key: CAMEL-3852
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3852
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cache
>    Affects Versions: 2.7.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3852.patch
>
>
> The CacheConstant use all upper cases and they are not using the Camel style which we should use.
> It should be
> "CamelCacheAdd" instead of "ADD"
> and so forth.
> This also ensures those headers is not propagated over remote transports as they should not.
> In fact we should consider removing those headers in the camel-cache code as they are just input parameters to control the operation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-3852) camel-cache - Should use Camel style constant keys

Posted by "Ben O'Day (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022811#comment-13022811 ] 

Ben O'Day commented on CAMEL-3852:
----------------------------------

the documentation has been updated...thanks Claus

> camel-cache - Should use Camel style constant keys
> --------------------------------------------------
>
>                 Key: CAMEL-3852
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3852
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cache
>    Affects Versions: 2.7.0
>            Reporter: Claus Ibsen
>            Assignee: Ben O'Day
>            Priority: Minor
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3852.patch, CAMEL-3852.patch
>
>
> The CacheConstant use all upper cases and they are not using the Camel style which we should use.
> It should be
> "CamelCacheAdd" instead of "ADD"
> and so forth.
> This also ensures those headers is not propagated over remote transports as they should not.
> In fact we should consider removing those headers in the camel-cache code as they are just input parameters to control the operation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CAMEL-3852) camel-cache - Should use Camel style constant keys

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

Claus Ibsen updated CAMEL-3852:
-------------------------------

    Fix Version/s: 2.8.0

> camel-cache - Should use Camel style constant keys
> --------------------------------------------------
>
>                 Key: CAMEL-3852
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3852
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cache
>    Affects Versions: 2.7.0
>            Reporter: Claus Ibsen
>            Assignee: Ben O'Day
>            Priority: Minor
>             Fix For: 2.8.0
>
>
> The CacheConstant use all upper cases and they are not using the Camel style which we should use.
> It should be
> "CamelCacheAdd" instead of "ADD"
> and so forth.
> This also ensures those headers is not propagated over remote transports as they should not.
> In fact we should consider removing those headers in the camel-cache code as they are just input parameters to control the operation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (CAMEL-3852) camel-cache - Should use Camel style constant keys

Posted by "Ben O'Day (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-3852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ben O'Day reassigned CAMEL-3852:
--------------------------------

    Assignee: Claus Ibsen  (was: Ben O'Day)

> camel-cache - Should use Camel style constant keys
> --------------------------------------------------
>
>                 Key: CAMEL-3852
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3852
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cache
>    Affects Versions: 2.7.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3852.patch, CAMEL-3852.patch
>
>
> The CacheConstant use all upper cases and they are not using the Camel style which we should use.
> It should be
> "CamelCacheAdd" instead of "ADD"
> and so forth.
> This also ensures those headers is not propagated over remote transports as they should not.
> In fact we should consider removing those headers in the camel-cache code as they are just input parameters to control the operation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (CAMEL-3852) camel-cache - Should use Camel style constant keys

Posted by "Ben O'Day (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-3852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ben O'Day reassigned CAMEL-3852:
--------------------------------

    Assignee: Claus Ibsen  (was: Ben O'Day)

please review

> camel-cache - Should use Camel style constant keys
> --------------------------------------------------
>
>                 Key: CAMEL-3852
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3852
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cache
>    Affects Versions: 2.7.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.8.0
>
>         Attachments: CAMEL-3852.patch
>
>
> The CacheConstant use all upper cases and they are not using the Camel style which we should use.
> It should be
> "CamelCacheAdd" instead of "ADD"
> and so forth.
> This also ensures those headers is not propagated over remote transports as they should not.
> In fact we should consider removing those headers in the camel-cache code as they are just input parameters to control the operation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira