org.apache.catalina.Context.getNamingToken()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(102)

本文整理了Java中org.apache.catalina.Context.getNamingToken()方法的一些代码示例,展示了Context.getNamingToken()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.getNamingToken()方法的具体详情如下:
包路径:org.apache.catalina.Context
类名称:Context
方法名:getNamingToken

Context.getNamingToken介绍

暂无

代码示例

代码示例来源:origin: org.springframework.boot/spring-boot

ContextBindings.bindClassLoader(context, context.getNamingToken(),
    getClass().getClassLoader());

代码示例来源:origin: org.springframework.boot/spring-boot

ContextBindings.unbindClassLoader(context, context.getNamingToken(),
    getClass().getClassLoader());

代码示例来源:origin: psi-probe/psi-probe

/**
 * Returns the security token required to bind to a naming context.
 *
 * @param context the catalina context
 *
 * @return the security token for use with <code>ContextBindings</code>
 */
@Override
protected Object getNamingToken(Context context) {
 // Used by NamingContextListener when setting up JNDI context
 Object token = context.getNamingToken();
 if (!ContextAccessController.checkSecurityToken(context, token)) {
  logger.error("Couldn't get a valid security token. ClassLoader binding will fail.");
 }
 return token;
}

代码示例来源:origin: psi-probe/psi-probe

/**
 * Returns the security token required to bind to a naming context.
 *
 * @param context the catalina context
 *
 * @return the security token for use with <code>ContextBindings</code>
 */
@Override
protected Object getNamingToken(Context context) {
 // Used by NamingContextListener when setting up JNDI context
 Object token = context.getNamingToken();
 if (!ContextAccessController.checkSecurityToken(context, token)) {
  logger.error("Couldn't get a valid security token. ClassLoader binding will fail.");
 }
 return token;
}

代码示例来源:origin: psi-probe/psi-probe

/**
 * Returns the security token required to bind to a naming context.
 *
 * @param context the catalina context
 *
 * @return the security token for use with <code>ContextBindings</code>
 */
@Override
protected Object getNamingToken(Context context) {
 // null token worked before 8.0.6
 Object token = null;
 if (!ContextAccessController.checkSecurityToken(context, token)) {
  // namingToken added to Context and Server interfaces in 8.0.6
  // Used by NamingContextListener when setting up JNDI context
  token = context.getNamingToken();
  if (!ContextAccessController.checkSecurityToken(context, token)) {
   logger.error("Couldn't get a valid security token. ClassLoader binding will fail.");
  }
 }
 return token;
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

token = ((Context) container).getNamingToken();
} else if (container instanceof Server) {
  namingResources = ((Server) container).getGlobalNamingResources();

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

token = ((Context) container).getNamingToken();
} else if (container instanceof Server) {
  namingResources = ((Server) container).getGlobalNamingResources();

相关文章

微信公众号

最新文章

更多

Context类方法