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

What is the use of StreamMessage?

1 Answers  


What are Messages?

1 Answers  


What is JMS session?

1 Answers  


What is JMS API Architecture?

0 Answers  


Explain how Application server handles the JMS Connection?

0 Answers  






What is asynchronous messaging?

0 Answers  


Mention the difference between durable and non-durable subscription?

0 Answers  


What is mean by jms?

0 Answers  


What is a topic?

0 Answers  


Give an example of using the point-to-point model

1 Answers  


What is a text message?

0 Answers  


What is Destination ?

1 Answers  


Categories