We propose a formal semantics for distributed transactions inspired by the attribute mechanisms of the Java Transaction API. Technically, we model services in a process calculus featuring transactional scope mechanisms borrowed from the so called container-managed transactions of Java. We equip our calculus with a type system for our calculus and show that, in well-typed systems, it guarantees absence of run-time errors due to misuse of transactional mechanisms.