STM demo for java