416812 - Don't start WebSocketClient for every context
turn off for all contexts in demo
This commit is contained in:
parent
156c936754
commit
43c92f8117
|
@ -60,7 +60,7 @@ public class ELContextCleaner implements ServletContextListener
|
|||
//Get rid of references
|
||||
purgeEntries(field);
|
||||
|
||||
LOG.info("javax.el.BeanELResolver purged");
|
||||
LOG.debug("javax.el.BeanELResolver purged");
|
||||
}
|
||||
|
||||
catch (ClassNotFoundException e)
|
||||
|
@ -81,7 +81,7 @@ public class ELContextCleaner implements ServletContextListener
|
|||
}
|
||||
catch (NoSuchFieldException e)
|
||||
{
|
||||
LOG.info("Not cleaning cached beans: no such field javax.el.BeanELResolver.properties");
|
||||
LOG.debug("Not cleaning cached beans: no such field javax.el.BeanELResolver.properties");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -113,14 +113,14 @@ public class ELContextCleaner implements ServletContextListener
|
|||
while (itor.hasNext())
|
||||
{
|
||||
Class clazz = itor.next();
|
||||
LOG.info("Clazz: "+clazz+" loaded by "+clazz.getClassLoader());
|
||||
LOG.debug("Clazz: "+clazz+" loaded by "+clazz.getClassLoader());
|
||||
if (Thread.currentThread().getContextClassLoader().equals(clazz.getClassLoader()))
|
||||
{
|
||||
itor.remove();
|
||||
LOG.info("removed");
|
||||
LOG.debug("removed");
|
||||
}
|
||||
else
|
||||
LOG.info("not removed: "+"contextclassloader="+Thread.currentThread().getContextClassLoader()+"clazz's classloader="+clazz.getClassLoader());
|
||||
LOG.debug("not removed: "+"contextclassloader="+Thread.currentThread().getContextClassLoader()+"clazz's classloader="+clazz.getClassLoader());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,5 +16,12 @@
|
|||
</Arg>
|
||||
</Call>
|
||||
</Call>
|
||||
|
||||
<!-- Should a Websocket container be initialized for each context? -->
|
||||
<!-- Can be overridden by context attribute -->
|
||||
<Call name="setAttribute">
|
||||
<Arg>org.eclipse.jetty.websocket.jsr356</Arg>
|
||||
<Arg type="Boolean"><Property name="org.eclipse.jetty.websocket.jsr356" default="true"/></Arg>
|
||||
</Call>
|
||||
|
||||
</Configure>
|
||||
|
|
|
@ -15,3 +15,6 @@ lib/websocket/*.jar
|
|||
# WebSocket needs websocket configuration
|
||||
etc/jetty-websockets.xml
|
||||
|
||||
[ini-template]
|
||||
# Start Websocket containter for all contexts
|
||||
org.eclipse.jetty.websocket.jsr356=true
|
|
@ -246,7 +246,7 @@ public class WebSocketClient extends ContainerLifeCycle
|
|||
|
||||
super.doStart();
|
||||
|
||||
LOG.info("Started {}",this);
|
||||
LOG.debug("Started {}",this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,6 +26,8 @@ etc/demo-rewrite-rules.xml
|
|||
--module=client
|
||||
|
||||
# Websocket chat examples needs websocket enabled
|
||||
# Don't start for all contexts (set to true in test.xml context)
|
||||
org.eclipse.jetty.websocket.jsr356=false
|
||||
--module=websocket
|
||||
|
||||
# Create and configure the test realm
|
||||
|
|
|
@ -29,7 +29,12 @@ detected.
|
|||
<Set name="defaultsDescriptor"><Property name="jetty.home" default="."/>/etc/webdefault.xml</Set>
|
||||
<Set name="overrideDescriptor"><Property name="jetty.base" default="."/>/etc/override-web.xml</Set>
|
||||
|
||||
|
||||
<!-- Enable WebSocket container -->
|
||||
<Call name="setAttribute">
|
||||
<Arg>org.eclipse.jetty.websocket.jsr356</Arg>
|
||||
<Arg type="Boolean">true</Arg>
|
||||
</Call>
|
||||
|
||||
<!-- virtual hosts
|
||||
<Set name="virtualHosts">
|
||||
<Array type="String">
|
||||
|
|
Loading…
Reference in New Issue