I'll try to answer to your question.
The value of a static variable is maintained within the current JVM.
But an EJB can be accessed by a different JVM for each client.
So a static variable in an EJB is not really shared.
If an EJB modify the value of the variable, only EJBs within the same JVM will see the change.
So the code is not safe.
Actually, I don't think the EJB spec prevent you from using STATIC variables. I've never perform the
test.
It just advises not to use them.
HTH.
/ JeanLouis<br /><i>"software development has been, is, and will remain fundamentally hard" (Grady Booch)</i><br /> <br />Take a look at <a href="http://www.epfwiki.net/wikis/openup/" target="_blank" rel="nofollow">Agile OpenUP</a> in the Eclipse community