You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Romantique <pr...@yahoo.com> on 2007/11/16 18:07:47 UTC

Turning off creating of embedded Active MQ broker by ConnectionFactory

Hello gentlemen.

Is there any possibility to turn off creating (and starting) of embedded
Active MQ broker in case connection string passing to ConnectionFactory
starts with "vm://"?
The desired behavior is exception informing that connection could not be
created (provided no brokers were started programmatically within current
virtual machine).
The reasons of why this behavior is desired for us is the fact that we use
specific xml configuration.  Embedded Active MQ JMS Server is started by our
java application that configures it.
But we don't want specifying of  "vm://*" in connection string lead to
starting of ActiveMQ with default or other configuration. 
Are there any properties or parameters of ActiveMQConnectionFactory allowing
turning off this feature?

Thank you

-- 
View this message in context: http://www.nabble.com/Turning-off-creating-of-embedded-Active-MQ-broker-by-ConnectionFactory-tf4822658s2354.html#a13797372
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Turning off creating of embedded Active MQ broker by ConnectionFactory

Posted by Rob Davies <ra...@gmail.com>.
There's a create property to do this for the VMTransport  (default is  
true)
e.g.
ConnectionFactory fac =  ActiveMQConnectionFactory("vm//localhost? 
create=false);


cheers,

Rob

http://open.iona.com/ -Enterprise Open Integration
http://rajdavies.blogspot.com/



On Nov 23, 2007, at 10:26 AM, Romantique wrote:

>
> Thanks Joe,
>
> as I understand from your response there is no way to turn this  
> feature off;
> So, if someone specify "vm://localbroker" in connection string then  
> broker
> will be always created and started as new instance of JMS Server if  
> it is
> not started yet, won't it? Actually, I am looking for the way to avoid
> starting of JMS Server in such a way. Starting and stopping of  
> broker in the
> context of our task should be controlled programmatically only.
> -- 
> View this message in context: http://www.nabble.com/Turning-off- 
> creating-of-embedded-Active-MQ-broker-by-ConnectionFactory- 
> tf4822658s2354.html#a13909797
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: Turning off creating of embedded Active MQ broker by ConnectionFactory

Posted by Romantique <pr...@yahoo.com>.
Thanks Joe,

as I understand from your response there is no way to turn this feature off;
So, if someone specify "vm://localbroker" in connection string then broker
will be always created and started as new instance of JMS Server if it is
not started yet, won't it? Actually, I am looking for the way to avoid
starting of JMS Server in such a way. Starting and stopping of broker in the
context of our task should be controlled programmatically only.
-- 
View this message in context: http://www.nabble.com/Turning-off-creating-of-embedded-Active-MQ-broker-by-ConnectionFactory-tf4822658s2354.html#a13909797
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Turning off creating of embedded Active MQ broker by ConnectionFactory

Posted by ttmdev <jo...@ttmsolutions.com>.
You can assign any specific xml configuration to your embedded broker via the
'xbean:' option. For example, the vm:// example below starts the embedded
broker with the configuration specified in the foo.xml file, which btw needs
to be in the broker's class path. 

vm://localbroker?brokerConfig=xbean:foo.xml

Or you can specify an absolute path to any file

vm://localbroker?brokerConfig=xbean:file:C:/tmp/foo.xml

Or you can configure the broker through vm connector options. Here’s an
example client VM connector  that starts an embedded broker that is called
“embeddedbroker”, listens on the local port 6000 for incoming connection
requests, and has the persistence feature turned off

vm:broker:(tcp://localhost:6000)?brokerName= embeddedbroker&persistent=false

Hope this helps
  
Joe


Romantique wrote:
> 
> Hello gentlemen.
> 
> Is there any possibility to turn off creating (and starting) of embedded
> Active MQ broker in case connection string passing to ConnectionFactory
> starts with "vm://"?
> The desired behavior is exception informing that connection could not be
> created (provided no brokers were started programmatically within current
> virtual machine).
> The reasons of why this behavior is desired for us is the fact that we use
> specific xml configuration.  Embedded Active MQ JMS Server is started by
> our java application that configures it.
> But we don't want specifying of  "vm://*" in connection string lead to
> starting of ActiveMQ with default or other configuration. 
> Are there any properties or parameters of ActiveMQConnectionFactory
> allowing turning off this feature?
> 
> Thank you
> 
> 

-- 
View this message in context: http://www.nabble.com/Turning-off-creating-of-embedded-Active-MQ-broker-by-ConnectionFactory-tf4822658s2354.html#a13797868
Sent from the ActiveMQ - User mailing list archive at Nabble.com.