jakartaee / jakartaee/messaging

Extend the @JMSConnectionFactory annotation to allow a resource reference to be defined

Open
#147 4 comments 0 reactions 0 assignees View on GitHub
jms21-forreview-minor Priority: Major Type: Improvement
Dominant language
Java
Stars
49
Forks
34
PR merge metrics
No merged PRs in 30d

Description

In JMS 2.0 the @Inject annotation may be used to inject a JMSContext into a Java EE application.

The @JMSConnectionFactory annotation may be used to specify the "the JNDI lookup name" of the connection factory which should be used. This is the only information about the connection factory that may be specified. The specification is unclear about what this lookup name represents.

Compare this with the @Resource annotation which may be used to inject a JMS connection factory. This allows the connection factory to be specified using the name, lookup, mappedName, authenticationType, description, shareable and type attributes.

The @JMSConnectionFactory annotation only allows a single attribute (value) to be specified. Since this is described as the "lookup name" we can assume it corresponds to the lookup attribute of the @Resource annotation, though this isn't stated explicitly.

The @JMSConnectionFactory annotation doesn't allow any of the other attributes to be specified. This means that some important characteristics of the connection factory cannot be specified when injecting a JMSContext.

Another consequence of this is that the @JMSConnectionFactory annotation doesn't allow a resource reference name to be defined. This prevents the deployer defining or overriding these values by creating a element in the deployment descriptor.

The @JMSConnectionFactory annotation therefore needs to be clarified and extended to allow the same information to be specified as when using a @Resource annotation to inject a JMS connection factory. In addition the specification should state more clearly exactly what the existing value attribute specifies.
#### Affected Versions
[2.0]

Contributor guide

Open the contributing guide

Research direction

Start by comparing the JMS 2.0 @JMSConnectionFactory and @Resource annotations and the deployment-descriptor resource-ref behavior described in the issue. Determine which resource-reference attributes should be supported and clarify what value represents. Done means the specification explicitly defines the existing value attribute and permits the required resource-reference information.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.