You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by amq-newbie <pe...@hotmail.com> on 2008/02/12 06:40:06 UTC

vm and activemq-data location

I'm completely new to the activemq, so I guess my question is basic. 
I am using activemq for JUnit testing. Therefore, I set to run it in vm mode
since JUnit is ran by third party product that executes unit tests for
entire application on separate machine regulary. So, there is no need to
keep queue for any longer then for the duration of the unit test. VM mode is
very handy for that, my only problem is that when the test completes there
is a directory called activemq-data. This directory is created somewhere at
the code  level directories which is a problem. Is there any way that I can
disabled it? Or, that I can at least specify different directory so the code
level directories won't get mixed with activemq?  I've tried set the
persistent to false but then I am not able to retrieve message.

Thanks for any suggestions,

-- 
View this message in context: http://www.nabble.com/vm-and-activemq-data-location-tp15426671s2354p15426671.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: vm and activemq-data location

Posted by amq-newbie <pe...@hotmail.com>.
That's exactly what I've tried but I cannot get message from queue. I can
only send it. For my unit test I need to send message to custom object that
generates specific format and then sends it to the queue. Once done I need
unit test to go and get the message from queue and compare the format of the
message against expected format. When I ran test with persistent set to true
I can get message from queue without a problem, but then again I am stuck
with extra directory.
 

rajdavies wrote:
> 
> 
> On Feb 12, 2008, at 5:40 AM, amq-newbie wrote:
> 
>>
>> I'm completely new to the activemq, so I guess my question is basic.
>> I am using activemq for JUnit testing. Therefore, I set to run it in  
>> vm mode
>> since JUnit is ran by third party product that executes unit tests for
>> entire application on separate machine regulary. So, there is no  
>> need to
>> keep queue for any longer then for the duration of the unit test. VM  
>> mode is
>> very handy for that, my only problem is that when the test completes  
>> there
>> is a directory called activemq-data. This directory is created  
>> somewhere at
>> the code  level directories which is a problem. Is there any way  
>> that I can
>> disabled it? Or, that I can at least specify different directory so  
>> the code
>> level directories won't get mixed with activemq?  I've tried set the
>> persistent to false but then I am not able to retrieve message.
>>
>> Thanks for any suggestions,
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/vm-and-activemq-data-location-tp15426671s2354p15426671.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
> So creating you connection like this:
> ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm:// 
> localhost?broker.persistent=false");
> 
> The embedded broker still uses a message store - it just resides in  
> memory - so only lasts the duration of your unit test
> Is this what you've been doing?
> 
> cheers,
> 
> Rob
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/vm-and-activemq-data-location-tp15426671s2354p15434342.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: vm and activemq-data location

Posted by Rob Davies <ra...@gmail.com>.
On Feb 12, 2008, at 5:40 AM, amq-newbie wrote:

>
> I'm completely new to the activemq, so I guess my question is basic.
> I am using activemq for JUnit testing. Therefore, I set to run it in  
> vm mode
> since JUnit is ran by third party product that executes unit tests for
> entire application on separate machine regulary. So, there is no  
> need to
> keep queue for any longer then for the duration of the unit test. VM  
> mode is
> very handy for that, my only problem is that when the test completes  
> there
> is a directory called activemq-data. This directory is created  
> somewhere at
> the code  level directories which is a problem. Is there any way  
> that I can
> disabled it? Or, that I can at least specify different directory so  
> the code
> level directories won't get mixed with activemq?  I've tried set the
> persistent to false but then I am not able to retrieve message.
>
> Thanks for any suggestions,
>
> -- 
> View this message in context: http://www.nabble.com/vm-and-activemq-data-location-tp15426671s2354p15426671.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
So creating you connection like this:
ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm:// 
localhost?broker.persistent=false");

The embedded broker still uses a message store - it just resides in  
memory - so only lasts the duration of your unit test
Is this what you've been doing?

cheers,

Rob