vendredi 12 août 2016

Java: Inject Singleton bean to test

I have a Singleton bean, and I have a Stateful bean too. I need to use the Singleton bean in the testclass of my Stateful bean. If I simply just inject it:

@Inject
private MySingletonBean mySingletonBean;

I got null instead of the Stateful bean. Any ideas, why is it, how to fix it?

Aucun commentaire:

Enregistrer un commentaire