MyBatis-CDI extension takes care of the lifecycle of MyBatis mappers and SqlSessions. MyBatis components are directly injected into your CDI beans ready to be used, there is no need to create or destroy them. It also provides local and JTA transaction support based on the @Transactional annotation.
CDI API VERSION | Oracle JDK 8 | OpenJDK 8 | OpenJDK 7 |
---|---|---|---|
cdi-1.0 | Y | Y | Y |
cdi-1.1 | Y | Y | Y |
cdi-1.2 (preferred) | Y | Y | Y |
cdi-2.0 | Y | Y | N |
- Ready to deploy sample web app (Jee7): https://github.com/mnesarco/mybatis-cdi-samples