org.apache.geronimo.naming.java
public class: ComponentContextInterceptor [javadoc |
source]
java.lang.Object
org.apache.geronimo.naming.java.ComponentContextInterceptor
All Implemented Interfaces:
org.apache.geronimo.core.service.Interceptor
An interceptor that pushes the current component's java:comp context into
the java: JNDI namespace
- version:
$
- Rev: 149431 $ $Date: 2005-02-01 11:01:15 -0800 (Tue, 01 Feb 2005) $
Constructor: |
public ComponentContextInterceptor(Interceptor next,
Context compContext) {
assert next != null;
assert compContext != null;
this.next = next;
this.compContext = compContext;
}
Constructor specifying the components JNDI Context (java:comp) Parameters:
compContext - the component's JNDI Context
|
Method from org.apache.geronimo.naming.java.ComponentContextInterceptor Summary: |
---|
invoke |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from org.apache.geronimo.naming.java.ComponentContextInterceptor Detail: |
public InvocationResult invoke(Invocation invocation) throws Throwable {
Context oldContext = RootContext.getComponentContext();
try {
RootContext.setComponentContext(compContext);
return next.invoke(invocation);
} finally {
RootContext.setComponentContext(oldContext);
}
}
|