+1
On Fri, Nov 4, 2011 at 9:19 AM, Caleb James DeLisle
<calebdelisle(a)lavabit.com> wrote:
We need a way for subservient stores such as FS
attachments to get transactions from the main store so that it can know to rollback if
there is an error in the main store.
In order to Cloud/DataNucleus store plug in seamlessly and function with FS attachments,
FS attachments needs to be able to get transactions from the main store without knowing or
caring what that main store is.
I propose this:
Add a new storage submodule: xwiki-platform-store-transactionprovider which provides this
interface which extends javax.inject.Provider:
@ComponentRole
public interface XWikiTransactionProvider
extends Provider<StartableTransactionRunnable<? extends
XWikiTransaction>>
{
// No additional functions, just the get() from Provider.
}
The default implementation for now will be a wrapper which picks out the real
TransactionProvider based on what the main store is, as defined in xwiki.cfg.
This will allow code to get a transaction from the main store then get
TransactionRunnables from the main store and use them with this transaction and be
assured
that you won't be using a Hibernate TransactionRunnable with a Cassandra
Transaction.
WDYT?
Caleb
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Thomas Mortagne