Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jakartaee-platform-dev] Unify the Container Managed Resource Definitions

These all sounds like great ideas, hopefully they will be considered.

On Apr 30, 2026, at 3:45 AM, hantsy bai via jakartaee-platform-dev <jakartaee-platform-dev@xxxxxxxxxxx> wrote:

Hi
Since Java EE 7, the Java EE/Jakarta EE has had container resource definitions via a series of annotations. Such as

* DataSourceDefinition
* The security-related XXXXAuthenticationMechanismDefinition
* The concurrency-related ManagedExecutorDefinition, ContextServiceDefinition, ManagedThreadFactoryDefinition, etc.
* The JMSDestinationDefinition, and factory definition.

As time goes by, the security and concurrency annotations have CDI alignment, and EL in the security annotation attributes. But the most useful annotation -
`DataSourceDefinition`, and the old JMS-related annotations have not evolved for a few years.

I hope that in the incoming Jakarta EE 12, these will be considered:

* allow injecting default DataSource by `@Inject`
* allow adding Qualifier to DataSourceDefintion and JMSXXX, and inject them via CDI `Inject` with qualifiers. 
* It is better to add EL support as security annotations, especially the DataSourceDefinition, while Payara and Wildfly have their own solutions for it, it is better to use the standard EL for it.

This is just a very **small improvement**, but for end users (Java backend developers using Jakarta EE), it is a big step forward.

I remember adding several issues for these, but unfortunately, every spec focuses on developing new features.  For Jakarta EE developers, providing a **consistent experience** across all specs is also vast.

BTW, I also proposed a similar annotation to expose `PersistenceContext/Unit` or `EntityManagerFactory/EntityManager` via creating a new similar annotation, check here:

and 

I just need similar features to declare container-managed ` EntityManagerFactory/EntityManager ` resources via annotations, like the existing annotations, but the discussions are finally missing direction and closed.  I am not sure if my _expression_ is unclear or if other developers have never used these features. 

---

Regards,

Hantsy Bai

Self-employed consultant, fullstack developer, agile coach, freelancer/remote worker

GitHub: https://github.com/hantsy

Twitter: https://twitter.com/@hantsy

Medium: https://medium.com/@hantsy
_______________________________________________
jakartaee-platform-dev mailing list
jakartaee-platform-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jakartaee-platform-dev


Back to the top