I think the way this should be done is to enable the user to configure a specific
destination to use a specific persistence manager.
This would involve an extra (optional) attribute "PersistenceManager" on the
destination.
When doing any database operations associated with a particular destination, we just need
to make sure the correct persistence manager is used, then (hopefully) pretty much all the
rest of the code doesn't need to change.
There is the following complication.
When doing transactional operations (sending/acking) to more than one persistence manager
in the same transaction, we need that to be transactional.
So we can either
1) Implement our own XAResource to handle this (not recommended)
2) Leverage any XA capabilities of the underlying database.
If we make sure we use an XADatasource for each database, we should be able to leverage
the JCA adapter to handle transaction enlistment.
Of course, if the underlying database does not support XA we cannot do this.
Going ahead I think this will less of a problem since we will support local file based
persistence stores so each node in the cluster can have its own storage.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057189#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...