I am also facing similar dilemma. Any suggestions which one of the two JBoss Cache/ JMS is better in terms of stability, performance.
JMS and JGroups are both transports, so they are both conceptually *below* a replicated cache (like JBossCache or JavaSpaces).
The diff between JGroups and JMS is that JGroups' focus is on flexibility and extensibility of the transport implementation, whereas JMS only provides you with the standardized interface, limited possibilities to replace parts of the JMS impl you use with your own stuff.
In other words, JGroups can be tuned much more.
If you want to replicate data, JBossCache is a natural choice. If you wanted to use JMS or JGroups, you'd have to implement the following things yourself to come up with a replicated cache:
- Replication (blocking versus non-blocking)
- State transfer to a node joining the cluster. This can be tricky if we do this while other nodes are replicating changes
- Transactions (atomicity across the cluster)
- Cache loading / eviction
etc etc etc
Don't forget concurrent access. If you want your "cache" to be threadsafe, there will be a lot to do by way of locking to prevent reading invalid state.