Hi Eirc, If you want to access the broker service you should use the org.apache.activemq.broker.BrokerFactory to create it and return a reference. The create takes the same uri syntax as a connectionFactory. The details can be found at: http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html
stopping the client broker service will gracefully disconnect it from the server side (networked) broker. You can still use the vm: url to connect to the broker but you may want to add create=false to the uri so that you don't end up with two embedded brokers. hope this helps, Gary. 2009/2/18 Eric-AWL <eric.vinc...@atosorigin.com>: > > I use xbean reference to an activemq.xml file to read a VM configuration on > each side. > > "vm://instance?brokerConfig=xbean:activemq.xml&waitForStart=2" > > I like this method because I can switch from internal VM broker to TCP > external broker very easily and just use JMS to connect to my internal or > external broker without using ActiveMQ classes. > > If I manage ActiveMQ BrokerService Objects myself and manually create a > broker in my program, Will "brokerService.stop()" stop the internal broker > and allow my client program to stop gracefully without affecting my server > process ? > > If yes, is there a way to get a BrokerService JAVA reference for a VM broker > automatically created with an xbean reference to an ActiveMQ.xml file ? > > Eric > > -- > View this message in context: > http://www.nabble.com/Correctly-leaving-a-network-of-broker-tp22062875p22083464.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > -- http://blog.garytully.com Open Source SOA http://FUSESource.com