org.apache.webbeans.ejb.common.interceptor
Class OpenWebBeansEjbInterceptor

java.lang.Object
  extended by org.apache.webbeans.ejb.common.interceptor.OpenWebBeansEjbInterceptor
All Implemented Interfaces:
Serializable

public class OpenWebBeansEjbInterceptor
extends Object
implements Serializable

EJB interceptor that is responsible for injection dependent instances, and call OWB based interceptors and decorators.

Version:
$Rev$ $Date$
See Also:
Serialized Form

Field Summary
protected  Map<Method,List<InterceptorData>> interceptedMethodMap
          Intercepted methods
protected  Map<Method,List<InterceptorData>> nonCtxInterceptedMethodMap
          Non contextual Intercepted methods
 
Constructor Summary
OpenWebBeansEjbInterceptor()
          Creates a new instance.
 
Method Summary
 void afterActivate(javax.interceptor.InvocationContext context)
          PostActivate callback
 void afterConstruct(javax.interceptor.InvocationContext context)
          Post construct.
 void beforePassivate(javax.interceptor.InvocationContext context)
          PrePassivate callback
 Object callAroundTimeouts(javax.interceptor.InvocationContext context)
          Around Timeout.
 Object callToOwbInterceptors(javax.interceptor.InvocationContext ejbContext)
          Called for every business methods.
static BaseEjbBean<?> getEjbBean()
           
static javax.enterprise.context.spi.CreationalContext<?> getThreadCreationalContext()
           
 void lifecycleCommon(javax.interceptor.InvocationContext context, InterceptorType interceptorType)
           
 void preDestroy(javax.interceptor.InvocationContext context)
          Pre destroy.
static void setThreadLocal(BaseEjbBean<?> ejbBean, javax.enterprise.context.spi.CreationalContext<?> creationalContext)
          Sets thread local.
static void unsetThreadLocal()
          Remove locals.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

interceptedMethodMap

protected transient Map<Method,List<InterceptorData>> interceptedMethodMap
Intercepted methods


nonCtxInterceptedMethodMap

protected transient Map<Method,List<InterceptorData>> nonCtxInterceptedMethodMap
Non contextual Intercepted methods

Constructor Detail

OpenWebBeansEjbInterceptor

public OpenWebBeansEjbInterceptor()
Creates a new instance.

Method Detail

setThreadLocal

public static void setThreadLocal(BaseEjbBean<?> ejbBean,
                                  javax.enterprise.context.spi.CreationalContext<?> creationalContext)
Sets thread local.

Parameters:
ejbBean - bean
creationalContext - context

unsetThreadLocal

public static void unsetThreadLocal()
Remove locals.


callToOwbInterceptors

public Object callToOwbInterceptors(javax.interceptor.InvocationContext ejbContext)
                             throws Exception
Called for every business methods.

Parameters:
ejbContext - invocation context
Returns:
instance
Throws:
Exception

lifecycleCommon

public void lifecycleCommon(javax.interceptor.InvocationContext context,
                            InterceptorType interceptorType)

afterConstruct

@PostConstruct
public void afterConstruct(javax.interceptor.InvocationContext context)
Post construct. This is called once per SFSB reference given out by the container, but just once for the lifetime of an underlying stateless bean. This implies that interceptors of stateless beans must act stateless.

Parameters:
context - invocation ctx

preDestroy

@PreDestroy
public void preDestroy(javax.interceptor.InvocationContext context)
Pre destroy.

Parameters:
context - invocation context

callAroundTimeouts

public Object callAroundTimeouts(javax.interceptor.InvocationContext context)
                          throws Exception
Around Timeout.

Parameters:
context - invocation ctx
Throws:
Exception

beforePassivate

public void beforePassivate(javax.interceptor.InvocationContext context)
PrePassivate callback


afterActivate

public void afterActivate(javax.interceptor.InvocationContext context)
PostActivate callback


getThreadCreationalContext

public static javax.enterprise.context.spi.CreationalContext<?> getThreadCreationalContext()

getEjbBean

public static BaseEjbBean<?> getEjbBean()


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.