Search in sources :

Example 6 with EJBClientInterceptor

use of org.jboss.ejb.client.EJBClientInterceptor in project wildfly by wildfly.

the class ClientInterceptorsBindingsProcessor method deploy.

@Override
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    try {
        final List<EJBClientInterceptor> clientInterceptors = new ArrayList<>();
        for (final Class<? extends EJBClientInterceptor> interceptorClass : clientInterceptorCache.getClientInterceptors()) {
            clientInterceptors.add(interceptorClass.newInstance());
        }
        final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
        deploymentUnit.putAttachment(org.jboss.as.ejb3.subsystem.Attachments.STATIC_EJB_CLIENT_INTERCEPTORS, clientInterceptors);
    } catch (InstantiationException | IllegalAccessException e) {
        throw new DeploymentUnitProcessingException(e);
    }
}
Also used : EJBClientInterceptor(org.jboss.ejb.client.EJBClientInterceptor) DeploymentUnitProcessingException(org.jboss.as.server.deployment.DeploymentUnitProcessingException) ArrayList(java.util.ArrayList) DeploymentUnit(org.jboss.as.server.deployment.DeploymentUnit)

Aggregations

EJBClientInterceptor (org.jboss.ejb.client.EJBClientInterceptor)6 ArrayList (java.util.ArrayList)3 DeploymentUnitProcessingException (org.jboss.as.server.deployment.DeploymentUnitProcessingException)3 IOException (java.io.IOException)2 DeploymentUnit (org.jboss.as.server.deployment.DeploymentUnit)2 ClusterNodeSelector (org.jboss.ejb.client.ClusterNodeSelector)2 EJBClientCluster (org.jboss.ejb.client.EJBClientCluster)2 EJBTransportProvider (org.jboss.ejb.client.EJBTransportProvider)2 Module (org.jboss.modules.Module)2 InjectionException (org.jboss.msc.inject.InjectionException)2 BufferedReader (java.io.BufferedReader)1 InputStream (java.io.InputStream)1 InputStreamReader (java.io.InputStreamReader)1 Method (java.lang.reflect.Method)1 URL (java.net.URL)1 HashMap (java.util.HashMap)1 Properties (java.util.Properties)1 PostConstruct (javax.annotation.PostConstruct)1 CapabilityServiceSupport (org.jboss.as.controller.capability.CapabilityServiceSupport)1 EJBClientDescriptorMetaData (org.jboss.as.ee.metadata.EJBClientDescriptorMetaData)1