Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.

1 /*2 * JBoss, Home of Professional Open Source3 * Copyright 2005, JBoss Inc., and individual contributors as indicated4 * by the @authors tag. See the copyright.txt in the distribution for a5 * full listing of individual contributors.6 *7 * This is free software; you can redistribute it and/or modify it8 * under the terms of the GNU Lesser General Public License as9 * published by the Free Software Foundation; either version 2.1 of10 * the License, or (at your option) any later version.11 *12 * This software is distributed in the hope that it will be useful,13 * but WITHOUT ANY WARRANTY; without even the implied warranty of14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU15 * Lesser General Public License for more details.16 *17 * You should have received a copy of the GNU Lesser General Public18 * License along with this software; if not, write to the Free19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.21 */22 package org.jboss.tm;23 24 importjavax.resource.spi.XATerminator;25 importjavax.resource.spi.work.Work;26 importjavax.resource.spi.work.WorkCompletedException;27 importjavax.transaction.xa.Xid;28 29 /**30 * Extends XATerminator to include registration calls31 *32 * @author <a HREF="adrian@jboss.com">Adrian Brock</a>33 * @version $Revision: 37459 $34 */35 publicinterface JBossXATerminator extendsXATerminator36 {37 /**38 * Invoked for transaction inflow of work39 * 40 * @param work the work starting41 * @param xid the xid of the work42 * @param timeout the transaction timeout43 * @throws WorkCompletedException with error code WorkException.TX_CONCURRENT_WORK_DISALLOWED44 * when work is already present for the xid or whose completion is in progress, only45 * the global part of the xid must be used for this check.46 */47 void registerWork(Work work, Xid xid, long timeout) throwsWorkCompletedException;48 49 /**50 * Invoked for transaction inflow of work51 * 52 * @param work the work starting53 * @param xid the xid of the work54 * @throws WorkCompletedException with error code WorkException.TX_RECREATE_FAILED if it is unable to recreate the transaction context55 */56 void startWork(Work work, Xid xid) throwsWorkCompletedException;57 58 /**59 * Invoked when transaction inflow work ends60 * 61 * @param work the work ending62 * @param xid the xid of the work63 */64 void endWork(Work work, Xid xid);65 66 /**67 * Invoked when the work fails68 * 69 * @param work the work ending70 * @param xid the xid of the work71 */72 void cancelWork(Work work, Xid xid);73 }74