How can a remote jms receiver detect loss of connection to Messaging server

Plan:
Messaging server (like JbossMQ /SonicMQ) is hosted on one machine.
A JMS receiver (MDB/core java program) on another machine receives messages from the messaging server.
Secnario:
The JMS receiver is now continuously listening or occasionally reading messages from a certain queue of the server using a JMS connection.
Now the messaging server has this receiver in its list of receivers for that particular queue.
For some reason the messaging server is down and then restarted.
The JMS connection of the receiver is now invalid.
When the messaging servers comes up again its list of receivers is empty.
Required Solution:
Can you please help me on how the JMS receiver can detect the above scenario and re-establish the connetion to the messaging server, the next time the server is up.
Observations:
When I create a message consumer or queue receiver in a j2se program, and take messages from JbossMQ I have some additional threads running on my JVM. These threads are not directly created by the program and servers only for receiving messages. One of these threads is catching an exception and printing a stack trace when it detects that the connection is lost. This will also result in the closing of JMS connection. The problem is that the exception is not thrown for the programmer to catch and handle it at some level. I also tried ExceptionListener and waited for ping interval. Is there a concept of receiver listening to the periodic heart beat of the server. Please give me guidance, solutions or corrections.
For comments on this, Thanks in advance

Hi Leendert,
do you want to use the JMS API directly? In this case you have to create the connection factory on system X. From system Y, you access the JNDI on system X and look up the connection factory. Since you are accessing the JNDI on system X from outside, you need to set some properties to create the InitialContext:
    Properties env = new Properties();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
    env.put(Context.PROVIDER_URL, <system X>:<p4 port>); // replace with your settings
    env.put(Context.SECURITY_PRINCIPAL, <user name>); // replace with your settings
    env.put(Context.SECURITY_CREDENTIALS, <password>); // replace with your settings
    naming = new InitialContext(env);
Hope that helps.
Regards,
Sabine

