Wonder if someone could give me their opinion on something that puzzles me about stateful and stateless session EJBs
Why did sun make the classification of a stateful/stateless session
EJB a deployment issue rather than a class interface classification???
Surely once a session EJB is coded to rely on its stateful nature, i.e reaccessing instance variables during a conversation, this precludes it from ever being deployed again as a stateless session EJB.
I'm asking the question because I have had to check whether an EJB which is currently being deployed as a stateful EJB could be deployed as stateless. Luckily in my case it can but if any methods had relied on the stateful nature I would have been scuppered!
I suppose you could access the sessionContext or something and condition certain logic on the beans deployment.