blob: 9f2d336505c70e3ba8f1d1b1b27415ca7d7a42e6 [file] [log] [blame]
package org.apache.aries.tx.control.itests.service;
import javax.transaction.xa.XAException;
import javax.transaction.xa.Xid;
import org.osgi.service.transaction.control.TransactionException;
public class PoisonResource extends RecordingResource {
@Override
public void commit(Xid arg0, boolean arg1) throws XAException {
super.commit(arg0, arg1);
throw new XAException(XAException.XA_RBOTHER);
}
@Override
public int prepare(Xid arg0) throws XAException {
super.prepare(arg0);
throw new XAException(XAException.XA_RBOTHER);
}
@Override
public void commit() throws TransactionException {
super.commit();
throw new TransactionException("Poison");
}
}