How do I create a Transactional Store?

Abstract: How do I create a Transactional Store?

Instantiate a TxManager and set it to the datastore before or after its
creation.

TxManager tx = new TxManager();
DataStore ds = new DataStore();

ds.setFileName("TxStore");
ds.setTxManager(tx);
ds.setUserName("user");
ds.create();
ds.close();