The method queueConnection.close() shuts down the broker.

Hi All,
I want to send and recieve messages in the same application. I'm using embedded broker, here's the brokerConfig.xml
<beans>
    <broker>
        <connector>
            <serverTransport uri="vm://localhost" />
        </connector>
        <persistence>
            <vmPersistence/>
        </persistence>
    </broker>
</beans>I send and receive messages in the separate classes and each one creates its own connection. In the sender class when I call the method queueConnection.close() it shuts down the broker.
How can I keep the broker to recieve messages in the receiver class by it's own connection?
Thanks in advance.

Hi James,
I'm guessing you're using ActiveMQ?Yes, ActiveMQ v. 3.2.1.
>
FWIW there's an online forum specifically to discuss
ActiveMQ related issues here...
http://forums.logicblaze.com/forums/show/1.page
10x for link, I'll try it for the next time
Which version are you using?
Unless its a really old version I'm a little in the
dark. The code to close the embedded broker only
fires when there are no more connections open; so
provided each class has its own connection you should
be fine.
Note could this be a timing issue? Are you closing
the connection of the sender before the receiver
creates its connection?You're right. I think the problem is just there. I didn't know that the broker will close when there are no more connections open.
Another option is just to explicitly create a broker
yourself in Java code; then you are in control of its
lifecycle.
There are examples here
http://activemq.org/How+do+I+embed+a+Broker+inside+a+C
onnection?refresh=110x a lot. I'll create the broker myself