Similar Messages

  • My iPod Classic is not detected by my Windows 8 computer when I connect it via USB port.  How can I get windows to detect this device?

    My iPod Classic is not detected by my Windows 8 computer when I connect it via USB port.  How can I get windows to detect this device?  A message from windows says: the device has malfunctioned.

    Try TS1363: iPod: Appears in Windows but not in iTunes.
    See also Corrupt iPod classic.
    tt2

  • How to use remote JMS in websphere5?

    I want to use JMS in another server to send message so that I config required jndi in server. When I lookup local JMS jndi(connection factory, queue) it works correctly. But when I lookup remote connectionfactory, it throws 'javax.naming.CommunicationException'. BTW, local configuration is same as JMS server. And I use WSAD 5.1.1 to develop it.
    The first question is if I need use JMS server on another server, I should lookup remote queue and JMS connection factory on that server, right?
    The second question : If yes, how to obtain remote JMS connection factory? I use WSAD 5.1.1 trail, I don't know is it possible to obtain remote jndi.
    The third question : do I need change any configuration for supporting remote JMS client instead of local(same compute, different jvm) environment?
    The following is my client code to obtain remote queue:
    public class Test {
         public static void main(String[] args) {
              Properties env = new Properties();
              env.put(Context.INITIAL_CONTEXT_FACTORY,
                    "com.ibm.websphere.naming.WsnInitialContextFactory");
              env.put(Context.PROVIDER_URL, "corbaloc:iiop:10.240.4.203:2809");
              try {
                   Context initialContext = new InitialContext(env);
                   Object obj = initialContext.lookup("jms/IPharmQueue1");
              } catch (NamingException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    }It works ok when ip is localhost. But it can obtain remote queue or connectionfactory. I tried to lookup other EJB, it also failed.

    Actually, I have application in one server and four same server as cluster. But only one server provides JMS service. So my application need to use remote JMS server instead of local server. But in my development environment I can not simulate cluster environment as customer environment. So I try to let my application access remote JMS server in different computer. When two server start up I found my application will get local JMS connection factory and queue instead of remote factory. Even I put IP of another computer in PROVIDER_URL.
    I did a application client to test it. The code is above. But it can not lookup remote jndi.
    I use WAS5 as server and WSAD 5.1.1 as development IDE.
    Is any idea about it?

  • How can i remote a computer outside of my nextwork and has a dynamic IP

    How can i remote a computer outside of my nextwork and has a dynamic IP.
    I have have mac set up overseas and will need to remote access it from time to time, but the mac has a dynamic IP, is there anyway around for me to access IT.
    Have been using "log me in" but its too slow.
    Thanks in advance for any assistance

    The subject of connecting ARD via the Internet has been covered here many times already (search the forum for "Internet"), but take a look at this web page:
    http://www.starklmc.com/ard.htm
    It should help, though you may have to refer to your router's documentation for specifics on opening and forward ports in that particular unit.
    To get a "static IP" use a service like dyndns.com

  • I have my boyfriend's apple ID and password, how do I check what apps he has on his phone? ( not all the apps that he had downloaded, but the ones that are actually on his phone). And How can I remotely download apps to his phone if I have his ID

    I have my boyfriend's apple ID and password, how do I check what apps he has on his phone? ( not all the apps that he had downloaded, but the ones that are actually on his phone). And How can I remotely download apps to his phone if I have his ID and PW?
    Thank you so much

    If you want seperate accounts for managing apps and purchasing content, basically yes, you need two account and would need to repurchase. However, if you just want seperate ID for iMessgae, icloud and such, you can do that and still continue sharing the same Id for apps and itunes.

  • Good afternoon, I bought a box of PEV in the game the sims 3 worth € 8.99 and I was not credited in the game despite me out of the account. How can I cancel or receive the PEV?

    Good afternoon, I bought a box of PEV in the game the sims 3 worth € 8.99 and I was not credited in the game despite me out of the account. How can I cancel or receive the PEV?

    Try contacting iTunes support via this page and ask them to help : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • How can i use JMS in J2ME

    how can i use JMS in J2ME?
    What are steps i have to follow to run JMS in J2ME?

    http://www.microjava.com/articles/techtalk/jms

  • HT5622 If I have two emails for my iMessage how can I see or receive my msj or the email that is not the primary email

    If I have two emails for my iMessage how can I see or receive my msj or the email that is not the primary email

    It's basically ment for iMessage and FaceTime. I might be wrong but this can only be done between two Apple products that allow this function. You won't receive an email if I sent you an iMessage to a secondary email you use for iMessages. You would only receive a text message. Now if someone using a PC sent an email to the secondary email you use you will receive an email not a text message. The secondary email is used basically if you do not have a data plan and you're connected to wifi you can still send iMessages using those emails you provided.

  • HT204407 How Can i remotely turn on find my iPhone app

    How Can i remotely turn on find my iPhone app

    Thank you. Not the answer I was hoping for though, but I appreciate your response

  • How can i remote iphone camera from macbook?

    I am trying set up photoshoot using iphone and macbook. How can i remote iphone camera from macbook? Thanks

    Not possible.

  • HT5205 I am in Ecuador, I have an A1430 iPad using a 3D micro sim card, when they call me it sounds like busy tut tut tut tut how can I do to receive phone calls and sms

    I am in Ecuador, I have an A1430 iPad using a 3D micro sim card, when they call me it sounds like busy tut tut tut tut how can I do to receive phone calls and sms

    iPad are not telelphones. They do not receive calls nor do they receive or send SMS messages.

  • On my iPad I can only send email and messages to apple products.how can I send and receive from other devices other than Apple?

    On my iPad I can only send email and messages to apple products.how can I send and receive from other devices other than Apple?

    Vallakat wrote:
    On my iPad I can only send email and messages to apple products.
    There is a huge difference between sending email and sending messages.
    Yes, I believe you when you say you can only send messages to other Apple products.  The iPad is not a telephone, and therefore, it cannot text message.  It can only iMessage, which means it can send and receive messages to/from other Apple products if they are on WiFi or an iMessage capable cellular network.
    Email, however, is a whole different category.  I don't really think you can only exchange email with other Apple products only.  Make sure you have correctly identified the symptoms.

  • How can I change email received by others from me via my IMac and MacBookPro being received as APPLE?ring as just Apple

    How can I change emails received by others from me on my IMac and MacBookPro appearing on their computers as 'APPLE' and not my name?

    Thanks - I did not realize that Homesharing can be specifically set to a photo destination like that!
    So, it would appear that I can either point it to iPhoto (and folders/ events within that) OR the default Pictures folder and subfolders of that OR any other specific folder (and subfolders of that) of my choice.  However, I cannot select BOTH the default Pictures folder (and some subfolder of that) AND a folder in iPhoto AND/ OR an event/ folder in iPhoto.  Is that a correct assumption?
    If so, the only way I see getting homesharing to get both set of pictures is to get all my picture folders (internal and external drive based) into iPhoto (without physically duplicating them) - and then pointing Homesharing to iPhoto, right?
    I think you have solved my issue - but I just want to be sure of that.
    Thanks a ton!

  • How can i send and receive messages through CAN

    Hi,
    how can i send and receive messages using Vector CAN CARDXL

    As mentioned in this forum post, if you have a dll, this can easily be called from LabVIEW or CVI.
    I also went to the vector website and it does look like they have LabVIEW drivers available for download.
    Peter Flores
    Applications Engineer

  • How can iPhone videos sent to another iPhone be made clear like they were recorded even though it sent as a text. with iMessage it's clear but when it's not available the quality *****, how can I make a received vid clear again??? help

    how can iPhone videos sent to another iPhone be made clear like they were recorded even though it sent as a text. with iMessage it's clear but when it's not available the quality *****, how can I make a received vid clear again??? help

    This is determined by your carrier. SMS/MMS is a poor man's email and by that I mean SMS/MMS has major restrictions and limitations compared to email but is a cash cow for cell phone carriers.
    Upload the video to YouTube when connected via wifi and send the YouTube link via text.

Maybe you are looking for

  • "Could not save as a PDF because of a program error"

    Saving a Photoshop file as a PDF for emailing to someone else has always been complicated by the number of choices to be made, and now it's become impossible. Every time I try it now, I get this message, and I have to send a jpeg instead. I've tried

  • How to re-import podcasts

    I have about 400 podcasts in my iTunes library. They are all imported correctly -- that is, they show up as Podcasts, not as files in the Music Library. Now, I need to re-format my iPod, and re-import everything. I have no problem importing my MP3 fi

  • Native C++ Custom Exception Not Recognized

    Hi, I'm having a problem with the native part of my code when throwing a custom exception. It is never caught when the exception is thrown in a separate class, it always falls in the generic catch(...) section. I know this problem has something to do

  • Z 10 link wont upload right

    I have tried to upload link for my new Z10 and I cant get past the first page where it asks me to set up link. cant get past this page Solved! Go to Solution.

  • Using Sun Traffic manager in SC

    Dear Gurus Is there any specfic requirement using Sun traffic Manager in Sun cluster i am using Sun cluster 3.1 on Solaris 9 Regard