Added isDebugEnabled guards to debugging that generates garbage
This commit is contained in:
parent
810223e259
commit
cd0628ab66
|
@ -593,7 +593,8 @@ public class HttpExchange
|
||||||
if (uri.isOpaque())
|
if (uri.isOpaque())
|
||||||
throw new IllegalArgumentException("Opaque URI: " + uri);
|
throw new IllegalArgumentException("Opaque URI: " + uri);
|
||||||
|
|
||||||
LOG.debug("URI = {}",uri.toASCIIString());
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("URI = {}",uri.toASCIIString());
|
||||||
|
|
||||||
String scheme = uri.getScheme();
|
String scheme = uri.getScheme();
|
||||||
int port = uri.getPort();
|
int port = uri.getPort();
|
||||||
|
|
|
@ -168,7 +168,8 @@ class SelectConnector extends AbstractLifeCycle implements HttpClient.Connector
|
||||||
Timeout.Task connectTimeout = _connectingChannels.remove(channel);
|
Timeout.Task connectTimeout = _connectingChannels.remove(channel);
|
||||||
if (connectTimeout != null)
|
if (connectTimeout != null)
|
||||||
connectTimeout.cancel();
|
connectTimeout.cancel();
|
||||||
LOG.debug("Channels with connection pending: {}", _connectingChannels.size());
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Channels with connection pending: {}", _connectingChannels.size());
|
||||||
|
|
||||||
// key should have destination at this point (will be replaced by endpoint after this call)
|
// key should have destination at this point (will be replaced by endpoint after this call)
|
||||||
HttpDestination dest=(HttpDestination)key.attachment();
|
HttpDestination dest=(HttpDestination)key.attachment();
|
||||||
|
|
|
@ -481,7 +481,7 @@ public class DeploymentManager extends AggregateLifeCycle
|
||||||
while (it.hasNext())
|
while (it.hasNext())
|
||||||
{
|
{
|
||||||
Node node = it.next();
|
Node node = it.next();
|
||||||
LOG.debug("Executing Node: " + node);
|
LOG.debug("Executing Node {}",node);
|
||||||
_lifecycle.runBindings(node,appentry.app,this);
|
_lifecycle.runBindings(node,appentry.app,this);
|
||||||
appentry.setLifeCycleNode(node);
|
appentry.setLifeCycleNode(node);
|
||||||
}
|
}
|
||||||
|
|
|
@ -257,7 +257,7 @@ public class WebAppDeployer extends AbstractLifeCycle
|
||||||
|
|
||||||
if (path != null && path.equals(app.getFile().getCanonicalPath()))
|
if (path != null && path.equals(app.getFile().getCanonicalPath()))
|
||||||
{
|
{
|
||||||
LOG.debug("Already deployed:"+path);
|
LOG.debug("Already deployed: {}",path);
|
||||||
continue files;
|
continue files;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,13 +51,14 @@ public class StandardUndeployer implements AppLifeCycle.Binding
|
||||||
for (int i = 0, n = children.length; i < n; i++)
|
for (int i = 0, n = children.length; i < n; i++)
|
||||||
{
|
{
|
||||||
Handler child = children[i];
|
Handler child = children[i];
|
||||||
LOG.debug("Child handler: " + child);
|
LOG.debug("Child handler {}",child);
|
||||||
if (child.equals(context))
|
if (child.equals(context))
|
||||||
{
|
{
|
||||||
LOG.debug("Removing handler: " + child);
|
LOG.debug("Removing handler {}",child);
|
||||||
coll.removeHandler(child);
|
coll.removeHandler(child);
|
||||||
child.destroy();
|
child.destroy();
|
||||||
LOG.debug(String.format("After removal: %d (originally %d)",coll.getHandlers().length,originalCount));
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("After removal: {} (originally {})",coll.getHandlers().length,originalCount);
|
||||||
}
|
}
|
||||||
else if (child instanceof HandlerCollection)
|
else if (child instanceof HandlerCollection)
|
||||||
{
|
{
|
||||||
|
|
|
@ -99,7 +99,8 @@ public abstract class ScanningAppProvider extends AbstractLifeCycle implements A
|
||||||
@Override
|
@Override
|
||||||
protected void doStart() throws Exception
|
protected void doStart() throws Exception
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled()) LOG.debug(this.getClass().getSimpleName() + ".doStart()");
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug(this.getClass().getSimpleName() + ".doStart()");
|
||||||
if (_monitoredDir == null)
|
if (_monitoredDir == null)
|
||||||
{
|
{
|
||||||
throw new IllegalStateException("No configuration dir specified");
|
throw new IllegalStateException("No configuration dir specified");
|
||||||
|
@ -132,7 +133,8 @@ public abstract class ScanningAppProvider extends AbstractLifeCycle implements A
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
protected void fileAdded(String filename) throws Exception
|
protected void fileAdded(String filename) throws Exception
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled()) LOG.debug("added ",filename);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("added {}",filename);
|
||||||
App app = ScanningAppProvider.this.createApp(filename);
|
App app = ScanningAppProvider.this.createApp(filename);
|
||||||
if (app != null)
|
if (app != null)
|
||||||
{
|
{
|
||||||
|
@ -144,7 +146,8 @@ public abstract class ScanningAppProvider extends AbstractLifeCycle implements A
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
protected void fileChanged(String filename) throws Exception
|
protected void fileChanged(String filename) throws Exception
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled()) LOG.debug("changed ",filename);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("changed {}",filename);
|
||||||
App app = _appMap.remove(filename);
|
App app = _appMap.remove(filename);
|
||||||
if (app != null)
|
if (app != null)
|
||||||
{
|
{
|
||||||
|
@ -161,7 +164,8 @@ public abstract class ScanningAppProvider extends AbstractLifeCycle implements A
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
protected void fileRemoved(String filename) throws Exception
|
protected void fileRemoved(String filename) throws Exception
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled()) LOG.debug("removed ",filename);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("removed {}",filename);
|
||||||
App app = _appMap.remove(filename);
|
App app = _appMap.remove(filename);
|
||||||
if (app != null)
|
if (app != null)
|
||||||
_deploymentManager.removeApp(app);
|
_deploymentManager.removeApp(app);
|
||||||
|
|
|
@ -157,7 +157,8 @@ public class HttpGenerator extends AbstractGenerator
|
||||||
|
|
||||||
if (_last || _state==STATE_END)
|
if (_last || _state==STATE_END)
|
||||||
{
|
{
|
||||||
LOG.debug("Ignoring extra content {}",content);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Ignoring extra content {}",content.toDetailString());
|
||||||
content.clear();
|
content.clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -242,7 +243,8 @@ public class HttpGenerator extends AbstractGenerator
|
||||||
|
|
||||||
if (_last || _state==STATE_END)
|
if (_last || _state==STATE_END)
|
||||||
{
|
{
|
||||||
LOG.debug("Ignoring extra content {}",Byte.valueOf(b));
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Ignoring extra content {}",Byte.valueOf(b));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -299,8 +299,10 @@ public class SslContextFactory extends AbstractLifeCycle
|
||||||
_context.init(keyManagers,trustManagers,secureRandom);
|
_context.init(keyManagers,trustManagers,secureRandom);
|
||||||
|
|
||||||
SSLEngine engine=newSslEngine();
|
SSLEngine engine=newSslEngine();
|
||||||
|
|
||||||
LOG.info("Enabled Protocols {} of {}",Arrays.asList(engine.getEnabledProtocols()),Arrays.asList(engine.getSupportedProtocols()));
|
LOG.info("Enabled Protocols {} of {}",Arrays.asList(engine.getEnabledProtocols()),Arrays.asList(engine.getSupportedProtocols()));
|
||||||
LOG.debug("Enabled Ciphers {} of {}",Arrays.asList(engine.getEnabledCipherSuites()),Arrays.asList(engine.getSupportedCipherSuites()));
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Enabled Ciphers {} of {}",Arrays.asList(engine.getEnabledCipherSuites()),Arrays.asList(engine.getSupportedCipherSuites()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,8 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint
|
||||||
_engine=engine;
|
_engine=engine;
|
||||||
_session=engine.getSession();
|
_session=engine.getSession();
|
||||||
|
|
||||||
if (_debug) LOG.debug(_session+" channel="+channel);
|
if (_debug)
|
||||||
|
LOG.debug(_session+" channel="+channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
|
@ -86,7 +87,8 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint
|
||||||
_engine=engine;
|
_engine=engine;
|
||||||
_session=engine.getSession();
|
_session=engine.getSession();
|
||||||
|
|
||||||
if (_debug) LOG.debug(_session+" channel="+channel);
|
if (_debug)
|
||||||
|
LOG.debug(_session+" channel="+channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -503,7 +505,8 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint
|
||||||
int total_filled=0;
|
int total_filled=0;
|
||||||
boolean remoteClosed = false;
|
boolean remoteClosed = false;
|
||||||
|
|
||||||
LOG.debug("{} unwrap space={} open={}",_session,_inNIOBuffer.space(),super.isOpen());
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("{} unwrap space={} open={}",_session,_inNIOBuffer.space(),super.isOpen());
|
||||||
|
|
||||||
// loop filling as much encrypted data as we can into the buffer
|
// loop filling as much encrypted data as we can into the buffer
|
||||||
while (_inNIOBuffer.space()>0 && super.isOpen())
|
while (_inNIOBuffer.space()>0 && super.isOpen())
|
||||||
|
@ -637,7 +640,8 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint
|
||||||
out_buffer.position(_outNIOBuffer.putIndex());
|
out_buffer.position(_outNIOBuffer.putIndex());
|
||||||
out_buffer.limit(out_buffer.capacity());
|
out_buffer.limit(out_buffer.capacity());
|
||||||
_result=_engine.wrap(bbuf,out_buffer);
|
_result=_engine.wrap(bbuf,out_buffer);
|
||||||
if (_debug) LOG.debug("{} wrap {}",_session,_result);
|
if (_debug)
|
||||||
|
LOG.debug("{} wrap {}",_session,_result);
|
||||||
if (!_handshook && _result.getHandshakeStatus()==SSLEngineResult.HandshakeStatus.FINISHED)
|
if (!_handshook && _result.getHandshakeStatus()==SSLEngineResult.HandshakeStatus.FINISHED)
|
||||||
_handshook=true;
|
_handshook=true;
|
||||||
_outNIOBuffer.setPutIndex(out_buffer.position());
|
_outNIOBuffer.setPutIndex(out_buffer.position());
|
||||||
|
|
|
@ -41,7 +41,7 @@ import org.eclipse.jetty.util.thread.ShutdownThread;
|
||||||
*/
|
*/
|
||||||
public class MBeanContainer extends AbstractLifeCycle implements Container.Listener, Dumpable
|
public class MBeanContainer extends AbstractLifeCycle implements Container.Listener, Dumpable
|
||||||
{
|
{
|
||||||
private final static Logger __log = Log.getLogger(MBeanContainer.class.getName());
|
private final static Logger LOG = Log.getLogger(MBeanContainer.class.getName());
|
||||||
|
|
||||||
private final MBeanServer _server;
|
private final MBeanServer _server;
|
||||||
private final WeakHashMap<Object, ObjectName> _beans = new WeakHashMap<Object, ObjectName>();
|
private final WeakHashMap<Object, ObjectName> _beans = new WeakHashMap<Object, ObjectName>();
|
||||||
|
@ -93,7 +93,7 @@ public class MBeanContainer extends AbstractLifeCycle implements Container.Liste
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
__log.ignore(e);
|
LOG.ignore(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ public class MBeanContainer extends AbstractLifeCycle implements Container.Liste
|
||||||
*/
|
*/
|
||||||
public synchronized void add(Relationship relationship)
|
public synchronized void add(Relationship relationship)
|
||||||
{
|
{
|
||||||
__log.debug("add {}",relationship);
|
LOG.debug("add {}",relationship);
|
||||||
ObjectName parent = _beans.get(relationship.getParent());
|
ObjectName parent = _beans.get(relationship.getParent());
|
||||||
if (parent == null)
|
if (parent == null)
|
||||||
{
|
{
|
||||||
|
@ -168,7 +168,7 @@ public class MBeanContainer extends AbstractLifeCycle implements Container.Liste
|
||||||
*/
|
*/
|
||||||
public synchronized void remove(Relationship relationship)
|
public synchronized void remove(Relationship relationship)
|
||||||
{
|
{
|
||||||
__log.debug("remove {}",relationship);
|
LOG.debug("remove {}",relationship);
|
||||||
ObjectName parent = _beans.get(relationship.getParent());
|
ObjectName parent = _beans.get(relationship.getParent());
|
||||||
ObjectName child = _beans.get(relationship.getChild());
|
ObjectName child = _beans.get(relationship.getChild());
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ public class MBeanContainer extends AbstractLifeCycle implements Container.Liste
|
||||||
*/
|
*/
|
||||||
public synchronized void removeBean(Object obj)
|
public synchronized void removeBean(Object obj)
|
||||||
{
|
{
|
||||||
__log.debug("removeBean {}",obj);
|
LOG.debug("removeBean {}",obj);
|
||||||
ObjectName bean = _beans.remove(obj);
|
ObjectName bean = _beans.remove(obj);
|
||||||
|
|
||||||
if (bean != null)
|
if (bean != null)
|
||||||
|
@ -202,7 +202,7 @@ public class MBeanContainer extends AbstractLifeCycle implements Container.Liste
|
||||||
List<Container.Relationship> beanRelations= _relations.remove(bean);
|
List<Container.Relationship> beanRelations= _relations.remove(bean);
|
||||||
if (beanRelations != null)
|
if (beanRelations != null)
|
||||||
{
|
{
|
||||||
__log.debug("Unregister {}", beanRelations);
|
LOG.debug("Unregister {}", beanRelations);
|
||||||
List<?> removeList = new ArrayList<Object>(beanRelations);
|
List<?> removeList = new ArrayList<Object>(beanRelations);
|
||||||
for (Object r : removeList)
|
for (Object r : removeList)
|
||||||
{
|
{
|
||||||
|
@ -214,15 +214,15 @@ public class MBeanContainer extends AbstractLifeCycle implements Container.Liste
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_server.unregisterMBean(bean);
|
_server.unregisterMBean(bean);
|
||||||
__log.debug("Unregistered {}", bean);
|
LOG.debug("Unregistered {}", bean);
|
||||||
}
|
}
|
||||||
catch (javax.management.InstanceNotFoundException e)
|
catch (javax.management.InstanceNotFoundException e)
|
||||||
{
|
{
|
||||||
__log.ignore(e);
|
LOG.ignore(e);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
__log.warn(e);
|
LOG.warn(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -234,7 +234,7 @@ public class MBeanContainer extends AbstractLifeCycle implements Container.Liste
|
||||||
*/
|
*/
|
||||||
public synchronized void addBean(Object obj)
|
public synchronized void addBean(Object obj)
|
||||||
{
|
{
|
||||||
__log.debug("addBean {}",obj);
|
LOG.debug("addBean {}",obj);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (obj == null || _beans.containsKey(obj))
|
if (obj == null || _beans.containsKey(obj))
|
||||||
|
@ -298,13 +298,13 @@ public class MBeanContainer extends AbstractLifeCycle implements Container.Liste
|
||||||
}
|
}
|
||||||
|
|
||||||
ObjectInstance oinstance = _server.registerMBean(mbean, oname);
|
ObjectInstance oinstance = _server.registerMBean(mbean, oname);
|
||||||
__log.debug("Registered {}", oinstance.getObjectName());
|
LOG.debug("Registered {}", oinstance.getObjectName());
|
||||||
_beans.put(obj, oinstance.getObjectName());
|
_beans.put(obj, oinstance.getObjectName());
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
__log.warn("bean: " + obj, e);
|
LOG.warn("bean: " + obj, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -280,7 +280,7 @@ public class ProxyRule extends PatternRule
|
||||||
|
|
||||||
if (debug != 0)
|
if (debug != 0)
|
||||||
{
|
{
|
||||||
_log.debug(debug + " " + request.getMethod() + " " + url + " " + request.getProtocol());
|
_log.debug("{} {} {} {}", debug ,request.getMethod(), url, request.getProtocol());
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean hasContent = createHeaders(request,debug,exchange);
|
boolean hasContent = createHeaders(request,debug,exchange);
|
||||||
|
@ -393,7 +393,7 @@ public class ProxyRule extends PatternRule
|
||||||
if (val != null)
|
if (val != null)
|
||||||
{
|
{
|
||||||
if (debug != 0)
|
if (debug != 0)
|
||||||
_log.debug(debug + " " + hdr + ": " + val);
|
_log.debug("{} {} {}",debug,hdr,val);
|
||||||
|
|
||||||
exchange.setRequestHeader(hdr,val);
|
exchange.setRequestHeader(hdr,val);
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,9 +135,8 @@ public class HashLoginService extends MappedLoginService implements UserListener
|
||||||
if (_propertyUserStore == null)
|
if (_propertyUserStore == null)
|
||||||
{
|
{
|
||||||
if(LOG.isDebugEnabled())
|
if(LOG.isDebugEnabled())
|
||||||
{
|
|
||||||
LOG.debug("doStart: Starting new PropertyUserStore. PropertiesFile: " + _config + " refreshInterval: " + _refreshInterval);
|
LOG.debug("doStart: Starting new PropertyUserStore. PropertiesFile: " + _config + " refreshInterval: " + _refreshInterval);
|
||||||
}
|
|
||||||
_propertyUserStore = new PropertyUserStore();
|
_propertyUserStore = new PropertyUserStore();
|
||||||
_propertyUserStore.setRefreshInterval(_refreshInterval);
|
_propertyUserStore.setRefreshInterval(_refreshInterval);
|
||||||
_propertyUserStore.setConfig(_config);
|
_propertyUserStore.setConfig(_config);
|
||||||
|
|
|
@ -137,7 +137,7 @@ public class JDBCLoginService extends MappedLoginService
|
||||||
|| _password == null
|
|| _password == null
|
||||||
|| _cacheTime < 0)
|
|| _cacheTime < 0)
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled()) LOG.debug("UserRealm " + getName() + " has not been properly configured");
|
LOG.warn("UserRealm " + getName() + " has not been properly configured");
|
||||||
}
|
}
|
||||||
_cacheTime *= 1000;
|
_cacheTime *= 1000;
|
||||||
_lastHashPurge = 0;
|
_lastHashPurge = 0;
|
||||||
|
|
|
@ -100,7 +100,7 @@ public class SpnegoLoginService extends AbstractLifeCycle implements LoginServic
|
||||||
|
|
||||||
_targetName = properties.getProperty("targetName");
|
_targetName = properties.getProperty("targetName");
|
||||||
|
|
||||||
LOG.debug("\n\nTarget Name\n\n" + _targetName);
|
LOG.debug("Target Name {}", _targetName);
|
||||||
|
|
||||||
super.doStart();
|
super.doStart();
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,8 @@ public class DigestAuthenticator extends LoginAuthenticator
|
||||||
boolean stale = false;
|
boolean stale = false;
|
||||||
if (credentials != null)
|
if (credentials != null)
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled()) LOG.debug("Credentials: " + credentials);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Credentials: " + credentials);
|
||||||
QuotedStringTokenizer tokenizer = new QuotedStringTokenizer(credentials, "=, ", true, false);
|
QuotedStringTokenizer tokenizer = new QuotedStringTokenizer(credentials, "=, ", true, false);
|
||||||
final Digest digest = new Digest(request.getMethod());
|
final Digest digest = new Digest(request.getMethod());
|
||||||
String last = null;
|
String last = null;
|
||||||
|
|
|
@ -634,7 +634,7 @@ public abstract class AbstractConnector extends HttpBuffers implements Connector
|
||||||
public void setForwarded(boolean check)
|
public void setForwarded(boolean check)
|
||||||
{
|
{
|
||||||
if (check)
|
if (check)
|
||||||
LOG.debug(this + " is forwarded");
|
LOG.debug("{} is forwarded",this);
|
||||||
_forwarded = check;
|
_forwarded = check;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1001,7 +1001,8 @@ public abstract class AbstractConnector extends HttpBuffers implements Connector
|
||||||
if (on && _statsStartedAt.get() != -1)
|
if (on && _statsStartedAt.get() != -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
LOG.debug("Statistics on = " + on + " for " + this);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Statistics on = " + on + " for " + this);
|
||||||
|
|
||||||
statsReset();
|
statsReset();
|
||||||
_statsStartedAt.set(on?System.currentTimeMillis():-1);
|
_statsStartedAt.set(on?System.currentTimeMillis():-1);
|
||||||
|
|
|
@ -963,7 +963,8 @@ public abstract class HttpConnection extends AbstractConnection
|
||||||
@Override
|
@Override
|
||||||
public void startResponse(Buffer version, int status, Buffer reason)
|
public void startResponse(Buffer version, int status, Buffer reason)
|
||||||
{
|
{
|
||||||
LOG.debug("Bad request!: "+version+" "+status+" "+reason);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Bad request!: "+version+" "+status+" "+reason);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -793,7 +793,8 @@ public class ContextHandler extends ScopedHandler implements Attributes, Server.
|
||||||
@Override
|
@Override
|
||||||
public void doScope(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
|
public void doScope(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
|
||||||
{
|
{
|
||||||
LOG.debug("scope {} @ {}",baseRequest.getContextPath() + "|" + baseRequest.getServletPath() + "|" + baseRequest.getPathInfo(),this);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("scope {}|{}|{} @ {}",baseRequest.getContextPath(),baseRequest.getServletPath(),baseRequest.getPathInfo(),this);
|
||||||
|
|
||||||
Context old_context = null;
|
Context old_context = null;
|
||||||
String old_context_path = null;
|
String old_context_path = null;
|
||||||
|
@ -865,7 +866,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Server.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
LOG.debug("context={} @ {}",baseRequest.getContextPath() + "|" + baseRequest.getServletPath() + "|" + baseRequest.getPathInfo(),this);
|
LOG.debug("context={}|{}|{} @ {}",baseRequest.getContextPath(),baseRequest.getServletPath(), baseRequest.getPathInfo(),this);
|
||||||
|
|
||||||
// start manual inline of nextScope(target,baseRequest,request,response);
|
// start manual inline of nextScope(target,baseRequest,request,response);
|
||||||
if (never())
|
if (never())
|
||||||
|
|
|
@ -30,7 +30,7 @@ import org.eclipse.jetty.util.log.Logger;
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public abstract class AbstractSession implements AbstractSessionManager.SessionIf
|
public abstract class AbstractSession implements AbstractSessionManager.SessionIf
|
||||||
{
|
{
|
||||||
final static Logger __log = SessionHandler.__log;
|
final static Logger LOG = SessionHandler.LOG;
|
||||||
|
|
||||||
private final AbstractSessionManager _manager;
|
private final AbstractSessionManager _manager;
|
||||||
private final String _clusterId; // ID unique within cluster
|
private final String _clusterId; // ID unique within cluster
|
||||||
|
@ -63,7 +63,8 @@ public abstract class AbstractSession implements AbstractSessionManager.SessionI
|
||||||
_lastAccessed=_created;
|
_lastAccessed=_created;
|
||||||
_requests=1;
|
_requests=1;
|
||||||
_maxIdleMs=_manager._dftMaxIdleSecs>0?_manager._dftMaxIdleSecs*1000:-1;
|
_maxIdleMs=_manager._dftMaxIdleSecs>0?_manager._dftMaxIdleSecs*1000:-1;
|
||||||
__log.debug("new session & id "+_nodeId+" "+_clusterId);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("new session & id "+_nodeId+" "+_clusterId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
|
@ -76,7 +77,8 @@ public abstract class AbstractSession implements AbstractSessionManager.SessionI
|
||||||
_accessed=accessed;
|
_accessed=accessed;
|
||||||
_lastAccessed=accessed;
|
_lastAccessed=accessed;
|
||||||
_requests=1;
|
_requests=1;
|
||||||
__log.debug("new session "+_nodeId+" "+_clusterId);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("new session "+_nodeId+" "+_clusterId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
|
@ -300,7 +302,7 @@ public abstract class AbstractSession implements AbstractSessionManager.SessionI
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
__log.debug("invalidate ",_clusterId);
|
LOG.debug("invalidate {}",_clusterId);
|
||||||
if (isValid())
|
if (isValid())
|
||||||
clearAttributes();
|
clearAttributes();
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ import org.eclipse.jetty.util.statistic.SampleStatistic;
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public abstract class AbstractSessionManager extends AbstractLifeCycle implements SessionManager
|
public abstract class AbstractSessionManager extends AbstractLifeCycle implements SessionManager
|
||||||
{
|
{
|
||||||
final static Logger __log = SessionHandler.__log;
|
final static Logger __log = SessionHandler.LOG;
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
public final static int __distantFuture=60*60*24*7*52*20;
|
public final static int __distantFuture=60*60*24*7*52*20;
|
||||||
|
|
|
@ -46,7 +46,7 @@ import org.eclipse.jetty.util.log.Logger;
|
||||||
*/
|
*/
|
||||||
public class HashSessionManager extends AbstractSessionManager
|
public class HashSessionManager extends AbstractSessionManager
|
||||||
{
|
{
|
||||||
final static Logger __log = SessionHandler.__log;
|
final static Logger __log = SessionHandler.LOG;
|
||||||
|
|
||||||
protected final ConcurrentMap<String,HashedSession> _sessions=new ConcurrentHashMap<String,HashedSession>();
|
protected final ConcurrentMap<String,HashedSession> _sessions=new ConcurrentHashMap<String,HashedSession>();
|
||||||
private static int __id;
|
private static int __id;
|
||||||
|
|
|
@ -162,11 +162,8 @@ public class HashedSession extends AbstractSession
|
||||||
// Access now to prevent race with idling period
|
// Access now to prevent race with idling period
|
||||||
access(System.currentTimeMillis());
|
access(System.currentTimeMillis());
|
||||||
|
|
||||||
|
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
{
|
|
||||||
LOG.debug("Deidling " + super.getId());
|
LOG.debug("Deidling " + super.getId());
|
||||||
}
|
|
||||||
|
|
||||||
FileInputStream fis = null;
|
FileInputStream fis = null;
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ import org.eclipse.jetty.util.log.Logger;
|
||||||
*/
|
*/
|
||||||
public class JDBCSessionIdManager extends AbstractSessionIdManager
|
public class JDBCSessionIdManager extends AbstractSessionIdManager
|
||||||
{
|
{
|
||||||
final static Logger LOG = SessionHandler.__log;
|
final static Logger LOG = SessionHandler.LOG;
|
||||||
|
|
||||||
protected final HashSet<String> _sessionIds = new HashSet<String>();
|
protected final HashSet<String> _sessionIds = new HashSet<String>();
|
||||||
protected Server _server;
|
protected Server _server;
|
||||||
|
@ -108,7 +108,7 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager
|
||||||
throws SQLException
|
throws SQLException
|
||||||
{
|
{
|
||||||
_dbName = dbMeta.getDatabaseProductName().toLowerCase();
|
_dbName = dbMeta.getDatabaseProductName().toLowerCase();
|
||||||
LOG.debug ("Using database "+_dbName);
|
LOG.debug ("Using database {}",_dbName);
|
||||||
_isLower = dbMeta.storesLowerCaseIdentifiers();
|
_isLower = dbMeta.storesLowerCaseIdentifiers();
|
||||||
_isUpper = dbMeta.storesUpperCaseIdentifiers();
|
_isUpper = dbMeta.storesUpperCaseIdentifiers();
|
||||||
}
|
}
|
||||||
|
@ -255,7 +255,8 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager
|
||||||
if ((System.currentTimeMillis()%2) == 0)
|
if ((System.currentTimeMillis()%2) == 0)
|
||||||
_scavengeIntervalMs += tenPercent;
|
_scavengeIntervalMs += tenPercent;
|
||||||
|
|
||||||
if (LOG.isDebugEnabled()) LOG.debug("Scavenging every "+_scavengeIntervalMs+" ms");
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Scavenging every "+_scavengeIntervalMs+" ms");
|
||||||
if (_timer!=null && (period!=old_period || _task==null))
|
if (_timer!=null && (period!=old_period || _task==null))
|
||||||
{
|
{
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
|
@ -434,7 +435,8 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager
|
||||||
initializeDatabase();
|
initializeDatabase();
|
||||||
prepareTables();
|
prepareTables();
|
||||||
super.doStart();
|
super.doStart();
|
||||||
if (LOG.isDebugEnabled()) LOG.debug("Scavenging interval = "+getScavengeInterval()+" sec");
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Scavenging interval = "+getScavengeInterval()+" sec");
|
||||||
_timer=new Timer("JDBCSessionScavenger", true);
|
_timer=new Timer("JDBCSessionScavenger", true);
|
||||||
setScavengeInterval(getScavengeInterval());
|
setScavengeInterval(getScavengeInterval());
|
||||||
}
|
}
|
||||||
|
@ -684,7 +686,8 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager
|
||||||
List<String> expiredSessionIds = new ArrayList<String>();
|
List<String> expiredSessionIds = new ArrayList<String>();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled()) LOG.debug("Scavenge sweep started at "+System.currentTimeMillis());
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Scavenge sweep started at "+System.currentTimeMillis());
|
||||||
if (_lastScavengeTime > 0)
|
if (_lastScavengeTime > 0)
|
||||||
{
|
{
|
||||||
connection = getConnection();
|
connection = getConnection();
|
||||||
|
@ -693,7 +696,8 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager
|
||||||
PreparedStatement statement = connection.prepareStatement(_selectExpiredSessions);
|
PreparedStatement statement = connection.prepareStatement(_selectExpiredSessions);
|
||||||
long lowerBound = (_lastScavengeTime - _scavengeIntervalMs);
|
long lowerBound = (_lastScavengeTime - _scavengeIntervalMs);
|
||||||
long upperBound = _lastScavengeTime;
|
long upperBound = _lastScavengeTime;
|
||||||
if (LOG.isDebugEnabled()) LOG.debug (" Searching for sessions expired between "+lowerBound + " and "+upperBound);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug (" Searching for sessions expired between "+lowerBound + " and "+upperBound);
|
||||||
|
|
||||||
statement.setLong(1, lowerBound);
|
statement.setLong(1, lowerBound);
|
||||||
statement.setLong(2, upperBound);
|
statement.setLong(2, upperBound);
|
||||||
|
|
|
@ -375,7 +375,8 @@ public class JDBCSessionManager extends AbstractSessionManager
|
||||||
@Override
|
@Override
|
||||||
protected void timeout() throws IllegalStateException
|
protected void timeout() throws IllegalStateException
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled()) LOG.debug("Timing out session id="+getClusterId());
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Timing out session id="+getClusterId());
|
||||||
super.timeout();
|
super.timeout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -788,7 +789,8 @@ public class JDBCSessionManager extends AbstractSessionManager
|
||||||
while (itor.hasNext())
|
while (itor.hasNext())
|
||||||
{
|
{
|
||||||
String sessionId = (String)itor.next();
|
String sessionId = (String)itor.next();
|
||||||
if (LOG.isDebugEnabled()) LOG.debug("Expiring session id "+sessionId);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Expiring session id "+sessionId);
|
||||||
|
|
||||||
Session session = (Session)_sessions.get(sessionId);
|
Session session = (Session)_sessions.get(sessionId);
|
||||||
if (session != null)
|
if (session != null)
|
||||||
|
@ -798,7 +800,8 @@ public class JDBCSessionManager extends AbstractSessionManager
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled()) LOG.debug("Unrecognized session id="+sessionId);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Unrecognized session id="+sessionId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ import org.eclipse.jetty.util.log.Logger;
|
||||||
*/
|
*/
|
||||||
public class SessionHandler extends ScopedHandler
|
public class SessionHandler extends ScopedHandler
|
||||||
{
|
{
|
||||||
final static Logger __log = Log.getLogger("org.eclipse.jetty.server.session");
|
final static Logger LOG = Log.getLogger("org.eclipse.jetty.server.session");
|
||||||
|
|
||||||
/* -------------------------------------------------------------- */
|
/* -------------------------------------------------------------- */
|
||||||
private SessionManager _sessionManager;
|
private SessionManager _sessionManager;
|
||||||
|
@ -175,10 +175,10 @@ public class SessionHandler extends ScopedHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(__log.isDebugEnabled())
|
if(LOG.isDebugEnabled())
|
||||||
{
|
{
|
||||||
__log.debug("sessionManager="+_sessionManager);
|
LOG.debug("sessionManager="+_sessionManager);
|
||||||
__log.debug("session="+session);
|
LOG.debug("session="+session);
|
||||||
}
|
}
|
||||||
|
|
||||||
// start manual inline of nextScope(target,baseRequest,request,response);
|
// start manual inline of nextScope(target,baseRequest,request,response);
|
||||||
|
@ -264,7 +264,8 @@ public class SessionHandler extends ScopedHandler
|
||||||
{
|
{
|
||||||
requested_session_id=cookies[i].getValue();
|
requested_session_id=cookies[i].getValue();
|
||||||
requested_session_id_from_cookie = true;
|
requested_session_id_from_cookie = true;
|
||||||
if(__log.isDebugEnabled())__log.debug("Got Session ID "+requested_session_id+" from cookie");
|
if(LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Got Session ID {} from cookie",requested_session_id);
|
||||||
|
|
||||||
session=sessionManager.getHttpSession(requested_session_id);
|
session=sessionManager.getHttpSession(requested_session_id);
|
||||||
if (session!=null && sessionManager.isValid(session))
|
if (session!=null && sessionManager.isValid(session))
|
||||||
|
@ -297,8 +298,8 @@ public class SessionHandler extends ScopedHandler
|
||||||
requested_session_id = uri.substring(s,i);
|
requested_session_id = uri.substring(s,i);
|
||||||
requested_session_id_from_cookie = false;
|
requested_session_id_from_cookie = false;
|
||||||
session=sessionManager.getHttpSession(requested_session_id);
|
session=sessionManager.getHttpSession(requested_session_id);
|
||||||
if(__log.isDebugEnabled())
|
if(LOG.isDebugEnabled())
|
||||||
__log.debug("Got Session ID "+requested_session_id+" from URL");
|
LOG.debug("Got Session ID {} from URL",requested_session_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -280,7 +280,8 @@ public class DefaultServlet extends HttpServlet implements ResourceFactory
|
||||||
if (h.getServletInstance()==this)
|
if (h.getServletInstance()==this)
|
||||||
_defaultHolder=h;
|
_defaultHolder=h;
|
||||||
|
|
||||||
if (LOG.isDebugEnabled()) LOG.debug("resource base = "+_resourceBase);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("resource base = "+_resourceBase);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -82,7 +82,8 @@ public class Holder<T> extends AbstractLifeCycle implements Dumpable
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_class=Loader.loadClass(Holder.class, _className);
|
_class=Loader.loadClass(Holder.class, _className);
|
||||||
if(LOG.isDebugEnabled())LOG.debug("Holding {}",_class);
|
if(LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Holding {}",_class);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -140,7 +140,8 @@ public class Invoker extends HttpServlet
|
||||||
{
|
{
|
||||||
// Found a named servlet (from a user's web.xml file) so
|
// Found a named servlet (from a user's web.xml file) so
|
||||||
// now we add a mapping for it
|
// now we add a mapping for it
|
||||||
LOG.debug("Adding servlet mapping for named servlet:"+servlet+":"+URIUtil.addPaths(servlet_path,servlet)+"/*");
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Adding servlet mapping for named servlet:"+servlet+":"+URIUtil.addPaths(servlet_path,servlet)+"/*");
|
||||||
ServletMapping mapping = new ServletMapping();
|
ServletMapping mapping = new ServletMapping();
|
||||||
mapping.setServletName(servlet);
|
mapping.setServletName(servlet);
|
||||||
mapping.setPathSpec(URIUtil.addPaths(servlet_path,servlet)+"/*");
|
mapping.setPathSpec(URIUtil.addPaths(servlet_path,servlet)+"/*");
|
||||||
|
@ -174,7 +175,8 @@ public class Invoker extends HttpServlet
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Make a holder
|
// Make a holder
|
||||||
LOG.debug("Making new servlet="+servlet+" with path="+path+"/*");
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Making new servlet="+servlet+" with path="+path+"/*");
|
||||||
holder=_servletHandler.addServletWithMapping(servlet, path+"/*");
|
holder=_servletHandler.addServletWithMapping(servlet, path+"/*");
|
||||||
|
|
||||||
if (_parameters!=null)
|
if (_parameters!=null)
|
||||||
|
@ -211,7 +213,7 @@ public class Invoker extends HttpServlet
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_verbose)
|
if (_verbose && LOG.isDebugEnabled())
|
||||||
LOG.debug("Dynamic load '"+servlet+"' at "+path);
|
LOG.debug("Dynamic load '"+servlet+"' at "+path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -390,7 +390,7 @@ public class ServletHandler extends ScopedHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
LOG.debug("servlet {} -> {}",baseRequest.getContextPath()+"|"+baseRequest.getServletPath()+"|"+baseRequest.getPathInfo(),servlet_holder);
|
LOG.debug("servlet {}|{}|{} -> {}",baseRequest.getContextPath(),baseRequest.getServletPath(),baseRequest.getPathInfo(),servlet_holder);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -455,7 +455,7 @@ public class ServletHandler extends ScopedHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG.debug("chain=",chain);
|
LOG.debug("chain={}",chain);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -1231,7 +1231,8 @@ public class ServletHandler extends ScopedHandler
|
||||||
HttpServletResponse response)
|
HttpServletResponse response)
|
||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
if(LOG.isDebugEnabled())LOG.debug("Not Found "+request.getRequestURI());
|
if(LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Not Found "+request.getRequestURI());
|
||||||
response.sendError(HttpServletResponse.SC_NOT_FOUND);
|
response.sendError(HttpServletResponse.SC_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1392,13 +1393,15 @@ public class ServletHandler extends ScopedHandler
|
||||||
public void doFilter(ServletRequest request, ServletResponse response)
|
public void doFilter(ServletRequest request, ServletResponse response)
|
||||||
throws IOException, ServletException
|
throws IOException, ServletException
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled()) LOG.debug("doFilter " + _filter);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("doFilter " + _filter);
|
||||||
|
|
||||||
// pass to next filter
|
// pass to next filter
|
||||||
if (_filter < LazyList.size(_chain))
|
if (_filter < LazyList.size(_chain))
|
||||||
{
|
{
|
||||||
FilterHolder holder= (FilterHolder)LazyList.get(_chain, _filter++);
|
FilterHolder holder= (FilterHolder)LazyList.get(_chain, _filter++);
|
||||||
if (LOG.isDebugEnabled()) LOG.debug("call filter " + holder);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("call filter " + holder);
|
||||||
Filter filter= holder.getFilter();
|
Filter filter= holder.getFilter();
|
||||||
|
|
||||||
if (holder.isAsyncSupported() || !_baseRequest.isAsyncSupported())
|
if (holder.isAsyncSupported() || !_baseRequest.isAsyncSupported())
|
||||||
|
@ -1424,7 +1427,8 @@ public class ServletHandler extends ScopedHandler
|
||||||
// Call servlet
|
// Call servlet
|
||||||
if (_servletHolder != null)
|
if (_servletHolder != null)
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled()) LOG.debug("call servlet " + _servletHolder);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("call servlet " + _servletHolder);
|
||||||
_servletHolder.handle(_baseRequest,request, response);
|
_servletHolder.handle(_baseRequest,request, response);
|
||||||
}
|
}
|
||||||
else // Not found
|
else // Not found
|
||||||
|
|
|
@ -74,7 +74,7 @@ import org.eclipse.jetty.util.log.Logger;
|
||||||
*/
|
*/
|
||||||
public class CrossOriginFilter implements Filter
|
public class CrossOriginFilter implements Filter
|
||||||
{
|
{
|
||||||
private static final Logger logger = Log.getLogger(CrossOriginFilter.class);
|
private static final Logger LOG = Log.getLogger(CrossOriginFilter.class);
|
||||||
|
|
||||||
// Request headers
|
// Request headers
|
||||||
private static final String ORIGIN_HEADER = "Origin";
|
private static final String ORIGIN_HEADER = "Origin";
|
||||||
|
@ -145,7 +145,7 @@ public class CrossOriginFilter implements Filter
|
||||||
}
|
}
|
||||||
catch (NumberFormatException x)
|
catch (NumberFormatException x)
|
||||||
{
|
{
|
||||||
logger.info("Cross-origin filter, could not parse '{}' parameter as integer: {}", PREFLIGHT_MAX_AGE_PARAM, preflightMaxAgeConfig);
|
LOG.info("Cross-origin filter, could not parse '{}' parameter as integer: {}", PREFLIGHT_MAX_AGE_PARAM, preflightMaxAgeConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
String allowedCredentialsConfig = config.getInitParameter(ALLOW_CREDENTIALS_PARAM);
|
String allowedCredentialsConfig = config.getInitParameter(ALLOW_CREDENTIALS_PARAM);
|
||||||
|
@ -153,12 +153,15 @@ public class CrossOriginFilter implements Filter
|
||||||
allowedCredentialsConfig = "true";
|
allowedCredentialsConfig = "true";
|
||||||
allowCredentials = Boolean.parseBoolean(allowedCredentialsConfig);
|
allowCredentials = Boolean.parseBoolean(allowedCredentialsConfig);
|
||||||
|
|
||||||
logger.debug("Cross-origin filter configuration: " +
|
if (LOG.isDebugEnabled())
|
||||||
ALLOWED_ORIGINS_PARAM + " = " + allowedOriginsConfig + ", " +
|
{
|
||||||
ALLOWED_METHODS_PARAM + " = " + allowedMethodsConfig + ", " +
|
LOG.debug("Cross-origin filter configuration: " +
|
||||||
ALLOWED_HEADERS_PARAM + " = " + allowedHeadersConfig + ", " +
|
ALLOWED_ORIGINS_PARAM + " = " + allowedOriginsConfig + ", " +
|
||||||
PREFLIGHT_MAX_AGE_PARAM + " = " + preflightMaxAgeConfig + ", " +
|
ALLOWED_METHODS_PARAM + " = " + allowedMethodsConfig + ", " +
|
||||||
ALLOW_CREDENTIALS_PARAM + " = " + allowedCredentialsConfig);
|
ALLOWED_HEADERS_PARAM + " = " + allowedHeadersConfig + ", " +
|
||||||
|
PREFLIGHT_MAX_AGE_PARAM + " = " + preflightMaxAgeConfig + ", " +
|
||||||
|
ALLOW_CREDENTIALS_PARAM + " = " + allowedCredentialsConfig);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
|
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
|
||||||
|
@ -176,23 +179,23 @@ public class CrossOriginFilter implements Filter
|
||||||
{
|
{
|
||||||
if (isSimpleRequest(request))
|
if (isSimpleRequest(request))
|
||||||
{
|
{
|
||||||
logger.debug("Cross-origin request to {} is a simple cross-origin request", request.getRequestURI());
|
LOG.debug("Cross-origin request to {} is a simple cross-origin request", request.getRequestURI());
|
||||||
handleSimpleResponse(request, response, origin);
|
handleSimpleResponse(request, response, origin);
|
||||||
}
|
}
|
||||||
else if (isPreflightRequest(request))
|
else if (isPreflightRequest(request))
|
||||||
{
|
{
|
||||||
logger.debug("Cross-origin request to {} is a preflight cross-origin request", request.getRequestURI());
|
LOG.debug("Cross-origin request to {} is a preflight cross-origin request", request.getRequestURI());
|
||||||
handlePreflightResponse(request, response, origin);
|
handlePreflightResponse(request, response, origin);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
logger.debug("Cross-origin request to {} is a non-simple cross-origin request", request.getRequestURI());
|
LOG.debug("Cross-origin request to {} is a non-simple cross-origin request", request.getRequestURI());
|
||||||
handleSimpleResponse(request, response, origin);
|
handleSimpleResponse(request, response, origin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
logger.debug("Cross-origin request to " + request.getRequestURI() + " with origin " + origin + " does not match allowed origins " + allowedOrigins);
|
LOG.debug("Cross-origin request to " + request.getRequestURI() + " with origin " + origin + " does not match allowed origins " + allowedOrigins);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -291,18 +294,18 @@ public class CrossOriginFilter implements Filter
|
||||||
private boolean isMethodAllowed(HttpServletRequest request)
|
private boolean isMethodAllowed(HttpServletRequest request)
|
||||||
{
|
{
|
||||||
String accessControlRequestMethod = request.getHeader(ACCESS_CONTROL_REQUEST_METHOD_HEADER);
|
String accessControlRequestMethod = request.getHeader(ACCESS_CONTROL_REQUEST_METHOD_HEADER);
|
||||||
logger.debug("{} is {}", ACCESS_CONTROL_REQUEST_METHOD_HEADER, accessControlRequestMethod);
|
LOG.debug("{} is {}", ACCESS_CONTROL_REQUEST_METHOD_HEADER, accessControlRequestMethod);
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
if (accessControlRequestMethod != null)
|
if (accessControlRequestMethod != null)
|
||||||
result = allowedMethods.contains(accessControlRequestMethod);
|
result = allowedMethods.contains(accessControlRequestMethod);
|
||||||
logger.debug("Method {} is" + (result ? "" : " not") + " among allowed methods {}", accessControlRequestMethod, allowedMethods);
|
LOG.debug("Method {} is" + (result ? "" : " not") + " among allowed methods {}", accessControlRequestMethod, allowedMethods);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean areHeadersAllowed(HttpServletRequest request)
|
private boolean areHeadersAllowed(HttpServletRequest request)
|
||||||
{
|
{
|
||||||
String accessControlRequestHeaders = request.getHeader(ACCESS_CONTROL_REQUEST_HEADERS_HEADER);
|
String accessControlRequestHeaders = request.getHeader(ACCESS_CONTROL_REQUEST_HEADERS_HEADER);
|
||||||
logger.debug("{} is {}", ACCESS_CONTROL_REQUEST_HEADERS_HEADER, accessControlRequestHeaders);
|
LOG.debug("{} is {}", ACCESS_CONTROL_REQUEST_HEADERS_HEADER, accessControlRequestHeaders);
|
||||||
boolean result = true;
|
boolean result = true;
|
||||||
if (accessControlRequestHeaders != null)
|
if (accessControlRequestHeaders != null)
|
||||||
{
|
{
|
||||||
|
@ -325,7 +328,7 @@ public class CrossOriginFilter implements Filter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logger.debug("Headers [{}] are" + (result ? "" : " not") + " among allowed headers {}", accessControlRequestHeaders, allowedHeaders);
|
LOG.debug("Headers [{}] are" + (result ? "" : " not") + " among allowed headers {}", accessControlRequestHeaders, allowedHeaders);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -188,7 +188,7 @@ public abstract class AbstractLifeCycle implements LifeCycle
|
||||||
private void setStopped()
|
private void setStopped()
|
||||||
{
|
{
|
||||||
_state = __STOPPED;
|
_state = __STOPPED;
|
||||||
LOG.debug(STOPPED+" {}",this);
|
LOG.debug("{} {}",STOPPED,this);
|
||||||
for (Listener listener : _listeners)
|
for (Listener listener : _listeners)
|
||||||
listener.lifeCycleStopped(this);
|
listener.lifeCycleStopped(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,7 +144,7 @@ public class AggregateLifeCycle extends AbstractLifeCycle implements Destroyable
|
||||||
t=(T)o;
|
t=(T)o;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (count>1)
|
if (count>1 && LOG.isDebugEnabled())
|
||||||
LOG.debug("getBean({}) 1 of {}",clazz.getName(),count);
|
LOG.debug("getBean({}) 1 of {}",clazz.getName(),count);
|
||||||
|
|
||||||
return t;
|
return t;
|
||||||
|
|
|
@ -56,28 +56,28 @@ public class Log
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Logger __log;
|
private static Logger LOG;
|
||||||
private static boolean __initialized;
|
private static boolean __initialized;
|
||||||
|
|
||||||
public static boolean initialized()
|
public static boolean initialized()
|
||||||
{
|
{
|
||||||
if (__log != null)
|
if (LOG != null)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
synchronized (Log.class)
|
synchronized (Log.class)
|
||||||
{
|
{
|
||||||
if (__initialized)
|
if (__initialized)
|
||||||
return __log != null;
|
return LOG != null;
|
||||||
__initialized = true;
|
__initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Class<?> log_class = Loader.loadClass(Log.class, __logClass);
|
Class<?> log_class = Loader.loadClass(Log.class, __logClass);
|
||||||
if (__log == null || !__log.getClass().equals(log_class))
|
if (LOG == null || !LOG.getClass().equals(log_class))
|
||||||
{
|
{
|
||||||
__log = (Logger)log_class.newInstance();
|
LOG = (Logger)log_class.newInstance();
|
||||||
__log.debug("Logging to {} via {}", __log, log_class.getName());
|
LOG.debug("Logging to {} via {}", LOG, log_class.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Throwable e)
|
catch(Throwable e)
|
||||||
|
@ -88,7 +88,7 @@ public class Log
|
||||||
initStandardLogging(e);
|
initStandardLogging(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return __log != null;
|
return LOG != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void initStandardLogging(Throwable e)
|
private static void initStandardLogging(Throwable e)
|
||||||
|
@ -96,17 +96,17 @@ public class Log
|
||||||
Class<?> log_class;
|
Class<?> log_class;
|
||||||
if(e != null && __ignored)
|
if(e != null && __ignored)
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
if (__log == null)
|
if (LOG == null)
|
||||||
{
|
{
|
||||||
log_class = StdErrLog.class;
|
log_class = StdErrLog.class;
|
||||||
__log = new StdErrLog();
|
LOG = new StdErrLog();
|
||||||
__log.debug("Logging to {} via {}", __log, log_class.getName());
|
LOG.debug("Logging to {} via {}", LOG, log_class.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setLog(Logger log)
|
public static void setLog(Logger log)
|
||||||
{
|
{
|
||||||
Log.__log = log;
|
Log.LOG = log;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -116,7 +116,7 @@ public class Log
|
||||||
public static Logger getLog()
|
public static Logger getLog()
|
||||||
{
|
{
|
||||||
initialized();
|
initialized();
|
||||||
return __log;
|
return LOG;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -125,7 +125,7 @@ public class Log
|
||||||
*/
|
*/
|
||||||
public static Logger getRootLogger() {
|
public static Logger getRootLogger() {
|
||||||
initialized();
|
initialized();
|
||||||
return __log;
|
return LOG;
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean isIgnored()
|
static boolean isIgnored()
|
||||||
|
@ -179,7 +179,7 @@ public class Log
|
||||||
{
|
{
|
||||||
if (!isDebugEnabled())
|
if (!isDebugEnabled())
|
||||||
return;
|
return;
|
||||||
__log.debug(EXCEPTION, th);
|
LOG.debug(EXCEPTION, th);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -190,7 +190,7 @@ public class Log
|
||||||
{
|
{
|
||||||
if (!initialized())
|
if (!initialized())
|
||||||
return;
|
return;
|
||||||
__log.debug(msg);
|
LOG.debug(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -201,7 +201,7 @@ public class Log
|
||||||
{
|
{
|
||||||
if (!initialized())
|
if (!initialized())
|
||||||
return;
|
return;
|
||||||
__log.debug(msg, arg);
|
LOG.debug(msg, arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -212,7 +212,7 @@ public class Log
|
||||||
{
|
{
|
||||||
if (!initialized())
|
if (!initialized())
|
||||||
return;
|
return;
|
||||||
__log.debug(msg, arg0, arg1);
|
LOG.debug(msg, arg0, arg1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -228,7 +228,7 @@ public class Log
|
||||||
{
|
{
|
||||||
if (!initialized())
|
if (!initialized())
|
||||||
return;
|
return;
|
||||||
__log.ignore(thrown);
|
LOG.ignore(thrown);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -239,7 +239,7 @@ public class Log
|
||||||
{
|
{
|
||||||
if (!initialized())
|
if (!initialized())
|
||||||
return;
|
return;
|
||||||
__log.info(msg);
|
LOG.info(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -250,7 +250,7 @@ public class Log
|
||||||
{
|
{
|
||||||
if (!initialized())
|
if (!initialized())
|
||||||
return;
|
return;
|
||||||
__log.info(msg, arg);
|
LOG.info(msg, arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -261,7 +261,7 @@ public class Log
|
||||||
{
|
{
|
||||||
if (!initialized())
|
if (!initialized())
|
||||||
return;
|
return;
|
||||||
__log.info(msg, arg0, arg1);
|
LOG.info(msg, arg0, arg1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -272,7 +272,7 @@ public class Log
|
||||||
{
|
{
|
||||||
if (!initialized())
|
if (!initialized())
|
||||||
return false;
|
return false;
|
||||||
return __log.isDebugEnabled();
|
return LOG.isDebugEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -283,7 +283,7 @@ public class Log
|
||||||
{
|
{
|
||||||
if (!initialized())
|
if (!initialized())
|
||||||
return;
|
return;
|
||||||
__log.warn(msg);
|
LOG.warn(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -294,7 +294,7 @@ public class Log
|
||||||
{
|
{
|
||||||
if (!initialized())
|
if (!initialized())
|
||||||
return;
|
return;
|
||||||
__log.warn(msg, arg);
|
LOG.warn(msg, arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -305,7 +305,7 @@ public class Log
|
||||||
{
|
{
|
||||||
if (!initialized())
|
if (!initialized())
|
||||||
return;
|
return;
|
||||||
__log.warn(msg, arg0, arg1);
|
LOG.warn(msg, arg0, arg1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -316,7 +316,7 @@ public class Log
|
||||||
{
|
{
|
||||||
if (!initialized())
|
if (!initialized())
|
||||||
return;
|
return;
|
||||||
__log.warn(msg, th);
|
LOG.warn(msg, th);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -327,7 +327,7 @@ public class Log
|
||||||
{
|
{
|
||||||
if (!initialized())
|
if (!initialized())
|
||||||
return;
|
return;
|
||||||
__log.warn(EXCEPTION, th);
|
LOG.warn(EXCEPTION, th);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -352,6 +352,6 @@ public class Log
|
||||||
if (!initialized())
|
if (!initialized())
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
return name == null ? __log : __log.getLogger(name);
|
return name == null ? LOG : LOG.getLogger(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,7 +130,8 @@ public class JarResource extends URLResource
|
||||||
if (!exists())
|
if (!exists())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(LOG.isDebugEnabled())LOG.debug("Extract "+this+" to "+directory);
|
if(LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Extract "+this+" to "+directory);
|
||||||
|
|
||||||
String urlString = this.getURL().toExternalForm().trim();
|
String urlString = this.getURL().toExternalForm().trim();
|
||||||
int endOfJarUrl = urlString.indexOf("!/");
|
int endOfJarUrl = urlString.indexOf("!/");
|
||||||
|
@ -143,7 +144,8 @@ public class JarResource extends URLResource
|
||||||
String subEntryName = (endOfJarUrl+2 < urlString.length() ? urlString.substring(endOfJarUrl + 2) : null);
|
String subEntryName = (endOfJarUrl+2 < urlString.length() ? urlString.substring(endOfJarUrl + 2) : null);
|
||||||
boolean subEntryIsDir = (subEntryName != null && subEntryName.endsWith("/")?true:false);
|
boolean subEntryIsDir = (subEntryName != null && subEntryName.endsWith("/")?true:false);
|
||||||
|
|
||||||
if (LOG.isDebugEnabled()) LOG.debug("Extracting entry = "+subEntryName+" from jar "+jarFileURL);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Extracting entry = "+subEntryName+" from jar "+jarFileURL);
|
||||||
|
|
||||||
InputStream is = jarFileURL.openConnection().getInputStream();
|
InputStream is = jarFileURL.openConnection().getInputStream();
|
||||||
JarInputStream jin = new JarInputStream(is);
|
JarInputStream jin = new JarInputStream(is);
|
||||||
|
@ -194,7 +196,8 @@ public class JarResource extends URLResource
|
||||||
|
|
||||||
if (!shouldExtract)
|
if (!shouldExtract)
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled()) LOG.debug("Skipping entry: "+entryName);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Skipping entry: "+entryName);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,7 +205,8 @@ public class JarResource extends URLResource
|
||||||
dotCheck = URIUtil.canonicalPath(dotCheck);
|
dotCheck = URIUtil.canonicalPath(dotCheck);
|
||||||
if (dotCheck == null)
|
if (dotCheck == null)
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled()) LOG.debug("Invalid entry: "+entryName);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Invalid entry: "+entryName);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@ public class ShutdownThread extends Thread
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
lifeCycle.stop();
|
lifeCycle.stop();
|
||||||
LOG.debug("Stopped " + lifeCycle);
|
LOG.debug("Stopped {}",lifeCycle);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
@ -54,12 +54,11 @@ public class JettyWebXmlConfiguration extends AbstractConfiguration
|
||||||
//cannot configure if the _context is already started
|
//cannot configure if the _context is already started
|
||||||
if (context.isStarted())
|
if (context.isStarted())
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled()){LOG.debug("Cannot configure webapp after it is started");}
|
LOG.debug("Cannot configure webapp after it is started");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(LOG.isDebugEnabled())
|
LOG.debug("Configuring web-jetty.xml");
|
||||||
LOG.debug("Configuring web-jetty.xml");
|
|
||||||
|
|
||||||
Resource web_inf = context.getWebInf();
|
Resource web_inf = context.getWebInf();
|
||||||
// handle any WEB-INF descriptors
|
// handle any WEB-INF descriptors
|
||||||
|
@ -79,9 +78,8 @@ public class JettyWebXmlConfiguration extends AbstractConfiguration
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
context.setServerClasses(null);
|
context.setServerClasses(null);
|
||||||
if(LOG.isDebugEnabled()) {
|
if(LOG.isDebugEnabled())
|
||||||
LOG.debug("Configure: "+jetty);
|
LOG.debug("Configure: "+jetty);
|
||||||
}
|
|
||||||
|
|
||||||
XmlConfiguration jetty_config = (XmlConfiguration)context.getAttribute(XML_CONFIGURATION);
|
XmlConfiguration jetty_config = (XmlConfiguration)context.getAttribute(XML_CONFIGURATION);
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,8 @@ public class StandardDescriptorProcessor extends IterativeDescriptorProcessor
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (LOG.isDebugEnabled()) LOG.debug("ContextParam: " + name + "=" + value);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("ContextParam: " + name + "=" + value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -437,7 +437,8 @@ public class TagLibConfiguration extends AbstractConfiguration
|
||||||
public void visitListener (WebAppContext context, Descriptor descriptor, XmlParser.Node node)
|
public void visitListener (WebAppContext context, Descriptor descriptor, XmlParser.Node node)
|
||||||
{
|
{
|
||||||
String className=node.getString("listener-class",false,true);
|
String className=node.getString("listener-class",false,true);
|
||||||
if (LOG.isDebugEnabled()) LOG.debug("listener="+className);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("listener="+className);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -401,11 +401,11 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
{
|
{
|
||||||
ClassLoader loader = getClassLoader();
|
ClassLoader loader = getClassLoader();
|
||||||
LOG.debug("Thread Context class loader is: " + loader);
|
LOG.debug("Thread Context classloader {}",loader);
|
||||||
loader=loader.getParent();
|
loader=loader.getParent();
|
||||||
while(loader!=null)
|
while(loader!=null)
|
||||||
{
|
{
|
||||||
LOG.debug("Parent class loader is: " + loader);
|
LOG.debug("Parent class loader: {} ",loader);
|
||||||
loader=loader.getParent();
|
loader=loader.getParent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,7 +198,8 @@ public class WebDescriptor extends Descriptor
|
||||||
_metaDataComplete = Boolean.valueOf(s).booleanValue()?MetaDataComplete.True:MetaDataComplete.False;
|
_metaDataComplete = Boolean.valueOf(s).booleanValue()?MetaDataComplete.True:MetaDataComplete.False;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG.debug(_xml.toString()+": Calculated metadatacomplete = " + _metaDataComplete + " with version=" + version);
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug(_xml.toString()+": Calculated metadatacomplete = " + _metaDataComplete + " with version=" + version);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void processOrdering ()
|
public void processOrdering ()
|
||||||
|
|
|
@ -125,7 +125,8 @@ public class WebInfConfiguration extends AbstractConfiguration
|
||||||
//cannot configure if the context is already started
|
//cannot configure if the context is already started
|
||||||
if (context.isStarted())
|
if (context.isStarted())
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled()){LOG.debug("Cannot configure webapp "+context+" after it is started");}
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Cannot configure webapp "+context+" after it is started");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class WebXmlConfiguration extends AbstractConfiguration
|
||||||
// cannot configure if the context is already started
|
// cannot configure if the context is already started
|
||||||
if (context.isStarted())
|
if (context.isStarted())
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled()) LOG.debug("Cannot configure webapp after it is started");
|
LOG.debug("Cannot configure webapp after it is started");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,7 +102,8 @@ public class WebXmlConfiguration extends AbstractConfiguration
|
||||||
// do web.xml file
|
// do web.xml file
|
||||||
Resource web = web_inf.addPath("web.xml");
|
Resource web = web_inf.addPath("web.xml");
|
||||||
if (web.exists()) return web;
|
if (web.exists()) return web;
|
||||||
LOG.debug("No WEB-INF/web.xml in " + context.getWar() + ". Serving files and default/dynamic servlets only");
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("No WEB-INF/web.xml in " + context.getWar() + ". Serving files and default/dynamic servlets only");
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue