TMJava is our effort in integrating transactional memory to Java language through language extensions. The aim is to simplify the use of transactions in Java programs. With TMJava, introducing a transaction is as simple as enclosing the contents of a transaction in an atomic block as follows:

// Transactional code

To achieve this TMJava makes use of DeuceSTM. DeuceSTM provides the integration of an STM implementation into Java programs using bytecode instrumentation, as long as transactional code resides in a method annotated by the special @Atomic annotation. TMJava is built on top of DeuceSTM and it serves as a preprocessor engine which converts files written with the proposed Java language extension to Java files that can be processed by DeuceSTM.

Apart from integration transactional memory into Java language, TMJava also provides some additional language features to enhance error recovery in Java programs. We make use of atomic blocks to be able to rollback and retry or run some alternative code in case of exceptional situations.

For the syntax of the proposed language extension for atomic blocks, rollback, retry and alternative codes, see the doc/syntax.txt file in the current release.

The documentation of TMJava is in the doc directory of the current release. The documentation gives information about installation, syntax and usage in separate files in this directory.


Derin Harmanci, Université de Neuchâtel, Switzerland (contact: )