OK It works !!!
When I disconnect from my embedded connection, I stop my embedded broker and
the process exits gracefully.
I just had to add 4 ActiveMQ specific lines in my JMS compliant Connection
Class. It would be better if it was an external parameter of the URI but it
is a good workaround.
Ouch. I just looked at "borkerFactory" class. (I tried not to use ActiveMQ
internals ... And never looked at it)
No problem Gary. I understood your advice. The last question is not
appropriate. Forget it please.
Eric
Eric-AWL wrote:
>
> Hi Gary
>
> Yes, it helps me. Thank you.
>
> I unders
Hi Gary
Yes, it helps me. Thank you.
I understand that, if I have a Java reference of the embedded brokerService
object, and use brokerService.stop(), I will gracefully quit the network of
broker . Good ! It's the main part of my question.
You told me that I can continue to use my URI syntax.
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-c
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
e