Weblogic's JMS Connection Is Not Thread-safe?
(Doc ID 2205666.1)
Last updated on MARCH 11, 2020
Applies to:Oracle WebLogic Server - Version 188.8.131.52.0 and later
Information in this document applies to any platform.
On : 184.108.40.206.0 version, WLS JMS
Is Weblogic's JMS Connection not thread-safe?
Detailed problem description:
Our application, deployed in Weblogic Server 220.127.116.11.0 domain, uses Spring's org.springframework.jms.listener.DefaultMessageListenerContainer to fetch messages from WLS JMS Queue.
DefaultMessageListenerContainer uses a single shared JMS Connection and multiple JMS sessions dedicated to each worker thread.
A bootstrap procedure for JMS resources within DefaultMessageListenerContainer is as follows (simplified):
1. Fetching JMS Connection Factory from JNDI context
2. Creation of the single shared JMS Connection in a stopped mode
3. Concurrent execution of:
3a. Start of multiple worker threads which create JMS Sessions using the shared JMS Connection (at this point JMS Connection is in a stopped or running mode - that depends solely on the relative timings between threads)
3b. Start of the shared JMS Connection
What can be rarely observed is the incoherent state of the shared JMS Connection after the bootstrapping procedure is finished: JMS Connection is started but some of its JMS Sessions are still stopped.
This behavior is very problematic since Spring's container can't receive messages through JMS Sessions that are stopped.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document