-
1. Re: Why aren't my @Singletons instantiated?
foumpie Sep 12, 2011 10:20 AM (in response to tluettgert)Singletons have to implement Serializable ?
(AS 7 normally throws an error for that, so it would be odd if you missed it)
And btw, why not use @Inject ? @EJB is soo 2010
-
2. Re: Why aren't my @Singletons instantiated?
jaikiran Sep 12, 2011 11:32 PM (in response to foumpie)foumpie wrote:
Singletons have to implement Serializable ?
(AS 7 normally throws an error for that, so it would be odd if you missed it)
No, that's not an requirement and I haven't seen an error being thrown for that.
-
3. Re: Why aren't my @Singletons instantiated?
b.eckenfels Sep 22, 2011 7:08 AM (in response to tluettgert)What profile are you using? I currently use a MDB with a singleton reference, and this works. The Singleton is instanciated as soon as the MDB is instanciated (or beforeif I use the @Startup annotation on the singleton class).
If problems occur while instanciating the Singleton or while resolving the reference they should actually be logged. It could only be that a deployer is missing and does not scan your artifacts correctly, so try the standalone-preview.xml profile.