Search in sources :

Example 6 with LRA

use of org.eclipse.microprofile.lra.annotation.ws.rs.LRA in project narayana by jbosstm.

the class LRAAnnotationAdjuster method adjustLRAAnnotation.

/**
 * Changing the LRA annotation declared on class by wrapping it with {@link LRAWrapped}.
 */
static void adjustLRAAnnotation(Class<?> clazzToLookFor, LRA originalLRAAnnotation) {
    if (doesJDKDefineFieldName(ANNOTATIONS_FIELD_NAME)) {
        // Open JDK7 has "annotations" field
        try {
            Field annotations = Class.class.getDeclaredField(ANNOTATIONS_FIELD_NAME);
            annotations.setAccessible(true);
            @SuppressWarnings("unchecked") Map<Class<? extends Annotation>, Annotation> map = (Map<Class<? extends Annotation>, Annotation>) annotations.get(clazzToLookFor);
            map.put(LRA.class, new LRAWrapped(originalLRAAnnotation));
        } catch (Exception e) {
            throw new IllegalStateException("Cannot change annotation " + originalLRAAnnotation + " of class " + clazzToLookFor + " in JDK7 way", e);
        }
    } else if (doesJDKDefineMethodName(ANNOTATION_DATA_METHOD_NAME)) {
        try {
            // Open JDK8+ has "annotationData" private method
            // obtaining reference to private class AnnotationData
            Method method = Class.class.getDeclaredMethod(ANNOTATION_DATA_METHOD_NAME);
            method.setAccessible(true);
            // AnnotationData is private need to work with Object
            Object annotationData = method.invoke(clazzToLookFor);
            // AnnotationData works with map annotations
            Field annotations = annotationData.getClass().getDeclaredField(ANNOTATIONS_FIELD_NAME);
            annotations.setAccessible(true);
            @SuppressWarnings("unchecked") Map<Class<? extends Annotation>, Annotation> map = (Map<Class<? extends Annotation>, Annotation>) annotations.get(annotationData);
            log.debugf("Adjusting LRA annotation %s for class %s%n", originalLRAAnnotation, clazzToLookFor.getName());
            map.put(LRA.class, new LRAWrapped(originalLRAAnnotation));
        } catch (Exception e) {
            throw new IllegalStateException("Cannot change annotation " + originalLRAAnnotation + " of class " + clazzToLookFor + " in JDK8 way", e);
        }
    } else if (doesJDKDefineFieldName(ANNOTATION_CACHE_FIELD_NAME)) {
        // OpenJ9
        try {
            Field cacheField = Class.class.getDeclaredField(ANNOTATION_CACHE_FIELD_NAME);
            cacheField.setAccessible(true);
            Object cache = cacheField.get(clazzToLookFor);
            Class<? extends Object> cacheClass = cache.getClass();
            Field mapField = cacheClass.getDeclaredField(ANNOTATION_MAP_FIELD_NAME);
            mapField.setAccessible(true);
            Map<Class<? extends Annotation>, Annotation> annotationMap = (Map<Class<? extends Annotation>, Annotation>) mapField.get(cache);
            annotationMap.put(LRA.class, new LRAWrapped(originalLRAAnnotation));
        } catch (Exception e) {
            throw new IllegalStateException("Cannot change annotation " + originalLRAAnnotation + " of class " + clazzToLookFor + " in JDK OpenJ9 way", e);
        }
    } else {
        log.warnf("Cannot adjust the timeout value of the %s annotation of class %s. The processing of %s is skipped.", originalLRAAnnotation, clazzToLookFor, LRAAnnotationAdjuster.class.getName());
    }
}
Also used : Method(java.lang.reflect.Method) Annotation(java.lang.annotation.Annotation) Field(java.lang.reflect.Field) LRA(org.eclipse.microprofile.lra.annotation.ws.rs.LRA) Map(java.util.Map)

Example 7 with LRA

use of org.eclipse.microprofile.lra.annotation.ws.rs.LRA in project narayana by jbosstm.

the class LRATest method assertStatus.

private void assertStatus(String message, URI lraId, LRAStatus... expectedValues) {
    LRAStatus status = getStatus(lraId);
    assertTrue(message + ": LRA status: " + status, Arrays.stream(expectedValues).anyMatch(s -> s == status));
}
Also used : Arrays(java.util.Arrays) Produces(javax.ws.rs.Produces) AfterLRA(org.eclipse.microprofile.lra.annotation.AfterLRA) LRAService(io.narayana.lra.coordinator.domain.service.LRAService) URISyntaxException(java.net.URISyntaxException) Path(javax.ws.rs.Path) COORDINATOR_PATH_NAME(io.narayana.lra.LRAConstants.COORDINATOR_PATH_NAME) Application(javax.ws.rs.core.Application) com.arjuna.ats.arjuna.common.arjPropertyManager(com.arjuna.ats.arjuna.common.arjPropertyManager) ParticipantStatusOctetStreamProvider(io.narayana.lra.provider.ParticipantStatusOctetStreamProvider) MediaType(javax.ws.rs.core.MediaType) QueryParam(javax.ws.rs.QueryParam) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) After(org.junit.After) DefaultValue(javax.ws.rs.DefaultValue) HeaderParam(javax.ws.rs.HeaderParam) UndertowJaxrsServer(org.jboss.resteasy.plugins.server.undertow.UndertowJaxrsServer) Assert.fail(org.junit.Assert.fail) URI(java.net.URI) DELETE(javax.ws.rs.DELETE) ServerLRAFilter(io.narayana.lra.filter.ServerLRAFilter) Forget(org.eclipse.microprofile.lra.annotation.Forget) LRA_HTTP_RECOVERY_HEADER(org.eclipse.microprofile.lra.annotation.ws.rs.LRA.LRA_HTTP_RECOVERY_HEADER) Set(java.util.Set) Entity(javax.ws.rs.client.Entity) NotFoundException(javax.ws.rs.NotFoundException) Objects(java.util.Objects) NarayanaLRAClient(io.narayana.lra.client.NarayanaLRAClient) Response(javax.ws.rs.core.Response) Assert.assertFalse(org.junit.Assert.assertFalse) WebApplicationException(javax.ws.rs.WebApplicationException) Complete(org.eclipse.microprofile.lra.annotation.Complete) Link(javax.ws.rs.core.Link) IntStream(java.util.stream.IntStream) LRA_HTTP_CONTEXT_HEADER(org.eclipse.microprofile.lra.annotation.ws.rs.LRA.LRA_HTTP_CONTEXT_HEADER) BeforeClass(org.junit.BeforeClass) GET(javax.ws.rs.GET) Client(javax.ws.rs.client.Client) HashSet(java.util.HashSet) LRARecoveryModule(io.narayana.lra.coordinator.internal.LRARecoveryModule) ClientBuilder(javax.ws.rs.client.ClientBuilder) TestName(org.junit.rules.TestName) StringTokenizer(java.util.StringTokenizer) Coordinator(io.narayana.lra.coordinator.api.Coordinator) LRA_HTTP_PARENT_CONTEXT_HEADER(org.eclipse.microprofile.lra.annotation.ws.rs.LRA.LRA_HTTP_PARENT_CONTEXT_HEADER) Before(org.junit.Before) ParticipantStatus(org.eclipse.microprofile.lra.annotation.ParticipantStatus) TestPortProvider(org.jboss.resteasy.test.TestPortProvider) Assert.assertNotNull(org.junit.Assert.assertNotNull) ApplicationPath(javax.ws.rs.ApplicationPath) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) File(java.io.File) LRAStatus(org.eclipse.microprofile.lra.annotation.LRAStatus) Rule(org.junit.Rule) ChronoUnit(java.time.temporal.ChronoUnit) Assert.assertNull(org.junit.Assert.assertNull) LRA(org.eclipse.microprofile.lra.annotation.ws.rs.LRA) Compensate(org.eclipse.microprofile.lra.annotation.Compensate) LRALogger(io.narayana.lra.logging.LRALogger) PUT(javax.ws.rs.PUT) WebTarget(javax.ws.rs.client.WebTarget) Assert(org.junit.Assert) Assert.assertEquals(org.junit.Assert.assertEquals) LRAStatus(org.eclipse.microprofile.lra.annotation.LRAStatus)

Example 8 with LRA

use of org.eclipse.microprofile.lra.annotation.ws.rs.LRA in project narayana by jbosstm.

the class ServerLRAFilter method filter.

