Why do the TopicSession.createDurableSubscriber and TopicSession.unubscribe calls raise JMSException with the message "ORA - 4020 - deadlock detected while trying to lock object"?
Answer Posted / 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 View All Answers
What are the types of communication provided by jms? Explain in detail.
Can two jms servers share the same persistent store?
What are the different parts of a jms message?
What is asynchronous messaging?
How to Configure Open JMS?
What is jms server?
What is message listener container?
What is the difference between JMS and RPC (Remote Procedure Call)?
How to Allowe messages to expire ?
What is jms topic?
How to Send object as message in JMS?
What is jms active mq?
Explain about the exception handling mechanism of JMS?
What are all the features of JMS API in J2EE platform?
What is jms queue in java?