/jboss-as-7.1.1.Final/ejb3/src/main/java/org/jboss/as/ejb3/component/interceptors/HomeRemoveInterceptor.java

# · Java · 28 lines · 17 code · 6 blank · 5 comment · 0 complexity · 87e7c2aeed442b6f2c182ec2b4724c0f MD5 · raw file

  1. package org.jboss.as.ejb3.component.interceptors;
  2. import javax.ejb.Handle;
  3. import org.jboss.invocation.ImmediateInterceptorFactory;
  4. import org.jboss.invocation.Interceptor;
  5. import org.jboss.invocation.InterceptorContext;
  6. import org.jboss.invocation.InterceptorFactory;
  7. /**
  8. *
  9. *
  10. * @author Stuart Douglas
  11. */
  12. public class HomeRemoveInterceptor implements Interceptor {
  13. public static final InterceptorFactory FACTORY = new ImmediateInterceptorFactory(new HomeRemoveInterceptor());
  14. private HomeRemoveInterceptor() {
  15. }
  16. @Override
  17. public Object processInvocation(final InterceptorContext context) throws Exception {
  18. final Handle handle = (Handle) context.getParameters()[0];
  19. handle.getEJBObject().remove();
  20. return null;
  21. }
  22. }