NovatecConsulting/BeanTest

@javax.ejb.Singleton annotated Beans are not injected as EJBs

andywuest opened this issue · 2 comments

Hi,

i am testing BeanTest with my project and the project fails to inject an EJB that is annotated. with @singleton

e.g.

@startup @singleton
public class CacheManagerBean {
}

I guess the BeanTestExtension class needs to be extended to check for the @singleton annotation as well (not only for Stateless and MessageDriven).

Yes, that should do it. Care to create a pull request? The corresponding scope would be @ApplicationScoped

The implementation of this feature won't support multi-threading access because the TransactionalInterceptor is not thread-safe. That should be done in a another issue / feature request.

The implementation will just provide access to the Singleton (with @ApplicationScoped) via the getBean() method.