Hi, Chris,

I thought I would answer based on what I recall to be the original purpose of 
splitting them into a ‘server’ and ‘servlet’ directory.

It was written in a way to allow other servlet containers to run the ‘servlet’ 
code without making them dependent on each other.
With that said, looking at your TestServer although it uses a jetty server, 
could it be rewritten to use other servlet containers?

If so, then I think what you propose seems okay to me.  I’m not sure if some of 
the examples would have to be rewritten though?

Cheers,

Susan

> On May 31, 2017, at 12:51 AM, Christofer Dutz <christofer.d...@c-ware.de> 
> wrote:
> 
> 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