A Java Inspired Semantics for Transactions in SOC