Search in sources :

Example 1 with CompletionCoordinatorDetails

use of com.arjuna.wst.tests.arq.TestCompletionCoordinatorProcessor.CompletionCoordinatorDetails in project narayana by jbosstm.

the class CompletionParticipantTest method testSendCommit.

@Test
public void testSendCommit() throws Exception {
    final String messageId = "testSendCommit";
    final MAP map = AddressingHelper.createRequestContext(TestUtil.completionCoordinatorServiceURI, messageId);
    final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("1");
    final W3CEndpointReference endpoint = TestUtil.getCompletionCoordinatorEndpoint(instanceIdentifier.getInstanceIdentifier());
    CompletionCoordinatorClient.getClient().sendCommit(endpoint, map, new InstanceIdentifier("sender"));
    final CompletionCoordinatorDetails details = testCompletionCoordinatorProcessor.getCompletionCoordinatorDetails(messageId, 10000);
    assertTrue(details.hasCommit());
    checkDetails(details, true, true, messageId, instanceIdentifier);
}
Also used : W3CEndpointReference(javax.xml.ws.wsaddressing.W3CEndpointReference) CompletionCoordinatorDetails(com.arjuna.wst.tests.arq.TestCompletionCoordinatorProcessor.CompletionCoordinatorDetails) InstanceIdentifier(com.arjuna.webservices11.wsarj.InstanceIdentifier) MAP(org.jboss.ws.api.addressing.MAP) Test(org.junit.Test)

Example 2 with CompletionCoordinatorDetails

use of com.arjuna.wst.tests.arq.TestCompletionCoordinatorProcessor.CompletionCoordinatorDetails in project narayana by jbosstm.

the class CompletionParticipantTest method testSendRollback.

@Test
public void testSendRollback() throws Exception {
    final String messageId = "testSendRollback";
    final MAP map = AddressingHelper.createRequestContext(TestUtil.completionCoordinatorServiceURI, messageId);
    final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("2");
    final W3CEndpointReference endpoint = TestUtil.getCompletionCoordinatorEndpoint(instanceIdentifier.getInstanceIdentifier());
    CompletionCoordinatorClient.getClient().sendRollback(endpoint, map, new InstanceIdentifier("sender"));
    final CompletionCoordinatorDetails details = testCompletionCoordinatorProcessor.getCompletionCoordinatorDetails(messageId, 10000);
    assertTrue(details.hasRollback());
    checkDetails(details, true, true, messageId, instanceIdentifier);
}
Also used : W3CEndpointReference(javax.xml.ws.wsaddressing.W3CEndpointReference) CompletionCoordinatorDetails(com.arjuna.wst.tests.arq.TestCompletionCoordinatorProcessor.CompletionCoordinatorDetails) InstanceIdentifier(com.arjuna.webservices11.wsarj.InstanceIdentifier) MAP(org.jboss.ws.api.addressing.MAP) Test(org.junit.Test)

Aggregations

InstanceIdentifier (com.arjuna.webservices11.wsarj.InstanceIdentifier)2 CompletionCoordinatorDetails (com.arjuna.wst.tests.arq.TestCompletionCoordinatorProcessor.CompletionCoordinatorDetails)2 W3CEndpointReference (javax.xml.ws.wsaddressing.W3CEndpointReference)2 MAP (org.jboss.ws.api.addressing.MAP)2 Test (org.junit.Test)2