HttpContext mapping
by Thomas Diesler
Hi David,
according to ServletContext.getContextPath()
<http://docs.oracle.com/javaee/5/api/javax/servlet/ServletContext.html#get...>
it is possible that multiple context paths map to the same
ServletContext. The HttpService spec requires that there is a 1:1
mapping between the HttpContext and the ServletContext. This conceptual
abstraction should be handed down to the servlet container
implementation. So whatever represents the ServletContext at the
JBossWeb/Undertow layer should be mapped to the HttpContext object that
is used for a given registration.
HttpContext ctxA = ...
HttpService.registerServlet("/xxx/aaa", servletA, null, ctxA);
HttpService.registerServlet("/yyy/aaa", servletB, null, ctxA);
Should result in one JBossWeb/Undertow context being created with
'/xxx/aaa' as the primary path. The second registration should reuse
that context and setup an alias path of '/yyy/aaa'.
cheers
--thomas
--
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
JBoss OSGi Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
12 years
Configuring OSGi framework properties for the Framework launcher
by David Bosschaert
Hi Thomas,
For the framework launcher I need to be able to pass additional
framework properties to the subsystem. These properties are used by the
TCK but could be used by anyone who uses the Framework Launching API.
There is an issue with your suggestion of using the DMR management API
for setting these properties.
The properties are static, so changes in them always requires a
framework restart.
They are currently read during the parsing of the model and not re-read
after that. So they are read before the OSGi Framework is activated and
passed to the FrameworkBuilderFactory right when the server is booted.
In order to set these properties through the DMR I need to activate the
server, otherwise there is no DMR access.
I can set the properties before activating the OSGi Subsystem through
the DMR, but for them to be picked up the OSGi subsystem needs to delay
reading them until the subsystem is actually activated.
Any thoughts how this is best achieved?
David
12 years, 1 month