posted 1 year ago
Why would you want to? A stateful bean is meant to contain conversational state. A stateless bean can also contain state, it just shouldn't be exposed. Something like an HttpClient should be no problem. And if you need state that can't be disposed of, use a singleton bean instead. Just make sure to correctly configure concurrency, otherwise it can be a huge bottleneck.