Why you think a Singleton is stateless?
A singleton is a singleton, you might have a state and concurency can be managed by the container or by bean, you can annotate the whole bean or methods.
One other thing is whether you will have a Singleton in a cluster, if you want that have a look to this quickstart
Ah good point. In the definition I missed this part:
"Singleton session beans offer similar functionality to stateless session beans but differ from them in that there is only one singleton session bean per application, as opposed to a pool of stateless session beans, any of which may respond to a client request. Like stateless session beans, singleton session beans can implement web service endpoints.
Singleton session beans maintain their state between client invocations but are not required to maintain their state across server crashes or shutdowns."
So I guess I can use a @Singleton after all... Thanks for the quickstart link too - I'm sure that will come in handy.
No problem your are welcome
There is a simpler singleton quickstart example here: https://github.com/jbossas/quickstart/tree/master/helloworld-singleton
Wolf's deals with clustering, so you might want to start wit hthe simpler version and then move on to his. :-)