Hi,

The question seems weird, but has been asked on the CDI dev issue tracker :
issues.jboss.org/browse/CDI-226.

I've tested it in TomEE, and it looks like that we can have multiple
instances of a @Singleton in an EAR application. My example is here :
https://github.com/hasalex/tomee-sample/blob/QuestionOnML/tomee-sample-war/src/test/java/fr/sewatech/javaee/example/SingletonTest.java

The @Singleton injected in the EJB is different from the one injected in the
SessionContextListener.

As a developer, that was not what I was expecting. So am I wrong or is that
Singleton behaviour strange ?

Alexis



--
View this message in context: 
http://openejb.979440.n4.nabble.com/What-is-the-scope-of-a-Singleton-CDI-bean-in-an-EAR-tp4666902.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to