Weblogic's JMS Connection Is Not Thread-safe? (Doc ID 2205666.1)

Last updated on MARCH 29, 2017

Applies to:

Oracle WebLogic Server - Version 12.1.2.0.0 and later
Information in this document applies to any platform.

Symptoms

On : 12.1.2.0.0 version, WLS JMS

Is Weblogic's JMS Connection not thread-safe?

Detailed problem description:

Our application, deployed in Weblogic Server 12.1.2.0.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.

Changes

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms