ContextBindings.bindClassLoader(context, context.getNamingToken(), getClass().getClassLoader());
ContextBindings.unbindClassLoader(context, context.getNamingToken(), getClass().getClassLoader());
/** * 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; }
/** * 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; }
/** * 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; }
token = ((Context) container).getNamingToken(); } else if (container instanceof Server) { namingResources = ((Server) container).getGlobalNamingResources();
token = ((Context) container).getNamingToken(); } else if (container instanceof Server) { namingResources = ((Server) container).getGlobalNamingResources();