andre_fernando
Nov 29th, 2005, 02:23 PM
Hi,
I'm initiating into Spring and ActiveMQ.
I'm trying to persist messages but I've been getting this warning message in my Tomcat startup.
2005-11-29 18:02:31,124 WARN [org.activemq.broker.impl.DefaultBroker] - <Default message store (journal+derby) could not be found in the classpath or property 'activemq.persistenceAdapterFactory' not specified so defaulting to use RAM based message persistence>
I tried to configure my database in activemq.xml file, but I think there's something wrong with my bean in applicationContext.xml:
<bean id="jmsConnectionFactory" class="org.activemq.ActiveMQConnectionFactory">
<property name="brokerURL">
<value>vm://localhost</value>
</property>
<property name="useEmbeddedBroker">
<value>true</value>
</property>
<property name="brokerXmlConfig">
<value>com/salvati/teste/jms/activemq.xml</value>
</property>
</bean>
This is my activemq.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//ACTIVEMQ//DTD//EN" "http://activemq.org/dtd/activemq.dtd">
<beans>
<!-- ================================================== ================== -->
<!-- ActiveMQ Broker Configuration -->
<!-- ================================================== ================== -->
<broker>
<connector>
<tcpServerTransport uri="tcp://localhost:61616"
backlog="1000"
useAsyncSend="false"
maxOutstandingMessages="50"/>
</connector>
<persistence>
<!-- you can point this to a different datasource -->
<jdbcPersistence dataSourceRef="postgress-ds"/>
</persistence>
</broker>
<bean id="postgress-ds"
class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName">
<value>${jdbc.driverClassName}</value>
</property>
<property name="url">
<value>${jdbc.url}</value>
</property>
<property name="username">
<value>${jdbc.username}</value>
</property>
<property name="password">
<value>${jdbc.password}</value>
</property>
<property name="poolPreparedStatements">
<value>true</value>
</property>
</bean>
</beans>
I'm not sure about the places where I can put my activemq.xml file and about the use of file: and classpath: in brokerXmlConfig parameter. I'd like to put it on my WEB-INF/conf/ directory. Can I do this?
Thanks.
I'm initiating into Spring and ActiveMQ.
I'm trying to persist messages but I've been getting this warning message in my Tomcat startup.
2005-11-29 18:02:31,124 WARN [org.activemq.broker.impl.DefaultBroker] - <Default message store (journal+derby) could not be found in the classpath or property 'activemq.persistenceAdapterFactory' not specified so defaulting to use RAM based message persistence>
I tried to configure my database in activemq.xml file, but I think there's something wrong with my bean in applicationContext.xml:
<bean id="jmsConnectionFactory" class="org.activemq.ActiveMQConnectionFactory">
<property name="brokerURL">
<value>vm://localhost</value>
</property>
<property name="useEmbeddedBroker">
<value>true</value>
</property>
<property name="brokerXmlConfig">
<value>com/salvati/teste/jms/activemq.xml</value>
</property>
</bean>
This is my activemq.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//ACTIVEMQ//DTD//EN" "http://activemq.org/dtd/activemq.dtd">
<beans>
<!-- ================================================== ================== -->
<!-- ActiveMQ Broker Configuration -->
<!-- ================================================== ================== -->
<broker>
<connector>
<tcpServerTransport uri="tcp://localhost:61616"
backlog="1000"
useAsyncSend="false"
maxOutstandingMessages="50"/>
</connector>
<persistence>
<!-- you can point this to a different datasource -->
<jdbcPersistence dataSourceRef="postgress-ds"/>
</persistence>
</broker>
<bean id="postgress-ds"
class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName">
<value>${jdbc.driverClassName}</value>
</property>
<property name="url">
<value>${jdbc.url}</value>
</property>
<property name="username">
<value>${jdbc.username}</value>
</property>
<property name="password">
<value>${jdbc.password}</value>
</property>
<property name="poolPreparedStatements">
<value>true</value>
</property>
</bean>
</beans>
I'm not sure about the places where I can put my activemq.xml file and about the use of file: and classpath: in brokerXmlConfig parameter. I'd like to put it on my WEB-INF/conf/ directory. Can I do this?
Thanks.