Hi Guillaume,

Thanks for the response.

BTW In my previous post i've say something wrong.

If i configure the activemq persistence like:

<amq:persistenceAdapter>
    <amq:jdbcPersistenceAdapter dataSource="#derby-ds"/>
</amq:persistenceAdapter>


and then after running some processes, i stop smx and i look to
derby database i don't find any message in the queue.

I think this was enough, but it seems i was missing something.

The solution to register a custom listener enabling the persistence by setting the property
on the message seems to fit my need, so i think i'll adopt this solution.

Btw, if i really understand well, it seems that i can enable persistence of only * Lightweigth
Endpoint* is this right?

If i want to persist all messages, which is the right way to configure persistence on the
broker.

Andrea Zoppello

Guillaume Nodet ha scritto:
On Nov 22, 2007 4:41 PM, Andrea Zoppello <[EMAIL PROTECTED]> wrote:

Hi all,

I'm trying to configure servicemix to use the activemq persistence of
message so i add this:
configuration:

<amq:persistenceAdapter>
     <amq:jdbcPersistenceAdapter dataSource="#derby-ds"/>
</amq:persistenceAdapter>

This seems to work.

BTW I've two question:

1) In smx there's a queue for each jbi endpoint. The question is if i've
a sa composed of three
endpoint Ep1->Ep2->Ep3 it's possible to make persistent only the message
of the queue related to EP1 ?


Persistence is defined on a per message level, but it's kinda hard to
configure.
The NMR will check if persistence is enabled at three different levels: on
the message  by looking for a given property on the exchange (
org.apache.servicemix.persistent), on the endpoint by looking at the
corresponding activationSpec (so it does not really fit well with non
lightweight components) and on the broker.  I suppose the way you could
change that is by registering a listener on the container, filter the
exchanges you want and put the property on it.


2) I try the configuration with mysql database and smx 3.1.2 but this is
not working. I set the log level
to debug and it seems that smx is blocked trying to aquire a lock on the
database. This cause smx not to start.
Any suggestion about this.


You should try with the default ActiveMQ distribution and / or ask on the
activemq user list.


Andrea Zoppello









Reply via email to