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 is the functionality of jms message consumers?
What is the difference between the P2P (Peer to Peer) model and subscribe model?
In which situations we are using jms?
What is jms consumer?
Can two jms servers share the same persistent store?
List types of Messaging services supported by JMS?
What is a topic?
How to write junit test cases for jms?
Can two different jms services talk to each other? For instance, if a and b are two different jms providers, can provider a send messages directly to provider b? If not, then can a subscriber to provider a act as a publisher to provider b?
Is rabbitmq a jms?
What is difference between JMS and Web Services?
What are the types of messages that are supported by JMS?
What is hermes software?
Can we send message from one server to another server using jms?
What are the basic advantages of jms?