+ @Override
+ public ShardTransaction create() throws Exception {
+ ShardTransaction tx;
+ if(transaction instanceof DOMStoreReadWriteTransaction) {
+ tx = new ShardReadWriteTransaction((DOMStoreReadWriteTransaction)transaction,
+ shardActor, schemaContext, shardName);
+ } else if(transaction instanceof DOMStoreReadTransaction) {
+ tx = new ShardReadTransaction((DOMStoreReadTransaction)transaction, shardActor,
+ schemaContext, shardName);
+ } else {
+ tx = new ShardWriteTransaction((DOMStoreWriteTransaction)transaction,
+ shardActor, schemaContext, shardName);
+ }
+
+ tx.getContext().setReceiveTimeout(datastoreContext.getShardTransactionIdleTimeout());
+ return tx;
+ }
+ }