According to EJB specs, non final static fields are not allowed. Is this still the case for an EJB 3.1 stateless session bean defined as singleton?
Just to make things clearer and to prevent question like why you want to do it:
I have a situation where I need an EJB to start working on server start-up ,do some DB related work and only when it is done it will signal all other components in the system that they can start their work.
This EJB will also be defined with timer, so it will start every few minutes and thus, if it failed the first time it will try again until it succeeds, or until someone notices there is a problem. Once succeeded, the flag will be changed and all other components (timer EJB's) can kick in.
So I have a Singleton EJB and I need it to hold a static (global) flag that all other components/EJBs can refer to.