public class AppObjectSandboxProvider implements SandboxProvider {
+ private ConcurrentHashMap<UUID, AppObjectShimServerPolicy> sandboxes = new ConcurrentHashMap<UUID, AppObjectShimServerPolicy>();
... would like to maintain one sandbox for each transaction.
But in the end only one transaction will succeed, all other transactions have to be rolled back and sandboxes associated with the transactions have to be thrown away. In this case, I feel that it may be more efficient to use lock to forbid starting multiple transactions.
this issue is kept as place of the design discussion.
based on code review:
... would like to maintain one sandbox for each transaction. But in the end only one transaction will succeed, all other transactions have to be rolled back and sandboxes associated with the transactions have to be thrown away. In this case, I feel that it may be more efficient to use lock to forbid starting multiple transactions.
this issue is kept as place of the design discussion.