In most real world situations you are going to want a shared database. JBoss AS clustering doesn't somehow detect all database writes and keep non-shared databases in sync. If you are using JMS with persistent messages for sure you want a shared database.
The shared db can be a single point of failure. How you deal with that depends on the capabilities of your database.
Side note: The session passivation logic for clustered web sessions and clustered SFSBs use JBoss Cache's CacheLoader tech for persisting passivated sessions. JBC provides a CacheLoader implementation called JDBCCacheLoader that can write to a database (although by default the AS uses an implementation that writes to the filesystem.) *If* you decided to switch to the JDBCCacheLoader, that should use a datasource that *does not* use a shared database. That's an unusual config though.