How can a standalone App subscribing messages

I've configured a JMS message publisher and a message subscriber, and run them both in the same machine with J2EE Server running and everything works fine.
Now I need to use a standalone app client in a diferent machine to subscribe messages published on my J2EE server and I'm not being able to do it.
Here's my code:
Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY, ConfigurationLoader.getKeyValue("server.contextFactory"));
prop.put(Context.PROVIDER_URL, "machine1");
prop.setProperty(Context.SECURITY_PRINCIPAL,ConfigurationLoader.getKeyValue("server.admin"));
prop.setProperty(Context.SECURITY_CREDENTIALS,ConfigurationLoader.getKeyValue ("server.password"));
initialContext = new InitialContext(prop);
topicConnectionFactory = (TopicConnectionFactory)jndiContext.lookup(ConfigurationLoader.getKeyValue("jms/testConnectionFactory"));
topic = (Topic) jndiContext.lookup(jms/TestTopic);
topicConnection = topicConnectionFactory.createTopicConnection(ConfigurationLoader.getKeyValue("server.admin"), ConfigurationLoader.getKeyValue("server.password"));
at the point I try to create the topic connection I get this exception:
Exception occurred: javax.jms.JMSException: Unable to connect to JMSServer (/127.0.0.1:9127): Connection refused: connect
So apparently it is still trying to connect to the local machine even if I've specified the ip of the J2EE server in the initialContext (machine1), how can I make this work? Sun documentation doesn't help much on this...
Thanks in advance

Thanks for the reply, I'm not using machine1 in my code that was just an example I gave. Anyway I managed to figure out what was going on. My code was fine, the problem was that my AppServer (Orion) was returning localhost as the JMS Server url due to a bad configuration. Everything solved and working fine apparently.

