/**
  * Create a new transaction context for a given method.
  *
  * @param method A <code>Method</code>.
  * @return A <code>TransactionContext</code>.
  */
 private TransactionContext newXAContext(final Method method) {
   final TransactionContext context = new TransactionContext();
   final String xid =
       new StringBuffer(method.getDeclaringClass().getName())
           .append('_')
           .append(method.getName())
           .toString();
   context.setXid(xidFactory.createXid(xid).toString());
   context.setType(extractXAType(method));
   return context;
 }
 /**
  * Create ModelInvocationHandler.
  *
  * @param workspace A <code>Workspace</code>.
  * @param model A <code>Model<?></code>.
  */
 ModelInvocationHandler(final Workspace workspace, final Model<?> model) {
   super();
   this.workspace = workspace;
   this.model = model;
   this.xidFactory = XidFactory.getInstance(workspace);
 }