@Override
public void filter(ContainerRequestContext containerRequestContext) {
    // Note that this filter uses abortWith instead of throwing exceptions on encountering exceptional
    // conditions. This facilitates async because filters for asynchronous JAX-RS methods are
    // not allowed to throw exceptions.
    Method method = resourceInfo.getResourceMethod();
    MultivaluedMap<String, String> headers = containerRequestContext.getHeaders();
    LRA.Type type = null;
    LRA transactional = AnnotationResolver.resolveAnnotation(LRA.class, method);
    URI lraId;
    URI newLRA = null;
    Long timeout = null;
    URI suspendedLRA = null;
    URI incommingLRA = null;
    URI recoveryUrl;
    boolean isLongRunning = false;
    boolean requiresActiveLRA = false;
    ArrayList<Progress> progress = null;
    if (transactional == null) {
        transactional = method.getDeclaringClass().getDeclaredAnnotation(LRA.class);
    }
    if (transactional != null) {
        type = transactional.value();
        isLongRunning = !transactional.end();
        Response.Status.Family[] cancel0nFamily = transactional.cancelOnFamily();
        Response.Status[] cancel0n = transactional.cancelOn();
        if (cancel0nFamily.length != 0) {
            containerRequestContext.setProperty(CANCEL_ON_FAMILY_PROP, cancel0nFamily);
        }
        if (cancel0n.length != 0) {
            containerRequestContext.setProperty(CANCEL_ON_PROP, cancel0n);
        }
        if (transactional.timeLimit() != 0) {
            timeout = Duration.of(transactional.timeLimit(), transactional.timeUnit()).toMillis();
        }
    }
    boolean endAnnotation = AnnotationResolver.isAnnotationPresent(Complete.class, method) || AnnotationResolver.isAnnotationPresent(Compensate.class, method) || AnnotationResolver.isAnnotationPresent(Leave.class, method) || AnnotationResolver.isAnnotationPresent(Status.class, method) || AnnotationResolver.isAnnotationPresent(Forget.class, method) || AnnotationResolver.isAnnotationPresent(AfterLRA.class, method);
    if (headers.containsKey(LRA_HTTP_CONTEXT_HEADER)) {
        try {
            incommingLRA = new URI(Current.getLast(headers.get(LRA_HTTP_CONTEXT_HEADER)));
        } catch (URISyntaxException e) {
            String msg = String.format("header %s contains an invalid URL %s", LRA_HTTP_CONTEXT_HEADER, Current.getLast(headers.get(LRA_HTTP_CONTEXT_HEADER)));
            abortWith(containerRequestContext, null, Response.Status.PRECONDITION_FAILED.getStatusCode(), msg, null);
            // user error, bail out
            return;
        }
        if (AnnotationResolver.isAnnotationPresent(Leave.class, method)) {
            // leave the LRA
            Map<String, String> terminateURIs = NarayanaLRAClient.getTerminationUris(resourceInfo.getResourceClass(), containerRequestContext.getUriInfo(), timeout);
            String compensatorId = terminateURIs.get("Link");
            if (compensatorId == null) {
                abortWith(containerRequestContext, incommingLRA.toASCIIString(), Response.Status.BAD_REQUEST.getStatusCode(), "Missing complete or compensate annotations", null);
                // user error, bail out
                return;
            }
            try {
                getLRAClient().leaveLRA(incommingLRA, compensatorId);
                // leave succeeded
                progress = updateProgress(progress, ProgressStep.Left, null);
            } catch (WebApplicationException e) {
                // leave may have failed
                progress = updateProgress(progress, ProgressStep.LeaveFailed, e.getMessage());
                abortWith(containerRequestContext, incommingLRA.toASCIIString(), e.getResponse().getStatus(), e.getMessage(), progress);
                // the error will be handled or reported via the response filter
                return;
            } catch (ProcessingException e) {
                // a remote coordinator was unavailable
                // leave may have failed
                progress = updateProgress(progress, ProgressStep.LeaveFailed, e.getMessage());
                abortWith(containerRequestContext, incommingLRA.toASCIIString(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), e.getMessage(), progress);
                // the error will be handled or reported via the response filter
                return;
            }
        // let the participant know which lra he left by leaving the header intact
        }
    }
    if (type == null) {
        if (!endAnnotation) {
            Current.clearContext(headers);
        }
        if (incommingLRA != null) {
            Current.push(incommingLRA);
            containerRequestContext.setProperty(SUSPENDED_LRA_PROP, incommingLRA);
        }
        // not transactional
        return;
    }
    // check the incoming request for an LRA context
    if (!headers.containsKey(LRA_HTTP_CONTEXT_HEADER)) {
        Object lraContext = containerRequestContext.getProperty(LRA_HTTP_CONTEXT_HEADER);
        if (lraContext != null) {
            incommingLRA = (URI) lraContext;
        }
    }
    if (endAnnotation && incommingLRA == null) {
        return;
    }
    if (incommingLRA != null) {
        // set the parent context header
        try {
            headers.putSingle(LRA_HTTP_PARENT_CONTEXT_HEADER, Current.getFirstParent(incommingLRA));
        } catch (UnsupportedEncodingException e) {
            abortWith(containerRequestContext, incommingLRA.toASCIIString(), Response.Status.PRECONDITION_FAILED.getStatusCode(), String.format("incoming LRA %s contains an invalid parent: %s", incommingLRA, e.getMessage()), progress);
            // any previous actions (the leave request) will be reported via the response filter
            return;
        }
    }
    switch(type) {
        case // a txn must be present
        MANDATORY:
            if (isTxInvalid(containerRequestContext, type, incommingLRA, true, progress)) {
                // any previous actions (eg the leave request) will be reported via the response filter
                return;
            }
            lraId = incommingLRA;
            requiresActiveLRA = true;
            break;
        case // a txn must not be present
        NEVER:
            if (isTxInvalid(containerRequestContext, type, incommingLRA, false, progress)) {
                // any previous actions (the leave request) will be reported via the response filter
                return;
            }
            // must not run with any context
            lraId = null;
            break;
        case NOT_SUPPORTED:
            suspendedLRA = incommingLRA;
            // must not run with any context
            lraId = null;
            break;
        case NESTED:
        // FALLTHRU
        case REQUIRED:
            if (incommingLRA != null) {
                if (type == NESTED) {
                    headers.putSingle(LRA_HTTP_PARENT_CONTEXT_HEADER, incommingLRA.toASCIIString());
                    // if there is an LRA present nest a new LRA under it
                    suspendedLRA = incommingLRA;
                    if (progress == null) {
                        progress = new ArrayList<>();
                    }
                    newLRA = lraId = startLRA(containerRequestContext, incommingLRA, method, timeout, progress);
                    if (newLRA == null) {
                        // the failure plus any previous actions (the leave request) will be reported via the response filter
                        return;
                    }
                } else {
                    lraId = incommingLRA;
                    // incomingLRA will be resumed
                    requiresActiveLRA = true;
                }
            } else {
                if (progress == null) {
                    // NB my IDE seems to think this check is redundant
                    progress = new ArrayList<>();
                }
                newLRA = lraId = startLRA(containerRequestContext, null, method, timeout, progress);
                if (newLRA == null) {
                    // the failure and any previous actions (the leave request) will be reported via the response filter
                    return;
                }
            }
            break;
        case REQUIRES_NEW:
            // previous = AtomicAction.suspend();
            suspendedLRA = incommingLRA;
            if (progress == null) {
                progress = new ArrayList<>();
            }
            newLRA = lraId = startLRA(containerRequestContext, null, method, timeout, progress);
            if (newLRA == null) {
                // the failure and any previous actions (the leave request) will be reported via the response filter
                return;
            }
            break;
        case SUPPORTS:
            lraId = incommingLRA;
            break;
        default:
            lraId = incommingLRA;
    }
    if (lraId == null) {
        // the method call needs to run without a transaction
        Current.clearContext(headers);
        if (suspendedLRA != null) {
            containerRequestContext.setProperty(SUSPENDED_LRA_PROP, suspendedLRA);
        }
        // non transactional
        return;
    }
    if (!isLongRunning) {
        containerRequestContext.setProperty(TERMINAL_LRA_PROP, lraId);
    }
    // store state with the current thread. TODO for the async version use containerRequestContext.setProperty("lra", Current.peek());
    // make the current LRA available to the called method
    Current.updateLRAContext(lraId, headers);
    if (newLRA != null) {
        if (suspendedLRA != null) {
            containerRequestContext.setProperty(SUSPENDED_LRA_PROP, incommingLRA);
        }
        containerRequestContext.setProperty(NEW_LRA_PROP, newLRA);
    }
    Current.push(lraId);
    try {
        // make the current LRA available to the called method
        getLRAClient().setCurrentLRA(lraId);
    } catch (Exception e) {
        // should not happen since lraId has already been validated
        // (perhaps we should not use the client API to set the context)
        abortWith(containerRequestContext, lraId.toASCIIString(), Response.Status.BAD_REQUEST.getStatusCode(), e.getMessage(), progress);
        // any previous actions (such as leave and start requests) will be reported via the response filter
        return;
    }
    // TODO make sure it is possible to do compensations inside a new LRA
    if (!endAnnotation) {
        // don't enlist for methods marked with Compensate, Complete or Leave
        URI baseUri = containerRequestContext.getUriInfo().getBaseUri();
        Map<String, String> terminateURIs = NarayanaLRAClient.getTerminationUris(resourceInfo.getResourceClass(), containerRequestContext.getUriInfo(), timeout);
        String timeLimitStr = terminateURIs.get(TIMELIMIT_PARAM_NAME);
        long timeLimit = timeLimitStr == null ? DEFAULT_TIMEOUT_MILLIS : Long.parseLong(timeLimitStr);
        LRAParticipant participant = lraParticipantRegistry != null ? lraParticipantRegistry.getParticipant(resourceInfo.getResourceClass().getName()) : null;
        if (terminateURIs.containsKey("Link") || participant != null) {
            try {
                if (participant != null) {
                    participant.augmentTerminationURIs(terminateURIs, baseUri);
                }
                recoveryUrl = getLRAClient().joinLRA(lraId, timeLimit, toURI(terminateURIs.get(COMPENSATE)), toURI(terminateURIs.get(COMPLETE)), toURI(terminateURIs.get(FORGET)), toURI(terminateURIs.get(LEAVE)), toURI(terminateURIs.get(AFTER)), toURI(terminateURIs.get(STATUS)), null);
                progress = updateProgress(progress, ProgressStep.Joined, null);
                headers.putSingle(LRA_HTTP_RECOVERY_HEADER, START_END_QUOTES_PATTERN.matcher(recoveryUrl.toASCIIString()).replaceAll(""));
            } catch (WebApplicationException e) {
                progress = updateProgress(progress, ProgressStep.JoinFailed, e.getMessage());
                abortWith(containerRequestContext, lraId.toASCIIString(), e.getResponse().getStatus(), String.format("%s: %s", e.getClass().getSimpleName(), e.getMessage()), progress);
            // the failure plus any previous actions (such as leave and start requests) will be reported via the response filter
            } catch (URISyntaxException e) {
                // one or more of the participant end points was invalid
                progress = updateProgress(progress, ProgressStep.JoinFailed, e.getMessage());
                abortWith(containerRequestContext, lraId.toASCIIString(), Response.Status.BAD_REQUEST.getStatusCode(), String.format("%s %s: %s", lraId, e.getClass().getSimpleName(), e.getMessage()), progress);
            // the failure plus any previous actions (such as leave and start requests) will be reported via the response filter
            } catch (ProcessingException e) {
                // a remote coordinator was unavailable
                progress = updateProgress(progress, ProgressStep.JoinFailed, e.getMessage());
                abortWith(containerRequestContext, lraId.toASCIIString(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), String.format("%s %s,", e.getClass().getSimpleName(), e.getMessage()), progress);
            // the failure plus any previous actions (such as leave and start requests) will be reported via the response filter
            }
        } else if (requiresActiveLRA && getLRAClient().getStatus(lraId) != LRAStatus.Active) {
            Current.clearContext(headers);
            Current.pop(lraId);
            containerRequestContext.removeProperty(SUSPENDED_LRA_PROP);
            if (type == MANDATORY) {
                abortWith(containerRequestContext, lraId.toASCIIString(), Response.Status.PRECONDITION_FAILED.getStatusCode(), "LRA should have been active: ", progress);
            // any previous actions (such as leave and start requests) will be reported via the response filter
            }
        }
    }
}
Also used : WebApplicationException(javax.ws.rs.WebApplicationException) Complete(org.eclipse.microprofile.lra.annotation.Complete) Compensate(org.eclipse.microprofile.lra.annotation.Compensate) URISyntaxException(java.net.URISyntaxException) URI(java.net.URI) ProcessingException(javax.ws.rs.ProcessingException) Status(org.eclipse.microprofile.lra.annotation.Status) LRAStatus(org.eclipse.microprofile.lra.annotation.LRAStatus) AfterLRA(org.eclipse.microprofile.lra.annotation.AfterLRA) UnsupportedEncodingException(java.io.UnsupportedEncodingException) LRAParticipant(io.narayana.lra.client.internal.proxy.nonjaxrs.LRAParticipant) Method(java.lang.reflect.Method) URISyntaxException(java.net.URISyntaxException) NotFoundException(javax.ws.rs.NotFoundException) ProcessingException(javax.ws.rs.ProcessingException) WebApplicationException(javax.ws.rs.WebApplicationException) UnsupportedEncodingException(java.io.UnsupportedEncodingException) Response(javax.ws.rs.core.Response) AfterLRA(org.eclipse.microprofile.lra.annotation.AfterLRA) LRA(org.eclipse.microprofile.lra.annotation.ws.rs.LRA)

