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
How many types of messaging model do JMS provide for and what are they?
Which jms standard interface defines the methods to create the different types of messages?
What is an object message?
How can third-party jdbc driver be used with jms?
How to check jms messages in weblogic?
What is jms server?
How do I check messages in jms queue?
How do I handle request/response using jms?
What is a stream message?
What is the use of jms server in weblogic?
Explain about JMS queue?
Can we use jms for sending automated e-mails?
Mention different types of messages available in JMS API?
What type of messaging is provided by JMS?
How is message oriented middleware responsible for no time dependency between sender and receiver component with respect to point to point model on jms?