servicemix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Massimiliano Guillaro <>
Subject Message persistence with wsn2005 and activemq
Date Wed, 02 Feb 2011 15:42:16 GMT

Hi to all,
i have a little (or big) problem. I have created the following architecture:

producer -> broker (servicemix WSN2005) -> consumer (web service)

i'm able to send and receive a notification from producer to receiver.
Now i should configure activemq to implement the persistence of message.
This is my activemq.xml:

<!-- ActiveMQ JMS Broker configuration -->
<amq:broker id="broker" depends-on="jmxServer" persistent="true"
 Disable creation of the jmx connector
         which is created in the jmx.xml configuration file
<bean class="">
<property name="createConnector" value="false"/>
 Use AMQ Message Store as default broker persistence adapter
<amq:journaledJDBC journalLogFiles="5" dataDirectory="../data"
<!-- Examples for journaledJDBC if JDBC is required -->

      <amq:journaledJDBC journalLogFiles="5" dataDirectory="./data/amq"/>
 Activate a TCP connector with multicast discovery.
            Note that multicast may be disabled if your computer
            is not on a network, which may prevent the broker to start.
            In such a case, just remove the discoveryUri attribute.  
<amq:transportConnector uri="tcp://localhost:61616"
<!-- by default just auto discover the other brokers -->
<amq:networkConnector uri="multicast://default"/>

 MySql DataSource  Setup using the Commons DBCP pooler

<bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource"
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://"/>
<property name="username" value="activemqUser"/>
<property name="password" value="Password123"/>
<property name="poolPreparedStatements" value="true"/>


and this is my servicemix.xml

<beans xsi:schemaLocation="">
<!-- System properties -->
<property name="properties">
<entry key="">
<bean class="org.springframework.util.ResourceUtils"
<constructor-arg value=""/>
<bean id="propertyConfigurer"
<property name="location" value=""/>
<!-- Include other resources -->
<import resource="classpath:security.xml"/>
<import resource="classpath:jmx.xml"/>
<import resource="classpath:activemq.xml"/>
<import resource="classpath:tx.xml"/>
<import resource="classpath:jndi.xml"/>
<!-- the JBI container -->
<sm:container id="jbi" rootDir="./data/smx" persistent="true"
MBeanServer="#jmxServer" installationDirPath="./hotdeploy"
monitorDeploymentDirectory="false" monitorInterval="1"
transactionManager="#transactionManager" createJmxConnector="false">
 Use a secured broker (see security.xml)
         and define the 3 standard flows
<sm:securedBroker authorizationMap="#authorizationMap">
<sm:jmsFlow jmsURL="${activemq.url}"/>
<sm:jcaFlow connectionManager="#connectionManager"
<bean class="org.apache.servicemix.executors.impl.ExecutorFactoryImpl">
<property name="defaultConfig">
<bean class="org.apache.servicemix.executors.impl.ExecutorConfig">
<property name="corePoolSize" value="${servicemix.corePoolSize}"/>
<property name="maximumPoolSize" value="${servicemix.maximumPoolSize}"/>
<property name="queueSize" value="${servicemix.queueSize}"/>
<sm:statistics statsInterval="10" dumpStats="true"/>
<audit:jdbcAuditor container="#jbi" autoStart="false">
<bean class="org.apache.derby.jdbc.EmbeddedDataSource">
<property name="databaseName" value="servicemixDB"/>
<property name="createDatabase" value="create"/>
<sm:dotViewService container="#jbi" autoStart="true"/>
<sm:logService container="#jbi" autoStart="true" refreshPeriod="60"/>

I've introduced persistent="true" in either to obtain the persistence of
message in the database.
My problem is that i don't receive messages in the consumer but they are
only saved in the db.

Where i wrong?

If i set persistence=true in the the jbi part in the servicemix.xml, in my
db i can see all message delivered by JBI WSN2005: notification and
subscription (i suppose). What is the way to change wsn2005 component to set
persistence=true in the notification message?

View this message in context:
Sent from the ServiceMix - Dev mailing list archive at

View raw message