Similar Messages

  • I have multiple apple ids was backing up everything to iCloud from iPhone 5. I just bought iPhone 6 and perform a iCloud restore. I received a message that all files did not restore.   How can I restore apps, files manually?

    I have multiple apple ids was backing up everything to iCloud from iPhone 5. I just bought iPhone 6 and perform a iCloud restore. I received a message that all files did not restore.   How can I restore apps, files manually?

    Yes - I connected my phone to my computer / Itunes and went into the apps section, but from there I have no idea how to manage the push notifications.  I even tryied going into itunes that is installed on my phone.  I still cannot find anyplace to manage these popups.  I have also gone into settings - notifiations - and tried turning all notifications for these apps all off but that didnt work either.  Any guidance is MUCH appreciated - Im not sure where to go from here.

  • HT4527 How can move the apps and playlists on my iPad to my Mac? Whenever I attempt to sync, I get a message stating that all apps and music on my iPad will be replaced by content from my Mac and there are no content. Thanks.

    How can move the apps and playlists on my iPad to my Mac? Whenever I attempt to sync, I get a message stating that all apps and music on my iPad will be replaced by content from my Mac and there are no content. Thanks.

    the apps will not be deleted if the itunes is authorised for the apple id from which you downloaded the apps.
    for the songs if you have downloaded it from a store other than itunes an app "TuneAid" will help you. download the full version then you can copy all the songs on the ipad to ur itunes library

  • I have an ipo touch first generation when i click into an app on the app store i click on free or buy but a message then alerts me that my iPod is not compatible with this app. its says this for all the apps i try to download. so how can i download apps

    My ipod touch 1st generation keeps saying apps are not compatable so how can i download apps froms the app store??????????????????????????????????????????

    It sounds like you are trying to download and install apps that require a later version of iOS than what can be and is probably installed on your iPod Touch.  Your 1G iPod Touch can only be updated to IOS 3.1.3 and no higher.  You can check the current version by heading to Setttings -> General -> About.
    If the app requires a later version that iOS 3.1.3, then you will not be able to install or use that app unless you purchase a new iOS device.
    B-rock

  • How can we get a alert message in  the current browser we are using the mom

    how can we get a alert message in the current browser we are using the moment we have entered some data in
    the table...
    I need a popup alert the moment a new record is added in a table... in apex database is 11g xe..
    The idea is I am using a apex application. .The moment new data is added in the table ..I am alerted by a message window..that a new record has been added...
    Thanks
    Edited by: pauljohny on Jun 11, 2012 10:23 AM

    pauljohny wrote:
    how can we get a alert message in the current browser we are using the moment we have entered some data in the table...
    "Current browser"? When viewing anything, or just when using an APEX app?
    Ans .. Just when using apex app....even if the apex app is minimised ..The current browser will be the one where I am using apex app...
    What i am looking for some scheduler .. to check ..in the table every 5 minute for change if there is a change..then a popup alert be shown...
    Split it into [at least] 2 components, database and browser. I'd expect someone calling themself a "DBA Architect" to have some ideas about the database side of things, even if not clued up on JavaScript and AJAX?
    I dont think its a database isssue... When i say to check every 5 minutes ..it could be easily done via dbms_scheduler ...I am having issue in getting the popup alert message...
    in apex... Dont know wether there is a plugin like modal window(available from skill builder) which shall help in this scenario,.Or might be have to use java scripting and ajax ..
    and if it is that (Java scripting and Ajax) .....then shall have to be familiar with java scripting and Ajax...and this shall be a bit time consuming..
    Had a feeling this could be accomplished via java scripting and ajax.. ...but still looking for some easy way..

  • How can i recall a sent message

    How can I recall a sent message and opened already from the person who received the message.
    Thank you

    What do you mean by recall?  once you hit send its sent.  If your wanting view the message just go into the message app.

  • The new ios7 is horrible how can i downgrade? my messages keeps freezing im frustrated im very close to going ANDROID any one can help how do i get in touch with apple directly?

    the new ios7 is horrible how can i downgrade? my messages keeps freezing im frustrated im very close to going ANDROID any one can help how do i get in touch with apple directly?

    gorxxx83 wrote:
    the new ios7 is horrible how can i downgrade? my messages keeps freezing im frustrated im very close to going ANDROID any one can help how do i get in touch with apple directly?
    Downgrading is not supported.
    Here are some basic troubloeshooting tips:
    - Quit the App by opening multi-tasking bar, and swiping the App upward to make it disappear.  (For iOS 6, holding down the icon for the App for about 3-5 seconds, and then tap the red circle with the white minus sign.)
    - Relaunch the App and try again.
      - Restart the device. http://support.apple.com/kb/ht1430
    - Reset the device. (Same article as above.)
    - Reset All Settings (Settings > General > Reset > Reset All Settings)
    - Restore from backup. http://support.apple.com/kb/ht1766 (If you don't have a backup, make one now, then skip to the next step.)
    - Restore as new device. http://support.apple.com/kb/HT4137  For this step, do not re-download ANYTHING, and do not sign into your Apple ID.
    - Test the issue after each step.  If the last one does not resolve the issue, it is likely a hardware problem.
    If you want to contact Apple directly, call 1-800-MYAPPLE (1-800-692-7753), or go to getsupport.apple.com. 
    Don't waste your time asking for a downgrade of the iOS.  That's not an option.

  • Ipad 3 How can I retrieve old sent messages?

    How can I retrieve old sent messages which disappeared from my sent folder? I only have old sent messages until June 2014 and I need a message I sent in March 2014. I use a pop email client (godaddy). Any suggestions? Greetings, Harry

    Unless you saved the email to a folder on your computer, it is most likely gone for good since it has disappeared from the sent folder in the mail app. Email messages are not stored in the backups so you cannot retrieve them that way either.

  • How can I move apps from one computer to the other?

    How can I move apps from one computer to the other?
    (preferably without iCloud)

    Backup your iTunes library to an external drive and onto the other computer
    http://support.apple.com/kb/ht1751

  • How can i put apps from one ipod to a new ipod?

    how can i put apps from one ipod to a new ipod?

    iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device

  • How can i copy apps from one computer to another?

    how can i copy apps from one computer to another?

    You don't mention which operating system you have so it's difficult to provide an answer since the mac and Windows stores the files differently.
    The other thing you can do is just re-download the apps from the iTunes Store. Just login to the iTunes Store on the other computer using the same Apple ID. On the right-hand side of the iTunes Store page you will see a 'Purchased' link. Clicking on that will take you to a page that will list your past purchases which you can re-download to the new computer.

  • How can I transfer apps from one iTunes library to another?

    How can I transfer apps from one iTunes library to another? My daughter has an iTouch, and I was managing it through my library. I have created an iTunes account for her, with a new iTouch, and would like to move the apps over. I tried to sync the old iTouch to the new library and it said it was already set up to sync with a different library. What is the best way to do this?

    You can transfer iTunes purchases by:
    iTunes Store: Transferring purchases from your iPhone, iPad, or iPod to a computer
    To make the new computer the syncing computer you have to:
    - Transfer iTunes purchases lIke I described above
    - Make a backup of the iPod on that computer by connecting the iPod and then right-clicking on the iPod under Devices in iTunes and selecting Back Up.
    - Restore the iPOd from that backup
    She will have to continue to use your iTunes ID to update the apps prchased with your account. To use her account she will have to log into the computer with her account (iTunes>Store) and change the sign in on the iPod by going to Settings>Store.

  • When I update my nano ipod I get an error message "User ipod cannot be updated.  The disk couldnot be read from or written to."   How can I overcome this error message.

    In the iTunes window, when I update my nano ipod, I get an error message "User ipod cannot be updated.  The disk could not be read from or written to."   How can I overcome this error message.

    Hello there dilip77707,
    It sounds like you are getting this error message that your iPod cannot be read from or written to when you are trying to update your iPod Nano. I recommend the troubleshooting from the following article to help you get that resolved. Its pretty straight forward, just start at the top and work your way down as needed:
     'Disk cannot be read from or written to' when syncing iPod or 'Firmware update failure' error when updating or restoring iPod
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • My wife and I have 2 new iPhones and also have a mac book pro and an iMac. How can we share apps, music and contacts between all these?

    My wife and I have 2 new iPhones and also have a mac book pro and an iMac. How can we share apps, music and contacts between all these?

    Use the same Apple ID and password for purchasing in all these devices.

  • How can i stop an error message that comes up when i am using word? the error message is "word is unable to save the Autorecover file in the location specified. Make sure that you have specified a valid location for Autoreover files in Preferences,-

    how can i stop an error message that comes up when i am using word? the error message is "word is unable to save the Autorecover file in the location specified. Make sure that you have specified a valid location for Autoreover files in Preferences,…"

    It sounds like if you open Preferences in Word there will be a place where you can specify where to store autorecover files. Right now it sounds like it's pointing to somewhere that doesn't exist.

