Documentation‎ > ‎

Writing your own STM algorithm


  1. Please join the project as a member.
  2. Checkout the project from: https://deuce.googlecode.com/svn/trunk/Deuce, or download the jar agent from the download section.
  3. If you want to write your own STM implement org.deuce.transaction.Context - this context is used by the STM implementation to collect events.
  4. To mark a method as Atomic all you have to do is to add an @atomic annotation to it.
  5. Use the following properties to run your application:
    • -javaagent:bin/deuceAgent.jar
    • -Dorg.deuce.transaction.contextClass=org.deuce.transaction.tl2.Context
  6. You can use the following properties as reference:
    • -Dorg.deuce.transaction.global=true - used as a reference, using a single global lock.
    • -Dorg.deuce.verbose=true - writes the modified classes.
    • -Djava.util.logging.config.file=config/logging.properties - for more logging.
    • -Dorg.deuce.exclude="java.*,sun.*,org.eclipse.*,org.junit.*,junit.*" - exclude classes from being transformed.

P.s. to reduce the load from manipulating internal files you can always add @exclude on your internal files.