Hi guys,

While finishing the Maven migration of the last missing tests and finding a way 
to get rid of the one or the other monster while at it, I noticed the two 
modules console/server and console/servlets.
It seems as if “servlets” contain the real servlets for the server module and 
the reason the modules are split up, are to be able to create a war containing 
the servlets and to load that in an embedded jetty in the “server” module. I 
think we could simplify things greatly here.

In the Flex project the submodule “BlazeDS” is a server component based on a 
Servlet. Here initially the test-setup was done similarly and we were having a 
similarly complex test setup. I then refactored the tests to directly 
instantiate a Jetty servlet container and to programmatically register the 
servlets. The cool thing with this, is the “server” module could contain the 
“servlets” content and there would be no need to find the Servlets by loading 
some external jars.

Have a look at my “TestServer” implementation to get a feeling what I’m talking 
about:
https://github.com/apache/flex-blazeds/blob/42ecd811bec2c7825da250c73b9d3c463f990320/remoting/src/test/java/flex/messaging/util/TestServer.java

Chris

Reply via email to