Example 9 with LRA

use of org.eclipse.microprofile.lra.annotation.ws.rs.LRA in project helidon by oracle.

the class InspectionService method lookUpLraAnnotations.

Set<AnnotationInstance> lookUpLraAnnotations(Method method) {
    ClassInfo declaringClazz = index.getClassByName(DotName.createSimple(method.getDeclaringClass().getName()));
    if (declaringClazz == null) {
        throw new DeploymentException("Can't find indexed declaring class of method " + method);
    }
    Type[] params = Arrays.stream(method.getParameterTypes()).map(c -> Type.create(DotName.createSimple(c.getName()), Type.Kind.CLASS)).toArray(Type[]::new);
    MethodInfo methodInfo = declaringClazz.method(method.getName(), params);
    if (methodInfo == null) {
        throw new DeploymentException("LRA method " + method + " not found indexed in class " + declaringClazz.name());
    }
    return lookUpLraAnnotations(methodInfo);
}
Also used : Arrays(java.util.Arrays) AfterLRA(org.eclipse.microprofile.lra.annotation.AfterLRA) DotName(org.jboss.jandex.DotName) Type(org.jboss.jandex.Type) HashMap(java.util.HashMap) ClassInfo(org.jboss.jandex.ClassInfo) Function(java.util.function.Function) ArrayList(java.util.ArrayList) Level(java.util.logging.Level) Leave(org.eclipse.microprofile.lra.annotation.ws.rs.Leave) HashSet(java.util.HashSet) Response(jakarta.ws.rs.core.Response) MethodInfo(org.jboss.jandex.MethodInfo) Status(org.eclipse.microprofile.lra.annotation.Status) Map(java.util.Map) DeploymentException(jakarta.enterprise.inject.spi.DeploymentException) Reflected(io.helidon.common.Reflected) Method(java.lang.reflect.Method) IndexView(org.jboss.jandex.IndexView) AnnotationValue(org.jboss.jandex.AnnotationValue) Forget(org.eclipse.microprofile.lra.annotation.Forget) Set(java.util.Set) Logger(java.util.logging.Logger) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) List(java.util.List) ChronoUnit(java.time.temporal.ChronoUnit) Stream(java.util.stream.Stream) LRA(org.eclipse.microprofile.lra.annotation.ws.rs.LRA) AnnotationInstance(org.jboss.jandex.AnnotationInstance) Compensate(org.eclipse.microprofile.lra.annotation.Compensate) Optional(java.util.Optional) Complete(org.eclipse.microprofile.lra.annotation.Complete) Inject(jakarta.inject.Inject) Type(org.jboss.jandex.Type) DeploymentException(jakarta.enterprise.inject.spi.DeploymentException) MethodInfo(org.jboss.jandex.MethodInfo) ClassInfo(org.jboss.jandex.ClassInfo)

Aggregations

LRA (org.eclipse.microprofile.lra.annotation.ws.rs.LRA)9 URI (java.net.URI)6 AfterLRA (org.eclipse.microprofile.lra.annotation.AfterLRA)5 Compensate (org.eclipse.microprofile.lra.annotation.Compensate)5 Complete (org.eclipse.microprofile.lra.annotation.Complete)5 Method (java.lang.reflect.Method)4 Arrays (java.util.Arrays)4 HashSet (java.util.HashSet)4 Set (java.util.Set)4 NotFoundException (javax.ws.rs.NotFoundException)4 WebApplicationException (javax.ws.rs.WebApplicationException)4 Forget (org.eclipse.microprofile.lra.annotation.Forget)4 URISyntaxException (java.net.URISyntaxException)3 ChronoUnit (java.time.temporal.ChronoUnit)3 Map (java.util.Map)3 Objects (java.util.Objects)3 GET (javax.ws.rs.GET)3 Path (javax.ws.rs.Path)3 com.arjuna.ats.arjuna.common.arjPropertyManager (com.arjuna.ats.arjuna.common.arjPropertyManager)2 COORDINATOR_PATH_NAME (io.narayana.lra.LRAConstants.COORDINATOR_PATH_NAME)2