fix(distro-wildfly): disable Naryana TX interceptor that causes NPE
Don't want duplicated TX interceptors anyway.
MODIFY
manager/api/rest-impl/src/main/java/io/apiman/manager/api/service/ActionService.java
manager/api/rest-impl/src/main/java/io/apiman/manager/api/service/ActionService.java
@@ -79,7 +79,6 @@ public class ActionService implements DataAccessUtilMixin {
private final UserMapper userMapper = UserMapper.INSTANCE;
private IStorage storage;
private ISecurityContext securityContext;
- private ApiService apiService;
private PlanService planService;
private ContractService contractService;
private IStorageQuery query;
@@ -91,7 +90,6 @@ public class ActionService implements DataAccessUtilMixin {
@Inject
public ActionService(IStorage storage,
ISecurityContext securityContext,
- ApiService apiService,
PlanService planService,
IStorageQuery query,
ContractService contractService,
@@ -101,7 +99,6 @@ public class ActionService implements DataAccessUtilMixin {
IGatewayLinkFactory gatewayLinkFactory) {
this.storage = storage;
this.securityContext = securityContext;
- this.apiService = apiService;
this.planService = planService;
this.query = query;
this.contractService = contractService;

ADD
manager/api/war/wildfly8/src/main/java/io/apiman/manager/api/war/wildfly8/DisableNarayanaTxInterceptor.java
+package io.apiman.manager.api.war.wildfly8;
+
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.spi.Interceptor;
+import javax.enterprise.inject.spi.ProcessAnnotatedType;
+import javax.enterprise.inject.spi.WithAnnotations;
+
+/**
+ *
+ *
+ * @author Marc Savy {@literal <marc@blackparrotlabs.io>}
+ */
+//META-INF/services/jakarta.enterprise.inject.spi.Extension
+public class DisableNarayanaTxInterceptor implements javax.enterprise.inject.spi.Extension {
+
+ <T> void processAnnotatedType(@Observes @WithAnnotations({ javax.interceptor.Interceptor.class}) ProcessAnnotatedType<T> pat) {
+ /* tell the container to ignore the type if it is annotated @Ignore */
+ if (pat.getAnnotatedType().isAnnotationPresent(javax.interceptor.Interceptor.class)
+ && pat.getAnnotatedType().getJavaClass().getName().startsWith("com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptor")) {
+ pat.veto();
+ System.out.println("Vetoed Narayana interceptor " + pat.getAnnotatedType().getJavaClass().getName());
+ }
+ }
+}

ADD
manager/api/war/wildfly8/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
+io.apiman.manager.api.war.wildfly8.DisableNarayanaTxInterceptor

fix(distro-wildfly): disable Naryana TX interceptor that causes NPE

Don't want duplicated TX interceptors anyway.