Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Abandoned
-
5.5.0, 5.5.1
-
None
-
Ubuntu 11.10 (oneiric)
Description
HttpSpringEmbeddedTunnelServlet, HttpEmbeddedTunnelServlet, and HttpTunnelServlet are doomed. This is due to the following:
1. Fields listener, transportFactory, transportOptions, and wireFormat are private in HttpTunnelServlet and could not be set up in the hierarchy. They should be protected.
2. The classes get some configuration by the servlet context. But
a) HttpEmbeddedTunnelService sets 'transportChannelListener' but HttpTunnelServlet reads 'acceptListener' for an instance of
TransportAcceptListener.
b) The code 'TransportAcceptListener listener = transportConnector.getAcceptListener()' in HttpEmbeddedTunnelService can't get an
instance of TransportAcceptListener because it must be set before. Instead a method for getting a working TransportAcceptListener
missing.
c) A HttpTransportFactory is required as servlet context attribute 'transportFactory'. There should be a method to construct one.
3. HttpSpringEmbeddedTunnelServlet is very strange. I would rather expect it to get the required ActiveMQ from a existing Spring Bean Context.
Please find enclosed a Subclass of HttpSpringEmbeddedTunnelServlet that we use that has some HACKS to avoid the defects of the current servlet class hierarchy.