org.objectweb.easybeans.naming.interceptors
Class JOnASENCInterceptor

java.lang.Object
  extended by org.objectweb.easybeans.naming.interceptors.JOnASENCInterceptor
All Implemented Interfaces:
EasyBeansInterceptor

public class JOnASENCInterceptor
extends java.lang.Object
implements EasyBeansInterceptor

Interceptor used when EasyBeans is integrated in JOnAS. As the java: namespace is managed by JOnAS, EasyBeans needs to call JOnAS objects to set java: context.

Author:
Florent Benoit

Field Summary
protected static java.lang.String JONAS_NAMING_MANAGER_CLASS
          JOnAS's class for naming.
private static java.lang.Object jonasNamingManager
          Reference on the JOnAS naming manager.
private static JLog logger
          Logger.
private static java.lang.reflect.Method resetComponentContextMethod
          Method used to reset the component context on the JOnAS naming manager.
private static java.lang.reflect.Method setComponentContextMethod
          Method used to set the component context on the JOnAS naming manager.
 
Constructor Summary
JOnASENCInterceptor()
          Default constructor.
 
Method Summary
 java.lang.Object intercept(EasyBeansInvocationContext invocationContext)
          Sets JOnAS ENC context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static JLog logger
Logger.


JONAS_NAMING_MANAGER_CLASS

protected static final java.lang.String JONAS_NAMING_MANAGER_CLASS
JOnAS's class for naming.

See Also:
Constant Field Values

jonasNamingManager

private static java.lang.Object jonasNamingManager
Reference on the JOnAS naming manager.


setComponentContextMethod

private static java.lang.reflect.Method setComponentContextMethod
Method used to set the component context on the JOnAS naming manager.


resetComponentContextMethod

private static java.lang.reflect.Method resetComponentContextMethod
Method used to reset the component context on the JOnAS naming manager.

Constructor Detail

JOnASENCInterceptor

public JOnASENCInterceptor()
Default constructor. Gets a reference on the JOnAS naming manager and the methods that will be called

Method Detail

intercept

public java.lang.Object intercept(EasyBeansInvocationContext invocationContext)
                           throws java.lang.Exception
Sets JOnAS ENC context.

Specified by:
intercept in interface EasyBeansInterceptor
Parameters:
invocationContext - context with useful attributes on the current invocation.
Returns:
result of the next invocation (to chain interceptors).
Throws:
java.lang.Exception - needs for signature of interceptor.