Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationSessionCookieConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationSessionCookieConfig.java?rev=1187787&r1=1187786&r2=1187787&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/core/ApplicationSessionCookieConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ApplicationSessionCookieConfig.java Sat Oct 22 21:08:51 2011 @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -26,7 +26,7 @@ public class ApplicationSessionCookieCon private static final String DEFAULT_SESSION_COOKIE_NAME = "JSESSIONID"; private static final String DEFAULT_SESSION_PARAMETER_NAME = "jsessionid"; - + private boolean httpOnly; private boolean secure; private int maxAge = -1; @@ -34,7 +34,7 @@ public class ApplicationSessionCookieCon private String domain; private String name; private String path; - + @Override public String getComment() { return comment; @@ -125,11 +125,11 @@ public class ApplicationSessionCookieCon // 3. Defaults Cookie cookie = new Cookie(getSessionCookieName(context), sessionId); - + // Just apply the defaults. cookie.setMaxAge(scc.getMaxAge()); cookie.setComment(scc.getComment()); - + if (context.getSessionCookieDomain() == null) { // Avoid possible NPE if (scc.getDomain() != null) { @@ -148,7 +148,7 @@ public class ApplicationSessionCookieCon if (scc.isHttpOnly() || context.getUseHttpOnly()) { cookie.setHttpOnly(true); } - + String contextPath = context.getSessionCookiePath(); if (contextPath == null || contextPath.length() == 0) { contextPath = scc.getPath(); @@ -175,10 +175,10 @@ public class ApplicationSessionCookieCon return cookie; } - - + + private static String getConfiguredSessionCookieName(Context context) { - + // Priority is: // 1. Cookie name defined in context // 2. Cookie name configured for app @@ -188,7 +188,7 @@ public class ApplicationSessionCookieCon if (cookieName != null && cookieName.length() > 0) { return cookieName; } - + SessionCookieConfig scc = context.getServletContext().getSessionCookieConfig(); cookieName = scc.getName(); @@ -199,37 +199,37 @@ public class ApplicationSessionCookieCon return null; } - - + + /** * Determine the name to use for the session cookie for the provided * context. * @param context */ public static String getSessionCookieName(Context context) { - + String result = getConfiguredSessionCookieName(context); - + if (result == null) { - result = DEFAULT_SESSION_COOKIE_NAME; + result = DEFAULT_SESSION_COOKIE_NAME; } - - return result; + + return result; } - + /** * Determine the name to use for the session cookie for the provided * context. * @param context */ public static String getSessionUriParamName(Context context) { - + String result = getConfiguredSessionCookieName(context); - + if (result == null) { - result = DEFAULT_SESSION_PARAMETER_NAME; + result = DEFAULT_SESSION_PARAMETER_NAME; } - - return result; + + return result; } }
Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationTaglibDescriptor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationTaglibDescriptor.java?rev=1187787&r1=1187786&r2=1187787&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/core/ApplicationTaglibDescriptor.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ApplicationTaglibDescriptor.java Sat Oct 22 21:08:51 2011 @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,7 +23,7 @@ public class ApplicationTaglibDescriptor private String location; private String uri; - + public ApplicationTaglibDescriptor(String location, String uri) { this.location = location; this.uri = uri; Modified: tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java?rev=1187787&r1=1187786&r2=1187787&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java Sat Oct 22 21:08:51 2011 @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -50,14 +50,14 @@ import org.apache.juli.logging.LogFactor import org.apache.tomcat.InstanceManager; import org.apache.tomcat.util.res.StringManager; /** - * + * * @author fhanik * */ public class AsyncContextImpl implements AsyncContext, AsyncContextCallback { - + private static final Log log = LogFactory.getLog(AsyncContextImpl.class); - + protected static final StringManager sm = StringManager.getManager(Constants.Package); @@ -71,7 +71,7 @@ public class AsyncContextImpl implements private AsyncEvent event = null; private Request request; private volatile InstanceManager instanceManager; - + public AsyncContextImpl(Request request) { if (log.isDebugEnabled()) { logDebug("Constructor"); @@ -103,11 +103,11 @@ public class AsyncContextImpl implements } } } - + public boolean timeout() throws IOException { AtomicBoolean result = new AtomicBoolean(); request.getCoyoteRequest().action(ActionCode.ASYNC_TIMEOUT, result); - + if (result.get()) { boolean listenerInvoked = false; List<AsyncListenerWrapper> listenersCopy = @@ -179,7 +179,7 @@ public class AsyncContextImpl implements } } }; - + this.dispatch = run; this.request.getCoyoteRequest().action(ActionCode.ASYNC_DISPATCH, null); } @@ -205,7 +205,7 @@ public class AsyncContextImpl implements Runnable wrapper = new RunnableWrapper(run, context); this.request.getCoyoteRequest().action(ActionCode.ASYNC_RUN, wrapper); } - + @Override public void addListener(AsyncListener listener) { check(); @@ -250,7 +250,7 @@ public class AsyncContextImpl implements } return listener; } - + public void recycle() { if (log.isDebugEnabled()) { logDebug("recycle "); @@ -276,7 +276,7 @@ public class AsyncContextImpl implements public void setStarted(Context context, ServletRequest request, ServletResponse response, boolean originalRequestResponse) { - + this.request.getCoyoteRequest().action( ActionCode.ASYNC_START, this); @@ -285,7 +285,7 @@ public class AsyncContextImpl implements this.servletResponse = response; this.hasOriginalRequestAndResponse = originalRequestResponse; this.event = new AsyncEvent(this, request, response); - + List<AsyncListenerWrapper> listenersCopy = new ArrayList<AsyncListenerWrapper>(); listenersCopy.addAll(listeners); @@ -327,7 +327,7 @@ public class AsyncContextImpl implements } } - + @Override public long getTimeout() { check(); @@ -362,7 +362,7 @@ public class AsyncContextImpl implements } } - + private void logDebug(String method) { String rHashCode; String crHashCode; @@ -424,7 +424,7 @@ public class AsyncContextImpl implements instanceManager = new DefaultInstanceManager(null, new HashMap<String, Map<String, String>>(), context, - getClass().getClassLoader()); + getClass().getClassLoader()); } } return instanceManager; @@ -440,12 +440,12 @@ public class AsyncContextImpl implements private static class DebugException extends Exception { private static final long serialVersionUID = 1L; } - + private static class RunnableWrapper implements Runnable { private Runnable wrapped = null; private Context context = null; - + public RunnableWrapper(Runnable wrapped, Context ctxt) { this.wrapped = wrapped; this.context = ctxt; @@ -460,7 +460,7 @@ public class AsyncContextImpl implements } else { oldCL = Thread.currentThread().getContextClassLoader(); } - + try { if (Globals.IS_SECURITY_ENABLED) { PrivilegedAction<Void> pa = new PrivilegedSetTccl( @@ -480,7 +480,7 @@ public class AsyncContextImpl implements } } } - + } Modified: tomcat/trunk/java/org/apache/catalina/core/AsyncListenerWrapper.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AsyncListenerWrapper.java?rev=1187787&r1=1187786&r2=1187787&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/core/AsyncListenerWrapper.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/AsyncListenerWrapper.java Sat Oct 22 21:08:51 2011 @@ -22,20 +22,20 @@ import javax.servlet.AsyncEvent; import javax.servlet.AsyncListener; /** - * TODO SERVLET3 - async + * TODO SERVLET3 - async * @author fhanik * */ public class AsyncListenerWrapper { private AsyncListener listener = null; - - + + public void fireOnStartAsync(AsyncEvent event) throws IOException { listener.onStartAsync(event); } - + public void fireOnComplete(AsyncEvent event) throws IOException { listener.onComplete(event); } @@ -45,7 +45,7 @@ public class AsyncListenerWrapper { listener.onTimeout(event); } - + public void fireOnError(AsyncEvent event) throws IOException { listener.onError(event); } @@ -55,7 +55,7 @@ public class AsyncListenerWrapper { return listener; } - + public void setListener(AsyncListener listener) { this.listener = listener; } Modified: tomcat/trunk/java/org/apache/catalina/core/Constants.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/Constants.java?rev=1187787&r1=1187786&r2=1187787&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/core/Constants.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/Constants.java Sat Oct 22 21:08:51 2011 @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java?rev=1187787&r1=1187786&r2=1187787&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Sat Oct 22 21:08:51 2011 @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -112,9 +112,9 @@ import org.apache.tomcat.util.res.String * </table> * Subclasses that fire additional events should document them in the * class comments of the implementation class. - * - * TODO: Review synchronisation around background processing. See bug 47024. - * + * + * TODO: Review synchronisation around background processing. See bug 47024. + * * @author Craig R. McClanahan */ public abstract class ContainerBase extends LifecycleMBeanBase @@ -185,7 +185,7 @@ public abstract class ContainerBase exte * Associated logger name. */ protected String logName = null; - + /** * The Manager implementation with which this Container is associated. @@ -198,7 +198,7 @@ public abstract class ContainerBase exte */ protected Cluster cluster = null; - + /** * The human-readable name of this Container. */ @@ -279,10 +279,10 @@ public abstract class ContainerBase exte /** * Get the delay between the invocation of the backgroundProcess method on * this container and its children. Child containers will not be invoked - * if their delay value is not negative (which would mean they are using - * their own thread). Setting this to a positive value will cause - * a thread to be spawn. After waiting the specified amount of time, - * the thread will invoke the executePeriodic method on this container + * if their delay value is not negative (which would mean they are using + * their own thread). Setting this to a positive value will cause + * a thread to be spawn. After waiting the specified amount of time, + * the thread will invoke the executePeriodic method on this container * and all its children. */ @Override @@ -294,8 +294,8 @@ public abstract class ContainerBase exte /** * Set the delay between the invocation of the execute method on this * container and its children. - * - * @param delay The delay in seconds between the invocation of + * + * @param delay The delay in seconds between the invocation of * backgroundProcess methods */ @Override @@ -727,8 +727,8 @@ public abstract class ContainerBase exte @Override public synchronized void setResources(DirContext resources) { // Called from StandardContext.setResources() - // <- StandardContext.start() - // <- ContainerBase.addChildInternal() + // <- StandardContext.start() + // <- ContainerBase.addChildInternal() // Change components if necessary DirContext oldResources = this.resources; @@ -886,7 +886,7 @@ public abstract class ContainerBase exte public ContainerListener[] findContainerListeners() { synchronized (listeners) { - ContainerListener[] results = + ContainerListener[] results = new ContainerListener[listeners.size()]; return listeners.toArray(results); } @@ -930,13 +930,13 @@ public abstract class ContainerBase exte if (child == null) { return; } - + synchronized(children) { if (children.get(child.getName()) == null) return; children.remove(child.getName()); } - + try { if (child.getState().isAvailable()) { child.stop(); @@ -944,9 +944,9 @@ public abstract class ContainerBase exte } catch (LifecycleException e) { log.error("ContainerBase.removeChild: stop: ", e); } - + fireContainerEvent(REMOVE_CHILD_EVENT, child); - + try { // child.destroy() may have already been called which would have // triggered this call. If that is the case, no need to destroy the @@ -1104,7 +1104,7 @@ public abstract class ContainerBase exte super.destroyInternal(); } - + /** * Check this container for an access log and if none is found, look to the * parent. If there is no parent and still none is found, use the NoOp @@ -1113,14 +1113,14 @@ public abstract class ContainerBase exte @Override public void logAccess(Request request, Response response, long time, boolean useDefault) { - + boolean logged = false; - + if (getAccessLog() != null) { getAccessLog().log(request, response, time); logged = true; } - + if (getParent() != null) { // No need to use default logger once request/response has been logged // once @@ -1130,7 +1130,7 @@ public abstract class ContainerBase exte @Override public AccessLog getAccessLog() { - + if (accessLogScanComplete) { return accessLog; } @@ -1186,7 +1186,7 @@ public abstract class ContainerBase exte */ @Override public void backgroundProcess() { - + if (!getState().isAvailable()) return; @@ -1194,28 +1194,28 @@ public abstract class ContainerBase exte try { cluster.backgroundProcess(); } catch (Exception e) { - log.warn(sm.getString("containerBase.backgroundProcess.cluster", cluster), e); + log.warn(sm.getString("containerBase.backgroundProcess.cluster", cluster), e); } } if (loader != null) { try { loader.backgroundProcess(); } catch (Exception e) { - log.warn(sm.getString("containerBase.backgroundProcess.loader", loader), e); + log.warn(sm.getString("containerBase.backgroundProcess.loader", loader), e); } } if (manager != null) { try { manager.backgroundProcess(); } catch (Exception e) { - log.warn(sm.getString("containerBase.backgroundProcess.manager", manager), e); + log.warn(sm.getString("containerBase.backgroundProcess.manager", manager), e); } } if (realm != null) { try { realm.backgroundProcess(); } catch (Exception e) { - log.warn(sm.getString("containerBase.backgroundProcess.realm", realm), e); + log.warn(sm.getString("containerBase.backgroundProcess.realm", realm), e); } } Valve current = pipeline.getFirst(); @@ -1223,7 +1223,7 @@ public abstract class ContainerBase exte try { current.backgroundProcess(); } catch (Exception e) { - log.warn(sm.getString("containerBase.backgroundProcess.valve", current), e); + log.warn(sm.getString("containerBase.backgroundProcess.valve", current), e); } current = current.getNext(); } @@ -1275,16 +1275,16 @@ public abstract class ContainerBase exte } else if (name.startsWith("##")) { name = "/" + name; } - loggerName = "[" + name + "]" + loggerName = "[" + name + "]" + ((loggerName != null) ? ("." + loggerName) : ""); current = current.getParent(); } logName = ContainerBase.class.getName() + "." + loggerName; return logName; - + } - + // -------------------- JMX and Registration -------------------- @Override @@ -1305,7 +1305,7 @@ public abstract class ContainerBase exte return result; } - + // -------------------- Background Thread -------------------- /** @@ -1354,7 +1354,7 @@ public abstract class ContainerBase exte /** - * Private thread class to invoke the backgroundProcess method + * Private thread class to invoke the backgroundProcess method * of this container and its children after a fixed delay. */ protected class ContainerBackgroundProcessor implements Runnable { @@ -1369,7 +1369,7 @@ public abstract class ContainerBase exte } if (!threadDone) { Container parent = (Container) getMappingObject(); - ClassLoader cl = + ClassLoader cl = Thread.currentThread().getContextClassLoader(); if (parent.getLoader() != null) { cl = parent.getLoader().getClassLoader(); Modified: tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java?rev=1187787&r1=1187786&r2=1187787&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java Sat Oct 22 21:08:51 2011 @@ -49,7 +49,7 @@ import org.apache.tomcat.util.res.String * <p> * Locked files usually occur when a resource inside a JAR is accessed without * first disabling Jar URL connection caching. The workaround is to disable this - * caching by default. + * caching by default. */ public class JreMemoryLeakPreventionListener implements LifecycleListener { @@ -120,7 +120,7 @@ public class JreMemoryLeakPreventionList public void setSecurityPolicyProtection(boolean securityPolicyProtection) { this.securityPolicyProtection = securityPolicyProtection; } - + /** * Protects against the memory leak caused when the first call to * <code>javax.security.auth.login.Configuration</code> is triggered by a @@ -175,14 +175,14 @@ public class JreMemoryLeakPreventionList public void setXmlParsingProtection(boolean xmlParsingProtection) { this.xmlParsingProtection = xmlParsingProtection; } - + /** * <code>com.sun.jndi.ldap.LdapPoolManager</code> class spawns a thread when * it is initialized if the system property * <code>com.sun.jndi.ldap.connect.pool.timeout</code> is greater than 0. * That thread inherits the context class loader of the current thread, so * that there may be a web application class loader leak if the web app - * is the first to use <code>LdapPoolManager</code>. + * is the first to use <code>LdapPoolManager</code>. */ private boolean ldapPoolProtection = true; public boolean isLdapPoolProtection() { return ldapPoolProtection; } @@ -194,7 +194,7 @@ public class JreMemoryLeakPreventionList * The first access to {@link DriverManager} will trigger the loading of * all {@link java.sql.Driver}s in the the current class loader. The web * application level memory leak protection can take care of this in most - * cases but triggering the loading here has fewer side-effects. + * cases but triggering the loading here has fewer side-effects. */ private boolean driverManagerProtection = true; public boolean isDriverManagerProtection() { @@ -203,10 +203,10 @@ public class JreMemoryLeakPreventionList public void setDriverManagerProtection(boolean driverManagerProtection) { this.driverManagerProtection = driverManagerProtection; } - + /** * List of comma-separated fully qualified class names to load and initialize during - * the startup of this Listener. This allows to pre-load classes that are known to + * the startup of this Listener. This allows to pre-load classes that are known to * provoke classloader leaks if they are loaded during a request processing. */ private String classesToInitialize = null; @@ -216,8 +216,8 @@ public class JreMemoryLeakPreventionList public void setClassesToInitialize(String classesToInitialize) { this.classesToInitialize = classesToInitialize; } - - + + @Override public void lifecycleEvent(LifecycleEvent event) { // Initialise these classes when Tomcat starts @@ -243,7 +243,7 @@ public class JreMemoryLeakPreventionList /* * Several components end up calling: * sun.awt.AppContext.getAppContext() - * + * * Those libraries / components known to trigger memory leaks * due to eventual calls to getAppContext() are: * - Google Web Toolkit via its use of javax.imageio @@ -251,7 +251,7 @@ public class JreMemoryLeakPreventionList * in 1.6.0_15 onwards * - others TBD */ - + // Trigger a call to sun.awt.AppContext.getAppContext(). This // will pin the system class loader in memory but that shouldn't // be an issue. @@ -280,7 +280,7 @@ public class JreMemoryLeakPreventionList /* * Several components end up calling: * sun.misc.GC.requestLatency(long) - * + * * Those libraries / components known to trigger memory leaks * due to eventual calls to requestLatency(long) are: * - javax.management.remote.rmi.RMIConnectorServer.start() @@ -318,9 +318,9 @@ public class JreMemoryLeakPreventionList e); } } - + /* - * Calling getPolicy retains a static reference to the context + * Calling getPolicy retains a static reference to the context * class loader. */ if (securityPolicyProtection) { @@ -349,10 +349,10 @@ public class JreMemoryLeakPreventionList e); } } - - + + /* - * Initializing javax.security.auth.login.Configuration retains a static reference to the context + * Initializing javax.security.auth.login.Configuration retains a static reference to the context * class loader. */ if (securityLoginConfigurationProtection) { @@ -368,25 +368,25 @@ public class JreMemoryLeakPreventionList * initializes the Java Cryptography Architecture. Under certain * conditions this starts a Token poller thread with TCCL equal * to the web application class loader. - * + * * Instead we initialize JCA right now. */ if (tokenPollerProtection) { java.security.Security.getProviders(); } - + /* * Several components end up opening JarURLConnections without * first disabling caching. This effectively locks the file. * Whilst more noticeable and harder to ignore on Windows, it * affects all operating systems. - * + * * Those libraries/components known to trigger this issue * include: * - log4j versions 1.2.15 and earlier * - javax.xml.bind.JAXBContext.newInstance() */ - + // Set the default URL caching policy to not to cache if (urlCacheProtection) { try { @@ -403,7 +403,7 @@ public class JreMemoryLeakPreventionList "jreLeakListener.jarUrlConnCacheFail"), e); } } - + /* * Haven't got to the root of what is going on with this leak * but if a web app is the first to make the calls below the web @@ -419,7 +419,7 @@ public class JreMemoryLeakPreventionList e); } } - + if (ldapPoolProtection) { try { Class.forName("com.sun.jndi.ldap.LdapPoolManager"); @@ -434,7 +434,7 @@ public class JreMemoryLeakPreventionList } } } - + if (classesToInitialize != null) { StringTokenizer strTok = new StringTokenizer(classesToInitialize, ", \r\n\t"); Modified: tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties?rev=1187787&r1=1187786&r2=1187787&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties Sat Oct 22 21:08:51 2011 @@ -53,7 +53,7 @@ applicationResponse.badResponse=Response applicationServletRegistration.setServletSecurity.iae=Null constraint specified for servlet [{0}] deployed to context with name [{1}] applicationServletRegistration.setServletSecurity.ise=Security constraints can't be added to servlet [{0}] deployed to context with name [{1}] as the context has already been initialised aprListener.aprInit=The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: {0} -aprListener.tcnInvalid=An incompatible version {0} of the APR based Apache Tomcat Native library is installed, while Tomcat requires version {1} +aprListener.tcnInvalid=An incompatible version {0} of the APR based Apache Tomcat Native library is installed, while Tomcat requires version {1} aprListener.tcnVersion=An older version {0} of the APR based Apache Tomcat Native library is installed, while Tomcat recommends a minimum version of {1} aprListener.aprDestroy=Failed shutdown of APR based Apache Tomcat Native library aprListener.sslInit=Failed to initialize the SSLEngine. @@ -132,7 +132,7 @@ standardContext.notStarted=Context with standardContext.notWrapper=Child of a Context must be a Wrapper standardContext.parameter.duplicate=Duplicate context initialization parameter {0} standardContext.parameter.required=Both parameter name and parameter value are required -standardContext.pathInvalid=A context path must either be an empty string or start with a ''/''. The path [{0}] does not meet these criteria and has been changed to [{1}] +standardContext.pathInvalid=A context path must either be an empty string or start with a ''/''. The path [{0}] does not meet these criteria and has been changed to [{1}] standardContext.reloadingCompleted=Reloading Context with name [{0}] is completed standardContext.reloadingFailed=Reloading this Context failed due to previous errors standardContext.reloadingStarted=Reloading Context with name [{0}] has started Modified: tomcat/trunk/java/org/apache/catalina/core/LocalStrings_es.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/LocalStrings_es.properties?rev=1187787&r1=1187786&r2=1187787&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/core/LocalStrings_es.properties (original) +++ tomcat/trunk/java/org/apache/catalina/core/LocalStrings_es.properties Sat Oct 22 21:08:51 2011 @@ -130,7 +130,7 @@ standardContext.notStarted = A\u00FAn no standardContext.notWrapper = El Hijo de un Contexto debe de ser un Arropador (Wrapper) standardContext.parameter.duplicate = Duplicado par\u00E1metro de inicializaci\u00F3n de contexto [{0}] standardContext.parameter.required = Es necesario poner nombre de par\u00E1metro y valor de par\u00E1metro -standardContext.pathInvalid = Una ruta de contexto debe de ser o una cadena vac\u00EDa o comenzar con "/". La ruta [{0}] no cumple con estos criterios y ha sido cambiada por [{1}] +standardContext.pathInvalid = Una ruta de contexto debe de ser o una cadena vac\u00EDa o comenzar con "/". La ruta [{0}] no cumple con estos criterios y ha sido cambiada por [{1}] standardContext.reloadingCompleted = Se ha completado la Regarga de este Contexto standardContext.reloadingFailed = Fall\u00F3 la recarga de este Contexto debido a errores previos standardContext.reloadingStarted = Ha comenzado la recarga de Contexto [{0}] @@ -245,8 +245,8 @@ standardWrapper.unloading = No puedo res standardWrapper.waiting = Esperando por {0} instancia(s) para recuperar su espacio reservado threadLocalLeakPreventionListener.lifecycleEvent.error = Excepci\u00F3n procesando evento de ciclo de vida {0} threadLocalLeakPreventionListener.containerEvent.error = Excepci\u00F3n procesando evento de contenedor {0} -defaultInstanceManager.restrictedServletsResource = No se ha hallado el fichero de propiedades restringidas de servlets +defaultInstanceManager.restrictedServletsResource = No se ha hallado el fichero de propiedades restringidas de servlets defaultInstanceManager.privilegedServlet = El Servlet de clase {0} es privilegiado y no puede ser cargado mediante esta aplicaci\u00F3n -defaultInstanceManager.restrictedFiltersResource = No se ha hallado el fichero de propiedades restringidas de filtros +defaultInstanceManager.restrictedFiltersResource = No se ha hallado el fichero de propiedades restringidas de filtros defaultInstanceManager.privilegedFilter = El filtro de clase {0} es privilegiado y no puede ser cargado mediante esta apliaci\u00F3n web -defaultInstanceManager.restrictedListenersResources = No se ha hallado el fichero de propiedades restringidas de escuchadores +defaultInstanceManager.restrictedListenersResources = No se ha hallado el fichero de propiedades restringidas de escuchadores Modified: tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java?rev=1187787&r1=1187786&r2=1187787&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java Sat Oct 22 21:08:51 2011 @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -89,8 +89,8 @@ public class NamingContextListener protected Log logger = log; - - + + /** * Name of the associated naming context. */ @@ -132,13 +132,13 @@ public class NamingContextListener */ protected javax.naming.Context envCtx = null; - + /** * Objectnames hashtable. */ protected HashMap<String, ObjectName> objectNames = new HashMap<String, ObjectName>(); - + /** * The string manager for this package. @@ -167,14 +167,14 @@ public class NamingContextListener this.name = name; } - + /** * Return the comp context. */ public javax.naming.Context getCompContext() { return this.compCtx; } - + /** * Return the env context. @@ -182,7 +182,7 @@ public class NamingContextListener public javax.naming.Context getEnvContext() { return this.envCtx; } - + /** * Return the associated naming context. @@ -249,7 +249,7 @@ public class NamingContextListener ContextAccessController.setReadOnly(getName()); try { ContextBindings.bindClassLoader - (container, container, + (container, container, ((Container) container).getLoader().getClassLoader()); } catch (NamingException e) { logger.error(sm.getString("naming.bindFailed", e)); @@ -261,7 +261,7 @@ public class NamingContextListener (namingContext); try { ContextBindings.bindClassLoader - (container, container, + (container, container, this.getClass().getClassLoader()); } catch (NamingException e) { logger.error(sm.getString("naming.bindFailed", e)); @@ -285,19 +285,19 @@ public class NamingContextListener if (container instanceof Context) { ContextBindings.unbindClassLoader - (container, container, + (container, container, ((Container) container).getLoader().getClassLoader()); } if (container instanceof Server) { namingResources.removePropertyChangeListener(this); ContextBindings.unbindClassLoader - (container, container, + (container, container, this.getClass().getClassLoader()); } ContextAccessController.unsetSecurityToken(getName(), container); - + // unregister mbeans. Collection<ObjectName> names = objectNames.values(); for (ObjectName objectName : names) { @@ -348,7 +348,7 @@ public class NamingContextListener String environmentName = (String) event.getData(); if (environmentName != null) { - ContextEnvironment env = + ContextEnvironment env = namingResources.findEnvironment(environmentName); addEnvironment(env); } @@ -357,7 +357,7 @@ public class NamingContextListener String localEjbName = (String) event.getData(); if (localEjbName != null) { - ContextLocalEjb localEjb = + ContextLocalEjb localEjb = namingResources.findLocalEjb(localEjbName); addLocalEjb(localEjb); } @@ -366,7 +366,7 @@ public class NamingContextListener String resourceName = (String) event.getData(); if (resourceName != null) { - ContextResource resource = + ContextResource resource = namingResources.findResource(resourceName); addResource(resource); } @@ -375,7 +375,7 @@ public class NamingContextListener String resourceLinkName = (String) event.getData(); if (resourceLinkName != null) { - ContextResourceLink resourceLink = + ContextResourceLink resourceLink = namingResources.findResourceLink(resourceLinkName); addResourceLink(resourceLink); } @@ -384,7 +384,7 @@ public class NamingContextListener String resourceEnvRefName = (String) event.getData(); if (resourceEnvRefName != null) { - ContextResourceEnvRef resourceEnvRef = + ContextResourceEnvRef resourceEnvRef = namingResources.findResourceEnvRef(resourceEnvRefName); addResourceEnvRef(resourceEnvRef); } @@ -393,7 +393,7 @@ public class NamingContextListener String serviceName = (String) event.getData(); if (serviceName != null) { - ContextService service = + ContextService service = namingResources.findService(serviceName); addService(service); } @@ -556,14 +556,14 @@ public class NamingContextListener } } else if (name.equals("resourceEnvRef")) { if (oldValue != null) { - ContextResourceEnvRef resourceEnvRef = + ContextResourceEnvRef resourceEnvRef = (ContextResourceEnvRef) oldValue; if (resourceEnvRef.getName() != null) { removeResourceEnvRef(resourceEnvRef.getName()); } } if (newValue != null) { - ContextResourceEnvRef resourceEnvRef = + ContextResourceEnvRef resourceEnvRef = (ContextResourceEnvRef) newValue; if (resourceEnvRef.getName() != null) { addResourceEnvRef(resourceEnvRef); @@ -627,7 +627,7 @@ public class NamingContextListener } // Resource links - ContextResourceLink[] resourceLinks = + ContextResourceLink[] resourceLinks = namingResources.findResourceLinks(); for (i = 0; i < resourceLinks.length; i++) { addResourceLink(resourceLinks[i]); @@ -646,7 +646,7 @@ public class NamingContextListener } // Environment entries - ContextEnvironment[] contextEnvironments = + ContextEnvironment[] contextEnvironments = namingResources.findEnvironments(); for (i = 0; i < contextEnvironments.length; i++) { addEnvironment(contextEnvironments[i]); @@ -680,7 +680,7 @@ public class NamingContextListener } } } catch (NameAlreadyBoundException e) { - // Ignore because UserTransaction was obviously + // Ignore because UserTransaction was obviously // added via ResourceLink } catch (NamingException e) { logger.error(sm.getString("naming.bindFailed", e)); @@ -690,7 +690,7 @@ public class NamingContextListener // Binding the resources directory context if (container instanceof Context) { try { - compCtx.bind("Resources", + compCtx.bind("Resources", ((Container) container).getResources()); } catch (NamingException e) { logger.error(sm.getString("naming.bindFailed", e)); @@ -720,30 +720,30 @@ public class NamingContextListener if (domain == null) { domain = "Catalina"; } - + ObjectName name = null; String quotedResourceName = ObjectName.quote(resource.getName()); - if (container instanceof Server) { + if (container instanceof Server) { name = new ObjectName(domain + ":type=DataSource" + - ",class=" + resource.getType() + + ",class=" + resource.getType() + ",name=" + quotedResourceName); - } else if (container instanceof Context) { + } else if (container instanceof Context) { String contextName = ((Context)container).getName(); if (!contextName.startsWith("/")) contextName = "/" + contextName; Host host = (Host) ((Context)container).getParent(); name = new ObjectName(domain + ":type=DataSource" + - ",context=" + contextName + + ",context=" + contextName + ",host=" + host.getName() + ",class=" + resource.getType() + ",name=" + quotedResourceName); } - + return (name); } - + /** * Set the specified EJBs in the naming context. */ @@ -890,7 +890,7 @@ public class NamingContextListener wsdlURL = ((Context) container). getServletContext(). getResource("/" + service.getWsdlfile()); - logger.debug(" Changing service ref wsdl file for /" + logger.debug(" Changing service ref wsdl file for /" + service.getWsdlfile()); } catch (MalformedURLException e) { logger.error(sm.getString("naming.wsdlFailed", e)); @@ -924,7 +924,7 @@ public class NamingContextListener jaxrpcURL = ((Context) container). getServletContext(). getResource("/" + service.getJaxrpcmappingfile()); - logger.debug(" Changing service ref jaxrpc file for /" + logger.debug(" Changing service ref jaxrpc file for /" + service.getJaxrpcmappingfile()); } catch (MalformedURLException e) { logger.error(sm.getString("naming.wsdlFailed", e)); @@ -981,7 +981,7 @@ public class NamingContextListener try { if (logger.isDebugEnabled()) { - logger.debug(" Adding service ref " + logger.debug(" Adding service ref " + service.getName() + " " + ref); } createSubcontexts(envCtx, service.getName()); @@ -1013,7 +1013,7 @@ public class NamingContextListener } try { if (logger.isDebugEnabled()) { - logger.debug(" Adding resource ref " + logger.debug(" Adding resource ref " + resource.getName() + " " + ref); } createSubcontexts(envCtx, resource.getName()); @@ -1033,7 +1033,7 @@ public class NamingContextListener logger.warn(sm.getString("naming.jmxRegistrationFailed", e)); } } - + } @@ -1081,8 +1081,8 @@ public class NamingContextListener ref.add(refAddr); } } - javax.naming.Context ctx = - "UserTransaction".equals(resourceLink.getName()) + javax.naming.Context ctx = + "UserTransaction".equals(resourceLink.getName()) ? compCtx : envCtx; try { if (logger.isDebugEnabled()) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org