activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dejan Bosanac <dejan.bosa...@ttmsolutions.com>
Subject Re: Problem when using brokerName attribute
Date Wed, 12 Nov 2008 08:31:55 GMT
Hi,

try controlling your data directory explicitly with the dataDirectory
parameter. For example:

 <journaledJDBC dataDirectory="../activemq-data" dataSource="#activemq-ds"/>

Cheers

-- 
Dejan Bosanac


http://www.ttmsolutions.com - get a free ActiveMQ user guide

ActiveMQ in Action - http://www.manning.com/snyder/
Scripting in Java - http://www.scriptinginjava.net



pratibhaG wrote:
> Hi,
> I am using activemq inside servicemix.
>
> In my activemq.xml I have following configuration.
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans xmlns:amq="http://activemq.org/config/1.0">
>   
>   
>   <amq:broker id="broker" depends-on="jmxServer" useShutdownHook="false">
>
>     
>     <amq:managementContext>
>       <bean class="org.apache.activemq.broker.jmx.ManagementContext">
>         <property name="createConnector" value="false" />
>       </bean>
>     </amq:managementContext>
>
>    
>     <amq:persistenceAdapter>
>       
>       <amq:jdbcPersistenceAdapter dataSource="#activemq-ds"/>	
> 	
>     </amq:persistenceAdapter>
>   
>     <amq:transportConnectors>
>        
>        <amq:transportConnector uri="tcp://localhost:61616"
> discoveryUri="multicast://default"/>
>     </amq:transportConnectors>
>     
>     <amq:networkConnectors>
>       
>     </amq:networkConnectors>
>     
> 	<amq:destinations>
>       <amq:queue physicalName="resolved.error.queue" />
>     </amq:destinations> 
>   </amq:broker>
>   
>    <bean id="activemq-ds" class="org.apache.commons.dbcp.BasicDataSource"
> destroy-method="close">
>     <property name="driverClassName" value="${driverClassName}"/>
>     <property name="url" value="${jdbcURL}"/>
>     <property name="username" value="${username}"/>
>     <property name="password" value="${password}"/>
>     <property name="poolPreparedStatements"
> value="${poolPreparedStatements}"/>
>   </bean>	 
>
> </beans>
>
>
> when I changed the line
>  <amq:broker id="broker" depends-on="jmxServer" useShutdownHook="false">
>  to 
>  <amq:broker id="broker" brokerName= "myBroker" depends-on="jmxServer"
> useShutdownHook="false">
>
> I have just added a new attribute brokerName
>
> I see the strange behavior:
>
> This is what happens when I don't use the brokerName= "myBroker" attribute.:
>  Servicemix keeps all the data in its data directory. When I delete data
> directory I lose every data that I had. So after deleting data directory my
> servicemix would be fresh to create new data on startup.
>
> This is what happens when I use the brokerName= "myBroker" attribute.:
> Servicemix keeps all the data in its data directory. When I delete data
> directory some data is persisting. So after deleting data directory my
> servicemix would not be fresh it still gets some of the data that I had
> earlier.
>
> Why is it so?
> What the attribute brokerName do? When to use it and when not? Is it
> responsible for data persistent?
>
> -----Pratibha
>
>
>   


Mime
View raw message