- private void commit(Persistent message) {
- Modification modification = (Modification) message.payload();
+ private void createTransaction(CreateTransaction createTransaction) {
+ DOMStoreReadWriteTransaction transaction =
+ store.newReadWriteTransaction();
+ ActorRef transactionActor = getContext().actorOf(
+ ShardTransaction.props(transaction, getSelf(), schemaContext), "shard-" + createTransaction.getTransactionId());
+ getSender()
+ .tell(new CreateTransactionReply(transactionActor.path().toString(), createTransaction.getTransactionId()).toSerializable(),
+ getSelf());
+ }
+
+ private void commit(Object serialized) {
+ Modification modification = MutableCompositeModification.fromSerializable(serialized, schemaContext);