Hey all,

I have a conundrum.

While trying to retain backward compatibility, I'm encountering an initial
difficulty.

In order to calculate the values for `http.service.endpoint` I need to get
all the mappings of the proxy servlet.

However, the only "spec" way of doing that is by calling:

String servletName = config.getServletName();
ServletRegistration servletRegistration =
hostServletContext.getServletRegistration(servletName);
Collection<String> mappings = servletRegistration.getMappings();

However, while I can proxy the hostServletContext and avoid the "no such
method" issue for `getServletRegistration`, the return type is the real
problem.

In fact, if we can't calculate the proxy servlet mappings this way, we
can't advance without at least one endpoint value since this is required.

How should we deal with that scenario?

1) fail without mercy?
2) expect some user value (init-param or config) we'll retrieve (which
might be wrong)

If we do 1) we might as well just call the new method and fail in Servlet
<3.0 containers
If we do 2) we allow a http-service which can potentially return inaccurate
endpoint info.

-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect
*Liferay, Inc.* <http://www.liferay.com> (@Liferay)
_______________________________________________
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to