Forum Stats

  • 3,875,490 Users
  • 2,266,929 Discussions


Invalid Connection remains connected on AQ by my JMS code while RAC switch

988750 Member Posts: 2
edited Feb 8, 2013 7:39AM in Advanced Queueing
Hello All,

Greetings !!

I am facing a issue with my JMS code which connect to AQ to dequeue the message. While RAC switch of DB instance my code remains with the invalid connection and seems like hung and need to be restart for fresh connection.

My code works in thread implemented while creates the connection with AQ on initial start-up and keep on dequeue the message on subscription while infinite thread execution.
Code also have reconnect login in case we face any DB disconnection or exception but here while RAC switch we are not able face any disconnection due to while my reconnect logic is not being called.

So can anyone advice me how we can get notification in my code about the RAC switch, so that I can call my reconnect logic for fresh connection ??

Thanks in advance for suggestions.



  • 758358
    758358 Member Posts: 452
    Sounds like you need to look at FAN (Fast Application Notification) and FCF (Fast Connection Failover):

    Not sure how these would be integrated in your application as I'm not a developer but these are the methods Oracle provide to breakout of stale / dead application connections when a RAC instance fails.

    Hope this helps,
  • 988750
    988750 Member Posts: 2

    Thanks for the response !!

    FAN and ONS configuration help us in catching these notifications.

    But here I want to know for these notifications what all kind of changes are required by Client side Java code ??

    Is there any documentation with example which can highlight what changes need to be implement ??

  • 758358
    758358 Member Posts: 452
    There are some (slightly) dated examples on My Oracle Support e.g.

    How To Use JDBC FCF Feature To Detect That a RAC Node Instance Has Been Shutdown ? [ID 364005.1]

    I'm no java developer though, you might be better off in that forum.

This discussion has been closed.