You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by davsclaus <ci...@yahoo.dk> on 2011/04/29 10:06:14 UTC

Re: error handling on Http POST from ActiveMQ to PHP application

Welcome to the Camel community.

The WARN message
 WARN | Execution of JMS message listener failed, and no ErrorHandler has
been set. 

Is in fact not about the Camel error handler. Its about JMS exception
listener you can set on the Activemq/JMS component
http://camel.apache.org/jms

Yes I think the WARN message could be refined to better reflect this. Its
this interface from the JMS spec
http://download.oracle.com/javaee/5/api/javax/jms/ExceptionListener.html
-----Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/--
View this message in context: http://camel.465427.n5.nabble.com/error-handling-on-Http-POST-from-ActiveMQ-to-PHP-application-tp4347185p4358125.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: error handling on Http POST from ActiveMQ to PHP application

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, May 4, 2011 at 3:54 PM, bvahdat <ba...@swissonline.ch> wrote:
> Hi Claus,
>
> Thanks for your reply!
>
> So my same question again: for the sake of avoiding the spring's warning
> mentioned already, would the following change on
> 'org.apache.camel.component.jms.JmsMessageListenerContainer' constructor
> make sense to you:
>
>    public JmsMessageListenerContainer(JmsEndpoint endpoint, ErrorHandler
> errorHandler) {
>        this.endpoint = endpoint;
>        this.setErrorHandler(errorHandler); // set the spring's proprietary
> error handler
>    }
>

> Or that you would provide a setter/getter API for ErrorHandler on
> 'org.apache.camel.component.jms.JmsConfiguration' so that we (the camel
> users) could inject an appropriate ErrorHandler implementation from outside.
>

Yeah that would be nice so people can plugin their custom spring error
handler of choice.

Patches is welcome. And having an unit test as well is much better.
Then we love those patches even more :)



> Regards, Babak
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/error-handling-on-Http-POST-from-ActiveMQ-to-PHP-application-tp4347185p4369891.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



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

Re: error handling on Http POST from ActiveMQ to PHP application

Posted by bvahdat <ba...@swissonline.ch>.
Hi Claus,

Thanks for your reply!

So my same question again: for the sake of avoiding the spring's warning
mentioned already, would the following change on
'org.apache.camel.component.jms.JmsMessageListenerContainer' constructor
make sense to you:

    public JmsMessageListenerContainer(JmsEndpoint endpoint, ErrorHandler
errorHandler) {
        this.endpoint = endpoint;
        this.setErrorHandler(errorHandler); // set the spring's proprietary
error handler
    }

Or that you would provide a setter/getter API for ErrorHandler on
'org.apache.camel.component.jms.JmsConfiguration' so that we (the camel
users) could inject an appropriate ErrorHandler implementation from outside.

Regards, Babak


--
View this message in context: http://camel.465427.n5.nabble.com/error-handling-on-Http-POST-from-ActiveMQ-to-PHP-application-tp4347185p4369891.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: error handling on Http POST from ActiveMQ to PHP application

Posted by Claus Ibsen <cl...@gmail.com>.
Yeah there may be a spring specific error handler listener as well.

So you may have
- camel error handler (in the routes)
- jms exception listener
- spring error listener



On Tue, May 3, 2011 at 2:55 PM, bvahdat <ba...@swissonline.ch> wrote:
> Hi all,
>
> I would really appreciate it if someone from the camel team could provide a
> feedback if I'm wrong or not (see my previous post for details).
>
> The only reason why I commented on this topic (although I was not the
> original creater of it) was that I've got the same issue on my project, and
> just wonder if there's anything can be done for it through the camel-jms
> component.
>
> Thanks in advance
> Babak
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/error-handling-on-Http-POST-from-ActiveMQ-to-PHP-application-tp4347185p4367171.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



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

Re: error handling on Http POST from ActiveMQ to PHP application

Posted by bvahdat <ba...@swissonline.ch>.
Hi all,

I would really appreciate it if someone from the camel team could provide a
feedback if I'm wrong or not (see my previous post for details).

The only reason why I commented on this topic (although I was not the
original creater of it) was that I've got the same issue on my project, and
just wonder if there's anything can be done for it through the camel-jms
component.

Thanks in advance
Babak

--
View this message in context: http://camel.465427.n5.nabble.com/error-handling-on-Http-POST-from-ActiveMQ-to-PHP-application-tp4347185p4367171.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: error handling on Http POST from ActiveMQ to PHP application

Posted by bvahdat <ba...@swissonline.ch>.
davsclaus wrote:
> 
> Welcome to the Camel community.
> 
> The WARN message
>  WARN | Execution of JMS message listener failed, and no ErrorHandler has
> been set. 
> 
> Is in fact not about the Camel error handler. Its about JMS exception
> listener you can set on the Activemq/JMS component
> http://camel.apache.org/jms
> 
> Yes I think the WARN message could be refined to better reflect this. Its
> this interface from the JMS spec
> http://download.oracle.com/javaee/5/api/javax/jms/ExceptionListener.html
> 

I'm a bit confused through your response... I think the warning:

Execution of JMS message listener failed, and no ErrorHandler has been set.

has nothing to do with the ExceptionListener of the standard JMS-API but
with the spring's own proprietary abstraction
org.springframework.util.Errorhandler. This warning comes through
AbstractMessageListenerContainer.invokeErrorHandler() method invocation
while consuming the jms messages.

Question: what about
org.apache.camel.component.jms.JmsMessageListenerContainer setting such a
Errorhandler on it's own (a default one), or that
org.apache.camel.component.jms.JmsConfiguration would expose a setter/getter
API, so that we (camel-users) can inject a Errorhandler from outside while
working with the jms endpoints.

Note: Spring provides already 3 implementations of the Errorhandler
interface (LoggingErrorHandler, PropagatingErrorHandler and
MessagePublishingErrorHandler)--
View this message in context: http://camel.465427.n5.nabble.com/error-handling-on-Http-POST-from-ActiveMQ-to-PHP-application-tp4347185p4358624.html
Sent from the Camel - Users mailing list archive at Nabble.com.