Search in sources :

Example 1 with LRAParticipantRegistry

use of io.narayana.lra.client.internal.proxy.nonjaxrs.LRAParticipantRegistry in project quarkus by quarkusio.

the class NarayanaLRARecorder method setParticipantTypes.

public void setParticipantTypes(List<String> classNames) {
    Map<String, LRAParticipant> nonJaxParticipants = new HashMap<>();
    for (String className : classNames) {
        try {
            Class<?> clazz = Class.forName(className, false, Thread.currentThread().getContextClassLoader());
            LRAParticipant lraParticipant = new LRAParticipant(clazz);
            nonJaxParticipants.put(className, lraParticipant);
        } catch (ClassNotFoundException e) {
            log.errorf("Unable to proxy class %s (%s)", className, e.getMessage());
        }
    }
    registry = new LRAParticipantRegistry(nonJaxParticipants);
}
Also used : LRAParticipantRegistry(io.narayana.lra.client.internal.proxy.nonjaxrs.LRAParticipantRegistry) HashMap(java.util.HashMap) LRAParticipant(io.narayana.lra.client.internal.proxy.nonjaxrs.LRAParticipant)

Aggregations

LRAParticipant (io.narayana.lra.client.internal.proxy.nonjaxrs.LRAParticipant)1 LRAParticipantRegistry (io.narayana.lra.client.internal.proxy.nonjaxrs.LRAParticipantRegistry)1 HashMap (java.util.HashMap)1