Search in sources :

Example 41 with TransactionRolledBackException

use of com.arjuna.wst.TransactionRolledBackException in project narayana by jbosstm.

the class TestClient method doGet.

public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    try {
        UserTransaction ut = UserTransactionFactory.userTransaction();
        log.info("starting the transaction...");
        ut.begin();
        log.info("transaction ID= " + ut.toString());
        log.info("calling business Web Services...");
        testService.doNothing();
        log.info("terminating the transaction...");
        terminateTransaction(ut, false);
    } catch (final TransactionRolledBackException tre) {
        log.info("Transaction rolled back");
    } catch (Exception e) {
        log.info("problem: ", e);
    }
    response.setContentType("text/plain");
    PrintWriter out = response.getWriter();
    out.println("finished");
    out.close();
}
Also used : UserTransaction(com.arjuna.mw.wst11.UserTransaction) TransactionRolledBackException(com.arjuna.wst.TransactionRolledBackException) ServletException(javax.servlet.ServletException) TransactionRolledBackException(com.arjuna.wst.TransactionRolledBackException) IOException(java.io.IOException) UnknownHostException(java.net.UnknownHostException) PrintWriter(java.io.PrintWriter)

Aggregations

TransactionRolledBackException (com.arjuna.wst.TransactionRolledBackException)41 SystemException (com.arjuna.wst.SystemException)29 UnknownTransactionException (com.arjuna.wst.UnknownTransactionException)29 WrongStateException (com.arjuna.wst.WrongStateException)22 ArrayList (java.util.ArrayList)18 UserBusinessActivity (com.arjuna.mw.wst11.UserBusinessActivity)15 CompletionCoordinatorParticipant (com.arjuna.wst.CompletionCoordinatorParticipant)8 CoordinationContextType (org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType)8 UserTransaction (com.arjuna.mw.wst11.UserTransaction)7 SoapFault (com.arjuna.webservices.SoapFault)5 InstanceIdentifier (com.arjuna.webservices11.wsarj.InstanceIdentifier)5 W3CEndpointReference (javax.xml.ws.wsaddressing.W3CEndpointReference)5 MAP (org.jboss.ws.api.addressing.MAP)5 InvalidCreateParametersException (com.arjuna.wsc.InvalidCreateParametersException)4 Test (org.junit.Test)3 TxContext (com.arjuna.mw.wst.TxContext)2 TransactionManager (com.arjuna.mw.wst11.TransactionManager)2 TxContextImple (com.arjuna.mwlabs.wst11.at.context.TxContextImple)2 TxContextImple (com.arjuna.mwlabs.wst11.ba.context.TxContextImple)2 SoapFault11 (com.arjuna.webservices11.SoapFault11)2