Skip to content

Clarification of 7.3.5 #342

@mattrpav

Description

@mattrpav

Context
The Apache ActiveMQ team is in the process of completing a few remaining JMS 3.1/2.0 features and we plan to provide developer guides to highlight key specification areas.

Description
Section 7.3.5 calls for the asynchronous CompletionListener to not be used in Jakarta EE web container or Enterprise Beans container.

I'm seeking clarification of the origin of this advisory and understanding if this still applies in all use cases.

Questions

What is the original reasoning behind this recommendation? We suspect it has to do with thread lifecycle or context.

Does "Jakarta EE web container" mean any application making JMS calls that originate through a Jakarta Servlet API?

Does this still apply to Jakarta web applications invoked using an async request?

*Specification Section

7.3.5. Restrictions on usage in Jakarta EE

An asynchronous send is not permitted in a Jakarta EE web container or Enterprise Beans container.

The following methods must therefore not be used in a Jakarta EE web container or Enterprise Beans container:

    jakarta.jms.MessageProducer method send(Message message, CompletionListener completionListener)

    jakarta.jms.MessageProducer method send(Message message, int deliveryMode, int priority, long timeToLive, CompletionListener completionListener)

    jakarta.jms.MessageProducer method send(Destination destination, Message message, CompletionListener completionListener)

    jakarta.jms.MessageProducer method send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive, CompletionListener completionListener)

    jakarta.jms.JMSProducer method setAsync(CompletionListener completionListener)

All the methods listed in this section may throw a jakarta.jms.JMSException (if allowed by the method) or a jakarta.jms.JMSRuntimeException (if not) when called by an application running in the Jakarta EE web container or Enterprise Beans container. This is recommended but not required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions