Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jakartaee-platform-dev] Bean/Application Managed Resource

Currently in Jakarta EE spec, almost all resources are container managed(have to register as a container resource firstly). An exception is bean managed or contained managed tx in EJB.

If possible to declare these resources as beans and available in the application lifecycle(like the Spring way). Esp, we could need a lightweight container such as an embedded server and packaged into Docker.

* DataSource
* EntityManagerFactory
* Local TransactionManager
* JMS Destination/Queue/Topic/ConnectionFactory
* ExecutorService
* MailSession
* Http Authentication Mechanism

```java
class Resources{

   @Produces
   @CustomerDB
   DataSource customerDataSource() {}
}
```



---

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

Back to the top