Skip to content

Commit

Permalink
[WFLY-7581] Drop the use of the org.jboss.invocation.PrivilegedWithCo…
Browse files Browse the repository at this point in the history
…mbinerInterceptor to be compatible with JBoss Invocation 1.5.0
  • Loading branch information
fjuma committed Nov 14, 2016
1 parent f111bc1 commit eb32159
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import org.jboss.invocation.ImmediateInterceptorFactory;
import org.jboss.invocation.InterceptorFactory;
import org.jboss.invocation.Interceptors;
import org.jboss.invocation.PrivilegedWithCombinerInterceptor;
import org.jboss.invocation.proxy.MethodIdentifier;
import org.jboss.modules.Module;

Expand Down Expand Up @@ -119,7 +118,6 @@ private void handleClassMethod(final Class<?> clazz, final MethodIdentifier meth

final ClassLoader classLoader = module.getClassLoader();
final InterceptorFactory tcclInterceptor = new ImmediateInterceptorFactory(new ContextClassLoaderInterceptor(classLoader));
final InterceptorFactory privilegedInterceptor = PrivilegedWithCombinerInterceptor.getFactory();


if (!injectors.isEmpty()) {
Expand All @@ -131,7 +129,6 @@ private void handleClassMethod(final Class<?> clazz, final MethodIdentifier meth
}
configuration.addPostConstructInterceptor(Interceptors.getTerminalInterceptorFactory(), InterceptorOrder.ComponentPostConstruct.TERMINAL_INTERCEPTOR);
configuration.addPostConstructInterceptor(tcclInterceptor, InterceptorOrder.ComponentPostConstruct.TCCL_INTERCEPTOR);
configuration.addPostConstructInterceptor(privilegedInterceptor, InterceptorOrder.ComponentPostConstruct.PRIVILEGED_INTERCEPTOR);

// Apply pre-destroy
if (!uninjectors.isEmpty()) {
Expand All @@ -145,21 +142,18 @@ private void handleClassMethod(final Class<?> clazz, final MethodIdentifier meth
}
configuration.addPreDestroyInterceptor(Interceptors.getTerminalInterceptorFactory(), InterceptorOrder.ComponentPreDestroy.TERMINAL_INTERCEPTOR);
configuration.addPreDestroyInterceptor(tcclInterceptor, InterceptorOrder.ComponentPreDestroy.TCCL_INTERCEPTOR);
configuration.addPreDestroyInterceptor(privilegedInterceptor, InterceptorOrder.ComponentPreDestroy.PRIVILEGED_INTERCEPTOR);

if (description.isPassivationApplicable()) {
if (!componentUserPrePassivate.isEmpty()) {
configuration.addPrePassivateInterceptors(componentUserPrePassivate, InterceptorOrder.ComponentPassivation.COMPONENT_USER_INTERCEPTORS);
}
configuration.addPrePassivateInterceptor(Interceptors.getTerminalInterceptorFactory(), InterceptorOrder.ComponentPassivation.TERMINAL_INTERCEPTOR);
configuration.addPrePassivateInterceptor(tcclInterceptor, InterceptorOrder.ComponentPassivation.TCCL_INTERCEPTOR);
configuration.addPrePassivateInterceptor(privilegedInterceptor, InterceptorOrder.ComponentPassivation.PRIVILEGED_INTERCEPTOR);
if (!componentUserPostActivate.isEmpty()) {
configuration.addPostActivateInterceptors(componentUserPostActivate, InterceptorOrder.ComponentPassivation.COMPONENT_USER_INTERCEPTORS);
}
configuration.addPostActivateInterceptor(Interceptors.getTerminalInterceptorFactory(), InterceptorOrder.ComponentPassivation.TERMINAL_INTERCEPTOR);
configuration.addPostActivateInterceptor(tcclInterceptor, InterceptorOrder.ComponentPassivation.TCCL_INTERCEPTOR);
configuration.addPostActivateInterceptor(privilegedInterceptor, InterceptorOrder.ComponentPassivation.PRIVILEGED_INTERCEPTOR);
}

// @AroundInvoke interceptors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ private AroundConstruct() {
public static final class ComponentPostConstruct {

public static final int STARTUP_COUNTDOWN_INTERCEPTOR = 0x050;
public static final int PRIVILEGED_INTERCEPTOR = 0;
public static final int TCCL_INTERCEPTOR = 0x100;
public static final int CONCURRENT_CONTEXT = 0x180;
public static final int EJB_SESSION_CONTEXT_INTERCEPTOR = 0x200;
Expand Down Expand Up @@ -121,7 +120,6 @@ private ComponentPostConstruct() {

public static final class ComponentPreDestroy {

public static final int PRIVILEGED_INTERCEPTOR = 0;
public static final int TCCL_INTERCEPTOR = 0x100;
public static final int CONCURRENT_CONTEXT = 0x180;
public static final int EJB_SESSION_CONTEXT_INTERCEPTOR = 0x200;
Expand All @@ -144,7 +142,6 @@ private ComponentPreDestroy() {

public static final class ComponentPassivation {

public static final int PRIVILEGED_INTERCEPTOR = 0;
public static final int TCCL_INTERCEPTOR = 0x100;
public static final int CONCURRENT_CONTEXT = 0x180;
public static final int EJB_SESSION_CONTEXT_INTERCEPTOR = 0x200;
Expand All @@ -161,7 +158,6 @@ private ComponentPassivation() {
}

public static final class View {
public static final int PRIVILEGED_INTERCEPTOR = 0;
public static final int CHECKING_INTERCEPTOR = 1;
public static final int TCCL_INTERCEPTOR = 0x003;
public static final int INVOCATION_TYPE = 0x005;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
import org.jboss.invocation.AccessCheckingInterceptor;
import org.jboss.invocation.ContextClassLoaderInterceptor;
import org.jboss.invocation.ImmediateInterceptorFactory;
import org.jboss.invocation.PrivilegedWithCombinerInterceptor;
import org.jboss.jandex.AnnotationInstance;
import org.jboss.jandex.AnnotationTarget;
import org.jboss.jandex.AnnotationValue;
Expand Down Expand Up @@ -115,7 +114,6 @@ public void configure(final DeploymentPhaseContext context, final ComponentConfi
// Add MB association interceptors
configuration.addClientPostConstructInterceptor(ManagedBeanCreateInterceptor.FACTORY, InterceptorOrder.ClientPostConstruct.INSTANCE_CREATE);
final ClassLoader classLoader = componentConfiguration.getModuleClassLoader();
configuration.addViewInterceptor(PrivilegedWithCombinerInterceptor.getFactory(), InterceptorOrder.View.PRIVILEGED_INTERCEPTOR);
configuration.addViewInterceptor(AccessCheckingInterceptor.getFactory(), InterceptorOrder.View.CHECKING_INTERCEPTOR);
configuration.addViewInterceptor(new ImmediateInterceptorFactory(new ContextClassLoaderInterceptor(classLoader)), InterceptorOrder.View.TCCL_INTERCEPTOR);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
import org.jboss.invocation.Interceptor;
import org.jboss.invocation.InterceptorContext;
import org.jboss.invocation.InterceptorFactory;
import org.jboss.invocation.PrivilegedWithCombinerInterceptor;
import org.jboss.invocation.proxy.MethodIdentifier;
import org.jboss.metadata.ejb.spec.EnterpriseBeanMetaData;
import org.jboss.metadata.javaee.spec.SecurityRolesMetaData;
Expand Down Expand Up @@ -342,7 +341,6 @@ public void configure(final DeploymentPhaseContext context, final ComponentDescr
configuration.addTimeoutViewInterceptor(shutDownInterceptorFactory, InterceptorOrder.View.SHUTDOWN_INTERCEPTOR);

final ClassLoader classLoader = configuration.getModuleClassLoader();
configuration.addTimeoutViewInterceptor(PrivilegedWithCombinerInterceptor.getFactory(), InterceptorOrder.View.PRIVILEGED_INTERCEPTOR);
configuration.addTimeoutViewInterceptor(AccessCheckingInterceptor.getFactory(), InterceptorOrder.View.CHECKING_INTERCEPTOR);
configuration.addTimeoutViewInterceptor(new ImmediateInterceptorFactory(new ContextClassLoaderInterceptor(classLoader)), InterceptorOrder.View.TCCL_INTERCEPTOR);
configuration.addTimeoutViewInterceptor(configuration.getNamespaceContextInterceptorFactory(), InterceptorOrder.View.JNDI_NAMESPACE_INTERCEPTOR);
Expand Down Expand Up @@ -447,7 +445,6 @@ protected void setupViewInterceptors(final EJBViewDescription view) {
public void configure(DeploymentPhaseContext context, ComponentConfiguration componentConfiguration, ViewDescription description, ViewConfiguration viewConfiguration) throws DeploymentUnitProcessingException {
viewConfiguration.addViewInterceptor(LoggingInterceptor.FACTORY, InterceptorOrder.View.EJB_EXCEPTION_LOGGING_INTERCEPTOR);
final ClassLoader classLoader = componentConfiguration.getModuleClassLoader();
viewConfiguration.addViewInterceptor(PrivilegedWithCombinerInterceptor.getFactory(), InterceptorOrder.View.PRIVILEGED_INTERCEPTOR);
viewConfiguration.addViewInterceptor(AccessCheckingInterceptor.getFactory(), InterceptorOrder.View.CHECKING_INTERCEPTOR);
viewConfiguration.addViewInterceptor(new ImmediateInterceptorFactory(new ContextClassLoaderInterceptor(classLoader)), InterceptorOrder.View.TCCL_INTERCEPTOR);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import org.jboss.as.webservices.injection.WSComponentDescription;
import org.jboss.as.webservices.service.EndpointService;
import org.jboss.invocation.AccessCheckingInterceptor;
import org.jboss.invocation.PrivilegedWithCombinerInterceptor;
import org.jboss.jandex.ClassInfo;
import org.jboss.msc.service.ServiceBuilder;
import org.jboss.msc.service.ServiceName;
Expand Down Expand Up @@ -101,7 +100,6 @@ static ServiceName registerView(final ComponentDescription componentDescription,
pojoView.getConfigurators().add(new ViewConfigurator() {
@Override
public void configure(DeploymentPhaseContext context, ComponentConfiguration componentConfiguration, ViewDescription description, ViewConfiguration configuration) throws DeploymentUnitProcessingException {
configuration.addViewInterceptor(PrivilegedWithCombinerInterceptor.getFactory(), InterceptorOrder.View.PRIVILEGED_INTERCEPTOR);
configuration.addViewInterceptor(AccessCheckingInterceptor.getFactory(), InterceptorOrder.View.CHECKING_INTERCEPTOR);
// add WS POJO component instance associating interceptor
configuration.addViewInterceptor(WSComponentInstanceAssociationInterceptor.FACTORY, InterceptorOrder.View.ASSOCIATING_INTERCEPTOR);
Expand Down

0 comments on commit eb32159

Please sign in to comment.