Why do the TopicSession.createDurableSubscriber and TopicSession.unubscribe calls raise JMSException with the message "ORA - 4020 - deadlock detected while trying to lock object"?



Why do the TopicSession.createDurableSubscriber and TopicSession.unubscribe calls raise JMSException..

Answer / munnu

CreateDurableSubscriber and unsubscribe calls require exclusive access to the Topics. If there are pending JMS operations (send/publish/receive) on the same Topic before these calls are issued, the ORA - 4020 exception is raised.

There are two solutions to the problem:

1. Try to isolate the calls to createDurableSubscriber and unsubscribe at the setup or cleanup phase when there are no other JMS operations happening on the Topic. That will make sure that the required resources are not held by other JMS operational calls. Hence the error ORA - 4020 will not be raised.

2. Issue a TopicSession.commit call before calling createDurableSubscriber and unsubscribe call.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JMS Interview Questions

Which jms standard interface defines the methods to create the different types of messages?

0 Answers  


Explain about session interface?

0 Answers  


What is the difference between Jms and Jvt ?

0 Answers   Tech Mahindra,


What is difference between jms and activemq?

0 Answers  


Why doesn’t the JMS API provide end-to-end synchronous message delivery and notification of delivery?

1 Answers  






Is jms a protocol?

0 Answers  


What are jms topics and queues?

0 Answers  


Which are the benefits of mdb (message driven beans) over standard jms consumers?

0 Answers  


What is the important part of JMS applications?

0 Answers  


What type messaging is provided by JMS ?

1 Answers  


What are the various message types supported by JMS?

1 Answers  


How does spring jms listener work?

0 Answers  


Categories