Last active
March 10, 2019 12:13
-
-
Save ezhov-da/8ab6627123a62c1b62a1a65da93d02d7 to your computer and use it in GitHub Desktop.
проблема внедрения EJB в JAX-RS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Если EJB класс находится в другом модуле от JAX-RS модуля, то аннотация @EJB или @Inject не работает. EJB класс инстанцируется равным null. | |
Для решения проблемы достаточно создать EJB класс в модуле с JAX-RS и сделать @EJB необходимых классов в него. | |
Тогда в JAX-RS ресурсах достаточно написать | |
@Inject | |
ServiceWrapperВашиEJBКлассы |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment