It really depends if you have state in your POJO. If not, SLSB is great for load balancing.
I have some state - but it is not necessarily related to the session. Basically there is a hashmap that contains lot of information about different clients, but any client can have access to it.
So, can I make this into a stateless session bean? If so, will I lose my hashmap contents during a fail-over?
To give some more info, I have this cache class which contains a hashmap that the client can talk to and pickup whatever is assigned to it (based on the key value). What I would really like to do is to share this cache among the entire cluster, such that no matter which app server instance the request lands on, it will be able to have the right and latest information about the cache.
Two considerations are:
1. We dont want to change the logic inside the class.
2. It is okay to change the form of the class (ie, convert to EJB).
Any ideas are appreciated.
Sounds like to me JBossCache is what you need (coupled with a SLSB for load balancing, e.g.). :-)