本文整理汇总了Java中org.apache.naming.ContextBindings.unbindThread方法的典型用法代码示例。如果您正苦于以下问题:Java ContextBindings.unbindThread方法的具体用法?Java ContextBindings.unbindThread怎么用?Java ContextBindings.unbindThread使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.naming.ContextBindings
的用法示例。
在下文中一共展示了ContextBindings.unbindThread方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: unbindThread
import org.apache.naming.ContextBindings; //导入方法依赖的package包/类
/**
* Unbind thread.
*/
protected void unbindThread(ClassLoader oldContextClassLoader) {
if (isUseNaming()) {
ContextBindings.unbindThread(this, this);
}
DirContextURLStreamHandler.unbindThread();
Thread.currentThread().setContextClassLoader(oldContextClassLoader);
}
示例2: unbindThread
import org.apache.naming.ContextBindings; //导入方法依赖的package包/类
/**
* Unbind thread.
*/
protected void unbindThread(ClassLoader oldContextClassLoader) {
if (isUseNaming()) {
ContextBindings.unbindThread(this, this);
}
DirContextURLStreamHandler.unbindThread();
Thread.currentThread().setContextClassLoader(oldContextClassLoader);
}
示例3: contextExited
import org.apache.naming.ContextBindings; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
public void contextExited(final ThreadContext exitedContext, final ThreadContext reenteredContext) {
// unbind the new context
ContextBindings.unbindThread(OPENEJB_CONTEXT, null);
// attempt to restore the old context
final Data data = exitedContext.get(Data.class);
if (data != null && data.oldContextName != null) {
try {
ContextBindings.bindThread(data.oldContextName, null);
} catch (final NamingException e) {
logger.error("Exception in method contextExited", e);
}
}
}
示例4: unbindThread
import org.apache.naming.ContextBindings; //导入方法依赖的package包/类
/**
* Unbind thread.
*/
private void unbindThread(ClassLoader oldContextClassLoader) {
Thread.currentThread().setContextClassLoader(oldContextClassLoader);
oldContextClassLoader = null;
if (isUseNaming()) {
ContextBindings.unbindThread(this, this);
}
DirContextURLStreamHandler.unbind();
}