Search in sources :

Example 6 with ParticipantException

use of org.jboss.narayana.rest.integration.api.ParticipantException in project narayana by jbosstm.

the class ParticipantsManagerImpl method enlistVolatileParticipant.

private void enlistVolatileParticipant(final String participantUrl, final String volatileParticipantEnlistmentURL) {
    final StringBuilder linkHeader = new StringBuilder();
    linkHeader.append("<").append(participantUrl).append(">; rel=\"").append(TxLinkNames.VOLATILE_PARTICIPANT).append("\"");
    final String participantLinkHeader = linkHeader.toString();
    try {
        new TxSupport().enlistVolatileParticipant(volatileParticipantEnlistmentURL, participantLinkHeader);
    } catch (HttpResponseException e) {
        throw new ParticipantException("Failed to enlist volatile participant", e);
    }
}
Also used : TxSupport(org.jboss.jbossts.star.util.TxSupport) HttpResponseException(org.jboss.jbossts.star.provider.HttpResponseException) ParticipantException(org.jboss.narayana.rest.integration.api.ParticipantException)

Aggregations

ParticipantException (org.jboss.narayana.rest.integration.api.ParticipantException)6 HeuristicException (org.jboss.narayana.rest.integration.api.HeuristicException)3 HttpResponseException (org.jboss.jbossts.star.provider.HttpResponseException)2 TxSupport (org.jboss.jbossts.star.util.TxSupport)2 InputObjectState (com.arjuna.ats.arjuna.state.InputObjectState)1 Aborted (org.jboss.narayana.rest.integration.api.Aborted)1 Participant (org.jboss.narayana.rest.integration.api.Participant)1 PersistableParticipant (org.jboss.narayana.rest.integration.api.PersistableParticipant)1 Prepared (org.jboss.narayana.rest.integration.api.Prepared)1 ReadOnly (org.jboss.narayana.rest.integration.api.ReadOnly)1 Vote (org.jboss.narayana.rest.integration.api.Vote)1