[
https://issues.apache.org/jira/browse/ACE-159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bram de Kruijff updated ACE-159:
--------------------------------
Attachment: ACE-159-toServlet.patch
Attached the patch that refactors to Servlet. All itests pass and I tested
basic functionality against the devserver webui en rest api.
This resolves issues 1 and 2. However issue 3 turns out to be a little more
difficult as the path service property is hardcoded to
"org.apache.ace.server.servlet.endpoint". Obviously, other whiteboard
implementations don't look at this.
Several possible solution:
0) Do not change ACE! Whiteboard adaptors should be smarter. Drawback is we'll
need to convince multiple implementors.
1) For servlet registrations use DM configuration dependencies that (blindly)
propagate configuration entries to service registration properties. Drawback
is we'll lose some sanity checking that is now in updated methods.
2) Refactor ACE to use hardcoded values "alias" which is consistent with
Felix/Amdatu whiteboard implementations. Drawback is it will break sometime.
3) Support optional "org.apache.ace.server.servlet.endpoint.propertykey"
configuration to be used instead of the default. Drawback is added (config)
complexity.
I am undecided. Opinions? Could reopen this in a new issue not to stall this
one.
> Register servlets under objectClass javax.servlet.Servlet instead of
> javax.servlet.http.HttpServlet
> ---------------------------------------------------------------------------------------------------
>
> Key: ACE-159
> URL: https://issues.apache.org/jira/browse/ACE-159
> Project: Ace
> Issue Type: Improvement
> Affects Versions: 0.8.0
> Reporter: Bram de Kruijff
> Attachments: ACE-159-toServlet.patch
>
>
> ACE registers its servlets whiteboard style under
> objectClass=javax.servlet.http.HttpServlet. The custom whiteboard
> implementation HttpListener bridges them to available Http services.
> 1) I think strictly speaking this is not spec compliant as HttpServlet is not
> an interface?
> 2) It is unnecessarily specific as HttpService#registerServlet accepts
> javax.servlet.Servlet
> 3) It is not (out of the box) portable to Felix HTTP whiteboard or Amdatu
> Dispatcher
> For these reasons I'd suggest switching to objectClass=javax.servlet.Servlet.
> Would be happy to work on a small patch if there is some consensus that this
> is a good idea.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira