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

[jira] [Created] (CAMEL-4503) Recipient List cannot vary destination by changing property in an expression

Recipient List cannot vary destination by changing property in an expression
----------------------------------------------------------------------------

                 Key: CAMEL-4503
                 URL: https://issues.apache.org/jira/browse/CAMEL-4503
             Project: Camel
          Issue Type: Bug
            Reporter: Jonathan Anstey


This is probably due to producers being cached based on unresolved endpoint URI, rather than the resolved endpoint URI. Haven't tested this theory out though.

See message on user list http://markmail.org/message/sdysp6sspq5lomf4

--
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] [Issue Comment Edited] (CAMEL-4503) Recipient List cannot vary destination by changing property in an expression

Posted by "Achim Nierbeck (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13120732#comment-13120732 ] 

Achim Nierbeck edited comment on CAMEL-4503 at 10/7/11 11:05 AM:
-----------------------------------------------------------------

Unfortunately I just realized that the mentioned workaround doesn't work :(

I'm investigating why it isn't I'm down to the following right now: 

answer = endpoints.get(getEndpointKey(uri));

in DefaultCamelContext does give me the wrong Endpoint, at least it's bound to the wrong URI. 
but maybe this is also because it seems to be a singleton, maybe setting it to non-singleton 
does work :)
                
      was (Author: achim_nierbeck):
    The workaround mentioned in irc did help. 
                  
> Recipient List cannot vary destination by changing property in an expression
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-4503
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4503
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.8.1
>            Reporter: Jonathan Anstey
>
> This is probably due to producers being cached based on unresolved endpoint URI, rather than the resolved endpoint URI. Haven't tested this theory out though.
> See message on user list http://markmail.org/message/sdysp6sspq5lomf4

--
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] [Issue Comment Edited] (CAMEL-4503) Recipient List cannot vary destination by changing property in an expression

Posted by "Achim Nierbeck (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13120732#comment-13120732 ] 

Achim Nierbeck edited comment on CAMEL-4503 at 10/7/11 11:17 AM:
-----------------------------------------------------------------

Unfortunately I just realized that the mentioned workaround doesn't work :(

I'm investigating why it isn't I'm down to the following right now: 

answer = endpoints.get(getEndpointKey(uri));

in DefaultCamelContext does give me the wrong Endpoint, at least it's bound to the wrong URI. 

it's called from 

endpoint = resolveEndpoint(exchange, recipient);

in RecipientListProcessor.createProcessorExchangePairs(...)

but maybe this is also because it seems to be a singleton, maybe setting it to non-singleton 
does work :)
                
      was (Author: achim_nierbeck):
    Unfortunately I just realized that the mentioned workaround doesn't work :(

I'm investigating why it isn't I'm down to the following right now: 

answer = endpoints.get(getEndpointKey(uri));

in DefaultCamelContext does give me the wrong Endpoint, at least it's bound to the wrong URI. 
but maybe this is also because it seems to be a singleton, maybe setting it to non-singleton 
does work :)
                  
> Recipient List cannot vary destination by changing property in an expression
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-4503
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4503
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.8.1
>            Reporter: Jonathan Anstey
>
> This is probably due to producers being cached based on unresolved endpoint URI, rather than the resolved endpoint URI. Haven't tested this theory out though.
> See message on user list http://markmail.org/message/sdysp6sspq5lomf4

--
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] [Issue Comment Edited] (CAMEL-4503) Recipient List cannot vary destination by changing property in an expression

Posted by "Achim Nierbeck (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13120732#comment-13120732 ] 

Achim Nierbeck edited comment on CAMEL-4503 at 10/10/11 7:58 AM:
-----------------------------------------------------------------

Unfortunately I just realized that the mentioned workaround doesn't work :(

I'm investigating why it isn't I'm down to the following right now: 

answer = endpoints.get(getEndpointKey(uri));

in DefaultCamelContext does give me the wrong Endpoint, at least it's bound to the wrong URI. 

it's called from 

endpoint = resolveEndpoint(exchange, recipient);

in RecipientListProcessor.createProcessorExchangePairs(...)

The following scenario doesn't work right now for the workaround, this might be a different bug though: 
- Recipient A is resolved the way it should work and can be called
- if Recipient B is questioned it also works and can be used. 
- if Recipient A is questioned from the cache again, Recipient B is provided and therefore the requests end up 
  on the wrong host. 

I also added a comment to the mailing-list about this. 
                
      was (Author: achim_nierbeck):
    Unfortunately I just realized that the mentioned workaround doesn't work :(

I'm investigating why it isn't I'm down to the following right now: 

answer = endpoints.get(getEndpointKey(uri));

in DefaultCamelContext does give me the wrong Endpoint, at least it's bound to the wrong URI. 

it's called from 

endpoint = resolveEndpoint(exchange, recipient);

in RecipientListProcessor.createProcessorExchangePairs(...)

but maybe this is also because it seems to be a singleton, maybe setting it to non-singleton 
does work :)
                  
> Recipient List cannot vary destination by changing property in an expression
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-4503
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4503
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.8.1
>            Reporter: Jonathan Anstey
>
> This is probably due to producers being cached based on unresolved endpoint URI, rather than the resolved endpoint URI. Haven't tested this theory out though.
> See message on user list http://markmail.org/message/sdysp6sspq5lomf4

--
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-4503) Recipient List cannot vary destination by changing property in an expression

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

Willem Jiang commented on CAMEL-4503:
-------------------------------------

The NPE is caused by the clone method of CxfEndpoint, as you know CxfEndpoint extends the ServiceSupport object which has lots of AutomBoolean objects.
If the CxfEndpoint instance is started, the cloned CxfEndpoint will not start again.
It looks like calling the clone method is not a idea way to resolve such issue. I'm still looking for a good solution. 
                
> Recipient List cannot vary destination by changing property in an expression
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-4503
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4503
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.8.1
>            Reporter: Jonathan Anstey
>            Assignee: Willem Jiang
>
> This is probably due to producers being cached based on unresolved endpoint URI, rather than the resolved endpoint URI. Haven't tested this theory out though.
> See message on user list http://markmail.org/message/sdysp6sspq5lomf4

--
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-4503) Recipient List cannot vary destination by changing property in an expression

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

Achim Nierbeck commented on CAMEL-4503:
---------------------------------------

The workaround mentioned in irc did help. 
                
> Recipient List cannot vary destination by changing property in an expression
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-4503
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4503
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.8.1
>            Reporter: Jonathan Anstey
>
> This is probably due to producers being cached based on unresolved endpoint URI, rather than the resolved endpoint URI. Haven't tested this theory out though.
> See message on user list http://markmail.org/message/sdysp6sspq5lomf4

--
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-4503) Recipient List cannot vary destination by changing property in an expression

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

Claus Ibsen commented on CAMEL-4503:
------------------------------------

CAMEL-4139 causes this problem, it will lookup existing bean by its id, and reuse that as CxfEndpoint.
Even if CxfComponent is creating a new CxfEndpoint.

It seems the problem is that if you omit the address in the <cxf:cxfEndpoint> in the XML file.
And then you want to use that <cxf:cxfEndpoint> bean but specific the address at runtime. Then CxfComponent
will still hand out a shared CxfEndpoint. 

It guess the tricky part is that with cxf:bean:xxx you refer to a bean, and then you *also* provide additional configurations which should override.
This seems a hard path to support. Maybe cxf:bean:xxx should be made to not accept any parameters at all, if that makes sense.

Alternative the cxf:bean:xxx should be sort of a template, and then being able to create "clones" of itself.
                
> Recipient List cannot vary destination by changing property in an expression
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-4503
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4503
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.8.1
>            Reporter: Jonathan Anstey
>
> This is probably due to producers being cached based on unresolved endpoint URI, rather than the resolved endpoint URI. Haven't tested this theory out though.
> See message on user list http://markmail.org/message/sdysp6sspq5lomf4

--
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-4503) Recipient List cannot vary destination by changing property in an expression

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

Willem Jiang commented on CAMEL-4503:
-------------------------------------

@Claus
That's my bad, I will update the copy method of CxfEndpoint by setting the list reference with a deep copy one.
                
> Recipient List cannot vary destination by changing property in an expression
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-4503
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4503
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.8.1
>            Reporter: Jonathan Anstey
>            Assignee: Willem Jiang
>
> This is probably due to producers being cached based on unresolved endpoint URI, rather than the resolved endpoint URI. Haven't tested this theory out though.
> See message on user list http://markmail.org/message/sdysp6sspq5lomf4

--
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-4503) Recipient List cannot vary destination by changing property in an expression

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

Willem Jiang reassigned CAMEL-4503:
-----------------------------------

    Assignee: Willem Jiang
    
> Recipient List cannot vary destination by changing property in an expression
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-4503
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4503
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.8.1
>            Reporter: Jonathan Anstey
>            Assignee: Willem Jiang
>
> This is probably due to producers being cached based on unresolved endpoint URI, rather than the resolved endpoint URI. Haven't tested this theory out though.
> See message on user list http://markmail.org/message/sdysp6sspq5lomf4

--
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-4503) Recipient List cannot vary destination by changing property in an expression

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

Claus Ibsen commented on CAMEL-4503:
------------------------------------

Willem I have committed an unit tests that reproduces the issue
tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/RecipientListCxf2Test.java

With your recent fix on trunk (eg the clone) the problem with picking up the wrong bean is resolved as far.
But we get a NPE exception later.

{code}
Caused by: java.lang.NullPointerException
	at org.apache.camel.component.cxf.CxfProducer.prepareRequest(CxfProducer.java:168)
	at org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:89)
	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:321)
	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:212)
	at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)
	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:575)
{code}

The CxfBinding is null on the endpoint. So I guess a little more fix is needed. Do you mind digging into this?
                
> Recipient List cannot vary destination by changing property in an expression
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-4503
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4503
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.8.1
>            Reporter: Jonathan Anstey
>            Assignee: Willem Jiang
>
> This is probably due to producers being cached based on unresolved endpoint URI, rather than the resolved endpoint URI. Haven't tested this theory out though.
> See message on user list http://markmail.org/message/sdysp6sspq5lomf4

--
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-4503) Recipient List cannot vary destination by changing property in an expression

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

Willem Jiang resolved CAMEL-4503.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 2.9.0
                   2.8.3

This is fixed by CAMEL-4561
                
> Recipient List cannot vary destination by changing property in an expression
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-4503
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4503
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.8.1
>            Reporter: Jonathan Anstey
>            Assignee: Willem Jiang
>             Fix For: 2.8.3, 2.9.0
>
>
> This is probably due to producers being cached based on unresolved endpoint URI, rather than the resolved endpoint URI. Haven't tested this theory out though.
> See message on user list http://markmail.org/message/sdysp6sspq5lomf4

--
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-4503) Recipient List cannot vary destination by changing property in an expression

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

Jonathan Anstey commented on CAMEL-4503:
----------------------------------------

IRC chat on this here http://irclogs.dankulp.com/logs/irclogger_log/karaf?date=2011-09-29,Thu&sel=335#l331
                
> Recipient List cannot vary destination by changing property in an expression
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-4503
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4503
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.8.1
>            Reporter: Jonathan Anstey
>
> This is probably due to producers being cached based on unresolved endpoint URI, rather than the resolved endpoint URI. Haven't tested this theory out though.
> See message on user list http://markmail.org/message/sdysp6sspq5lomf4

--
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-4503) Recipient List cannot vary destination by changing property in an expression

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

Willem Jiang commented on CAMEL-4503:
-------------------------------------

In most case the configure of cxfEndpoint bean will not be changed, it should be OK if you just reuse the bean endpoint.
If there are some parameter which can be used to override the configuration in the endpoint uri, we could clone a new endpoint to use.
                
> Recipient List cannot vary destination by changing property in an expression
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-4503
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4503
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.8.1
>            Reporter: Jonathan Anstey
>
> This is probably due to producers being cached based on unresolved endpoint URI, rather than the resolved endpoint URI. Haven't tested this theory out though.
> See message on user list http://markmail.org/message/sdysp6sspq5lomf4

--
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-4503) Recipient List cannot vary destination by changing property in an expression

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

Jonathan Anstey updated CAMEL-4503:
-----------------------------------

    Affects Version/s: 2.8.1
    
> Recipient List cannot vary destination by changing property in an expression
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-4503
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4503
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.8.1
>            Reporter: Jonathan Anstey
>
> This is probably due to producers being cached based on unresolved endpoint URI, rather than the resolved endpoint URI. Haven't tested this theory out though.
> See message on user list http://markmail.org/message/sdysp6sspq5lomf4

--
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-4503) Recipient List cannot vary destination by changing property in an expression

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

Claus Ibsen commented on CAMEL-4503:
------------------------------------

Okay the bug seems to be in camel-cxf, in CxfComponent.createEndpoint. As it return the same endpoint instance even though the ?address is different.
                
> Recipient List cannot vary destination by changing property in an expression
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-4503
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4503
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.8.1
>            Reporter: Jonathan Anstey
>
> This is probably due to producers being cached based on unresolved endpoint URI, rather than the resolved endpoint URI. Haven't tested this theory out though.
> See message on user list http://markmail.org/message/sdysp6sspq5lomf4

--
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