This content has been marked as final.
Show 5 replies
-
1. Re: How to inject a singleton?
pmuir Dec 23, 2007 12:30 PM (in response to hubaghdadi)Like an application scoped component?
-
2. Re: How to inject a singleton?
norman.richards Dec 24, 2007 10:55 AM (in response to hubaghdadi)For something a bit stronger, if you are JBoss you could also consider the @Service EJB3 bean. JBoss will manage a single server-wide instance of your session bean.
-
3. Re: How to inject a singleton?
hubaghdadi Dec 24, 2007 11:43 AM (in response to hubaghdadi)I mean a simple POJO that it has to be a singleton...
-
4. Re: How to inject a singleton?
nickarls Dec 24, 2007 2:07 PM (in response to hubaghdadi)"hubaghdadi" wrote:
I mean a simple POJO that it has to be a singleton...
That would be an application scoped component. There can be... only one. -
5. Re: How to inject a singleton?
thejavafreak Dec 25, 2007 8:46 PM (in response to hubaghdadi)"nickarls" wrote:
"hubaghdadi" wrote:
I mean a simple POJO that it has to be a singleton...
That would be an application scoped component. There can be... only one.
Wow. Thanks for the information. I didn't know just by Scoping it to APPLICATION we already have a singleton :-d. So simple.