Maybe you are looking for

  • How can I work with Bahnhof.se and airport extreme

    hej, I bought airport extreme and startedwith Bahnhof.se 100/100 The problem is that I can activate only one dator. But I possess iPad, mini iPad 2 iphones and macbook air When I need my macbook, I have to activate this dator on Bahnhof.se and my iPa

  • How do I open Appleworks 6.2.2 files in Windows 7?

    I have recently acquired an Acer laptop (sorry) which runs Windows 7. I would like to work on files from my Apple iMac desktop where I use Appleworks 6.2.2 but I cant open any of the files. I am sure there is a simple solution bhut I dont know what i

  • BDLS in productive ERP system

    I have an interesting requirement.  A customer is currently running R/3 4.7 with multiple countries.  They want to split the system so one country has it's own system.  The approach has been to take the existing 3-system landscape and perform a homog

  • How to print form into pdf format using smart forms in abap

    please let me know how to print form into pdf format using smart forms in abap. Moderator message: please search for available information/documentation. Edited by: Thomas Zloch on Mar 25, 2011 2:04 PM

  • Function module to get attribute and value from organisation model

    Hi I need a function module to get the attribute and its corresponding values set on the sales org stucture.The export parameter will be the Sales Org Id. Please reply ASAP. Edited by: prem kumar on Apr 16, 2009 9:37 AM