That's Right! You can use a precompiled set (as per the home page) of Jakarta libraries, where the injects are replaced by Guice!
NB - The libraries are there for cross-compatibility, but do not actually use CDI in any way. So don't think that @EJB is going to do anything xD. use @Inject
, and @Named
.
Expression Language is also using Guice for the resolving of items, and... it is usable in JDK 14
The following Jakarta libraries are available, and used (including dependencies)
- el - Expression Language
- xml.bind.api - JAXB XML Binding
- websocket-api - Web Sockets implementation
- servlet-api - Servlet 5.0.0
- jsp - Java Server Pages
- jstl - JSTL Translations
- faces - Java Server Faces
@PreDestroy
is not available in this library. Rather use the Service Provider IGuicePreDestroy
to destroy items on shutdown
When the Jakarta libraries are Java Module System compatible, they automatically get decommissioned for their better parts - same as every other library