Why not go with this option?
Why not go with this option?> The other option was to perform the same updates to every shard, and suggest
> XA transactions.
I don't think it is significantly harder to implement besides running
changes on all shards. The fact that the transaction should be XA
makes no difference. Hibernate is unaware of the (distributed) nature
of the transaction, so should Hibernate Shards.
Nice write-up Danny. I think the important thing is that we have a reasonable solution that we can guide devlopers towards. If at first that solution mostly involves configuring the shards themselves to replicate certain tables, I'm fine with that. Tomislav's point is important though - we're not adding real support for replication. We'll make this clear in the docs.
Danny, I think detecting illegal cascades at startup is preferable to using an interceptor. The data we need to do this at startup is available so why wait until some random time after the app has started to let users know they've done something wrong?