camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Bug?
Date Fri, 08 Feb 2008 13:54:16 GMT
On 08/02/2008, Magnus Heino <> wrote:
> >
> > If you don't mind helping debug it (which would be awesome BTW!), I
> > guess you could set a breakpoint in the
> > JmsConfiguration.createMessageListenerContainer() and see what
> > MessageListenerContainer is created by Camel and how its configured -
> > to see if there's any real difference at all in how Camel configures
> > it to how you've configured it explicitly? That must be the problem I
> > guess?
> Well, the container returned from
> JmsConfiguration.createMessageListenerContainer() seems to be the default
> one. That explains why it works in non-ax with jmstransactionmanager, since
> the default is autoack, right?

It should be using transacted mode which uses SessionTransacted rather
than AutoAck. DefaultMessageListenerContainer is usable with XA right?
You're using it directly with the sessionTransacted set to true? Camel
should be setting the same property too right?

i.e. I wonder if this bug is somehow related to Camel not setting all
the same properties (or setting more properties) than your pure Spring

e.g. Camel should by default be setting sessionTransacted to be true
and setting the sessionAcknowledgement mode to
Session.SESSION_TRANSACTED. I wonder if Spring gets confused if we set

Or maybe its an issue with caching? By default in 1.2.0 we use
CACHE_CONNECTION due to a Spring bug; in trunk of Camel with Spring
2.5.1 we now set CACHE_CONSUMER by default.

Maybe explicitly setting CACHE_NONE in the Camel example works for
TibCo EMS with XA?

> It seems as if I am missing something fundamental here? I feel the smell of
> a new user rtfm problem, but where is it? :)

:) No I think there maybe some MessageListenerContainer configuration
gremlin you're hitting (though its really bizarre that things work
fine for JMS transactions, but not when switching to XA!)

Camel tries its best to setup the various Spring objects right for you
without you having to set zillions of properties up; but maybe there's
some gremlin in there that needs fixing...

> How is my JmsComponent looked up by camel?

So the CamelContext looks up in the Spring AppContext to see if
there's an endpoint for the URI, if not it takes the URI scheme (e.g.
jms) and looks up if there's a Component registered for that name and
uses that component to create the endpoint.

> Right now it's just registered in
> the spring application context, I was assuming that you had some
> beanprocessor looking for components, and registering them with camel?

Its more a case of when a route is activated, the URIs used in the
route are resolved by the CamelContext which tends to delegate to the
Spring AppContext to try figure out what they are etc.

Did any of that help? :)


Open Source Integration

View raw message