Esempio n. 1
0
  /**
   * Return the list of transactions currently <I>in prepared or heuristically completed states</I>.
   * Need to find out what non-prepared states they are considering <I>heuristically completed</I>.
   *
   * @see javax.transaction.xa.XAResource#recover(int)
   */
  Xid[] getPreparedXids() {

    Iterator it = resources.keySet().iterator();
    Xid curXid;
    HashSet preparedSet = new HashSet();

    while (it.hasNext()) {
      curXid = (Xid) it.next();

      if (((JDBCXAResource) resources.get(curXid)).state == JDBCXAResource.XA_STATE_PREPARED) {
        preparedSet.add(curXid);
      }
    }

    return (Xid[]) preparedSet.toArray(new Xid[0]);
  }
Esempio n. 2
0
 /**
  * This is needed so that XAResource.commit() and XAResource.rollback() may be applied to the
  * right Connection (which is not necessarily that associated with that XAResource object).
  *
  * @see javax.transaction.xa.XAResource#commit(Xid, boolean)
  * @see javax.transaction.xa.XAResource#rollback(Xid)
  */
 JDBCXAResource getResource(Xid xid) {
   return (JDBCXAResource) resources.get(xid);
 }
Esempio n. 3
0
  ExpressionColumn getColumnExpression(String name) {

    return namedJoinColumnExpressions == null
        ? null
        : (ExpressionColumn) namedJoinColumnExpressions.get(name);
  }