Similar Messages

  • Safari will lock up on my MacBook Pro. Force quit doesn't help. When I try to restart the computer, I get an error saying Safari cancelled the restart. I have to press the power button to shut down the computer.

    While I'm using safari,  it will freeze up. When I force quit safari and reopen it, I find that I'm back to where I was when I did the force quit and safari remains locked up. When I try to restart the computer, I get a pop up that says that safari cancelled my restart. I then press the power button to shut down the computer. When I reboot the computer and open safari, I see all the tabs and windows that were opened when this issue began, only this time safari isn't frozen. This problem started yesterday.
    Has anyone experienced the same problem? Is there a fix for this problem?

    Try Resetting Safari: Open Safari. Cick on the name Safari in the menu bar. In the drop down menu click Reset Safari.

  • I have purchased a new macbook pro model no 840ll/a after the first installation i shut down the coputer. when i start gain i cant  . it is asking the passwoerd and i dont remember what is the password . please help

    i have purchased a new macbook pro model no 840ll/a after the first installation i shut down the coputer. when i start gain i cant  . it is asking the passwoerd and i dont remember what is the password . and when i give the apple id password it is not accepting  . what to do

    i am able boot my system because of wrong password  . how to open

  • Does firefox has the feature of automatically shutting down the PC when active downloads complete?

    Hello,
    Does firefox has the feature of automatically shutting down the PC when active downloads complete?
    This feature would help a lot..
    Thank you.
    uzair007

    No it doesn't, you would need an external download manager to get a feature like that.

  • Now that I upgraded to Maverick on my Mac air, I can not use the power button to shut down the computer anymore. any suggestions?

    Now that I upgraded to Maverick on my Mac air, I can not use the power button to shut down the computer anymore. I now have to go to the apple icon in the upper left corner.  Any short cuts instead of going to the apple in the top left corner and hitting shut down.  Doing that all the time, I feel like I am back at work using a "Windows" computer.

    This a is tricky one, but you can still do it. Instead of pressing the power button, hold it down for a few seconds and then you'll see the shut down options dialog pop up.
    I guess they were trying to prevent accidental touching of that button. They did something similar with the Eject button a few versions ago, where you have to hold down Eject instead of just tapping it so that you don't pop out a CD by mistake.

  • How do I close pages on the macbook pro before shutting down the computer

    I'm pretty new to this Macbook pro, and I'm not sure that I'm closing it down properly.  How do I properly close pages prior to shutting it down.  It's not like my iphone, where I can close pages down at the bottom of the screen.  Thanks

    Hi thanks for replying.  I had figured that out, but I'm more interested in the fact that I think I'm running with multiple facebook pages running.  When I swipe across the pad, it shows another one of my previous facebook sessions.  I don't think I'm closing these pages down the right way.

  • I updated Adobe flash player and now i'm unable to open Opera and I have to use the power button to shut down the computer?

    I updated Adobe flash player and now i'm unable to open Opera and I have to use the power button to shut the computer down.
    How do you delete programs?
    thanks

    If Flash Player is indeed the problem I would suggest using the Adobe Uninstaller.
    Have you tried using a different browser such as Chrome, Firefox or Safari to see if they have a problem with Flash?

  • When erasing iPad from the cloud, will it shut down the iPad or will it only erase the data?

    my ipad got stolen weeks ago and and i tried to track it down using icloud and could not locate it coz it was offline, i then blocked it but now my questions if i erase it from my icloud, will it unblock or will it stay blocked?

    I have a similar problem with the original iPad.  The screen doesn't freeze but the iTunes app quits.  I tried the standard "repairs" that I always recommend to others but no joy.
    Regarding the downloading time, obviously your Internet access data rate is the determining factor but an hour is not unreasonable.

  • Plugging in the firewire 800 cable shuts down the computer

    This is strange and frustrating. I upgraded the memory and when i inserted the FW 800 cable back in, the computer simply shut off. I reset Pram & Logic board to no avail. Any idea what's happening? All the other ports work fine... Thanks

    If you take out the RAM you recently added, does it make the FireWire port work again?

  • When I open one particular folder to play the games in it the pointer turns into a pinwheel and I cant open the game or close the folder unless I shut down my computer.  Never happened before and does not happen with any other folder on the desktop.

    why does pointer become a pinwheel when I open one particular folder only and prevent me from opening the apps in it and then keep me from closing the folder unless I shut down the computer completely.  I can open all other folders on the desk top without a problem.  My game folder never gave me trouble before.

    Try this. Open one of your files. The window that contains your picture is named at the top. Command click on the name and you'll see the entire path starting with its name and then moving to the folder, the folder it is contained in, etc all the way to down to the hard drive volume name. This should tell you where to find the folder.

  • Is it possible to continue downloading OS X Lion after shutting down the computer?

    I am downloading the OS X Lion app on my MacBook Pro and is only at 180mb after an hour. I am downloading this app for free because I recently purchased a MacBook Pro. Is there a way I can continue the download even after shutting down the computer? Will I be charged the next time I try to re-download the app--as in, will the code for downloading the app for free expire?
    Thank you SO much!

    I downloaded OS X Lion over the period of a day or so and what you have to do is pause the download (for a snow leopard user that should be in your dock) and then shut down your machine. When you boot it back up, you should be able to resume the download by clicking the OS X Lion logo and typing in your Apple ID info and the download should resume at the same spot where it was when you left it.

  • Cloning without shutting down the db

    Hi,
    Can you please suggest how to clone apps and db without shutting down the database? Apps is just copying the files, is there a recommended way to do the db cloning without shutting down the db.
    Updating the instance details:
    db - 10.2.0.4 on RHEL
    apps - 11.5.10.2
    -Jek
    Edited by: 890397 on Feb 2, 2012 5:31 AM

    You can find all the steps in the documentation (using RMAN or Hot backup).
    Cloning Oracle Application 11i /R12 with Rapid Clone - Database (9i/10g/11g) Using Hot Backup on Open Database [ID 760772.1]
    Cloning Oracle Applications Release 11i with Rapid Clone [ID 230672.1]
    Rapid Clone Documentation Resources For Release 11i and 12 [ID 799735.1]
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Rapid+AND+Clone+AND+Documentation&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Rapid+AND+Clone+AND+RMAN&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • SAP System copy without shutting down the source and the target system

    Hi,
    We need to need to System refresh without shutting down both the source and the target system, i read the docs from SAP looks like we need to shutdown the source system during export and import phase, is there any way to do the system refresh without shutting down the system.
    Sathish

    Hi,
    Think a little bit about what is a database and you'll get the answer that what you "need to need" is impossible.
    Of course it is possible to keep the source running (hopefully, because ususally it is the production system !) by using an online backup, but you need to stop the target system because you will restore a backup on it.
    If you use the export/import way, you have to stop both source and target system.
    Regards,
    Olivier

  • If I have more then a few tabs open such as gmail, facebook, and a zynga game no tabs will load at all. I close and reopen firefox numorous (Im talking 7 or 8 times or many more) and shut down the zynga game and still it wont load

    If I have more then a few tabs open such as gmail, facebook, and a zynga game no tabs will load at all. I close and reopen firefox numorous (Im talking 7 or 8 times or many more) and shut down the zynga game and still it wont load the tabs or if it does and I then try to add the game or any other site at all on a tab it causes firefox to stop working (though not close) and I have to restart opening and closing it many times to get it to work at all.

    1st, you will not be able to activate your PPro1.5 on ANY new computer, see next link for the special version you MUST use
    CS2 (and earlier) Activation Server http://helpx.adobe.com/x-productkb/policy-pricing/creative-suite-2-activation-end-life.htm l
    2nd, you already mentioned Virtual XP, so if a direct install doesn't work, that would be the way to go... or, to just do what SHOULD work from the start, just do Virtual XP

  • I can't close safari (option is greyed out) and I can't shut down the computer because of it. How do I fix this?

    I can't close safari (option is greyed out) and I can't shut down the computer because of it. How do I fix this?

    Try to "Force Quit" Safari - either under the Apple menu or by holding down option-Command-esc.
    Clinton

Maybe you are looking for

  • How can i show images from different folders  in image gallery

    Hi All,          i have downloaded and executed photo viewer image gallery application.           in that we r showing images sequentially what we have defined in xml file.          but i want show images randomly or i want show images from different

  • OAF-Checkbox when selected should update column in a table

    Hello, I have a requirement to add checkbox to MES Operator page and it should perform the following, 1) When MES Operator page is opened, it should read attribute1(Y/N) from table and accordingly check/uncheck checkbox. 2) When checkbox is checked/u

  • Problem with storage

    the situation shown in the picture happened after 10.10.3 yosemite update pls help me how can i resolve this problem

  • How to find this Search object relavant to which root object?

    Hi All,   how to find this Search object relavant to which root object?   As I am having search object 'BTQuery1O', so which is root object for this?   how to find this?

  • My ipod won't turn on and my home button is broke, help?

    my iPod randomly turned off earlier. it wouldn't turn back on by holding the lock button, and last time this happened i had to hold down the lock button and home button for like 10 seconds. except it's quite hard to do so when your home button is pus