Samstag, 24. Januar 2015

Working with a transaction in JACIS...

Working with a transaction in JACIS is as simple as follows:

JacisContainer container = new JacisContainer();
JacisObjectTypeSpec<String, Account> objectTypeSpec =  
                 new JacisObjectTypeSpec<>(String.class, Account.class);
JacisStore<String, Account> store = container.createStore(objectTypeSpec);
container.withLocalTx(() -> {
    Account acc = store.get("account1");
    acc.deposit(100);
    store.update("account1", acc);
});

For more details see: https://github.com/JanWiemer/jacis/wiki...

Dienstag, 20. Januar 2015