• New Feature
  • Status: Closed
  • 3 Minor
  • Resolution: Fixed
  • X-Common Code
  • prodmgmt
  • Reporter: drb
  • November 30, 2006
  • 0
  • Watchers: 0
  • July 27, 2012
  • September 17, 2007


Support a DSO programming model based on JSR 175 annotations as an alternative configuration mechanism for DSO metadata. Instead of writing tc-config.xml, DSO developers would declare metadata inline in their code using the standard Java mechanism for Java code metadata.

For example:

import com.terracotta.annotations.Root;

public class ECommerceClient {

@Root public static Inventory;



import com.terracotta.annotations.Shareable; import com.terracotta.annotations.WriteLock;

@Shareable(honorTransient=true) public class Inventory {

@WriteLock public void doImportantUpdateStuff() { … }


Note that annotations would be supported in addition to the existing XML configuration. XML will always be required for operational settings (e.g. listen ports, logs, and so forth). Plus, we need to continue to support the drop-in use case which can only be accomplished via an external configuration file. Reasons:

* Developers like annotations
* It's low-hanging fruit
* Pretty much every framework that manages POJOs works this way
* JBoss Cache AOP does this (PojoCache)
* Demos involving code will be 10x more clear and powerful
* This is where the money is

Reference - Support JSR 175 annotations for DSO meta data: LKC-451 (Terraotta internal development Jira issue)


Taylor Gautier 2007-09-17

Most functionality for annotations is implemented.