vollt icon indicating copy to clipboard operation
vollt copied to clipboard

Upgrade UWS to Servlet 5+

Open vforchi opened this issue 1 year ago • 9 comments

I am trying to upgrade my TAP implementation from Spring Boot 2 to 3.

Among other things, this moves to Jakarta EE (meaning Servlet 6.0, Tomcat 10...)

UWS uses Java EE, preventing this upgrade.

In general, I am not sure why UWS should be aware of HttpServletRequest.

For example: public UWSJob createJob(final HttpServletRequest request, final JobOwner user) could take a map of parameters

And UWSServlet is an abastract class that could be in a separate module. (I am not using it)

vforchi avatar Dec 22 '23 10:12 vforchi

You are also perfectly right. After making TAP-Lib and ADQL-Lib compatible with resp. TAP-1.1 and ADQL-2.1, this is one of my top priority development in my libraries: to decouple HTTP-Servlet API from VOLLT API. This will make much easier the integration in frameworks like Spring and Quarkus while allowing more unitary tests.

gmantele avatar Jan 05 '24 09:01 gmantele

That would be great. I need it only in UWS, because I am not using TapLib. Let me know if I can help.

vforchi avatar Jan 08 '24 20:01 vforchi

How do you plan to do it? Are you going to remove UWSServlet from UWSLib?

vforchi avatar Jan 10 '24 19:01 vforchi

No, existing servlets will still exist. But I intent to make all other classes independent from the Servlet API. Existing servlets in UWSLib will then be adapted to use the other updated classes.

gmantele avatar Jan 11 '24 08:01 gmantele

but if you keep the servlet in the module how can you decouple it from the old servlet API?

vforchi avatar Jan 11 '24 08:01 vforchi

The servlet will still exist for backward compatibility and it will still use the servlet API. There will some kind of adapter transforming Servlet parameters into the new UWSLib parameters. Not sure it is clear. Anyway, existing servlets may be provided in a UWSLib extension

gmantele avatar Jan 11 '24 08:01 gmantele

Sorry for chiming in, but I mentioned this a while ago at #133. It happened after installing tomcat 10 and trying to deploy VOLLT. There is indeed a tool which adapts the old servlets API (Java EE) to the new one (Jakarta EE) for backwards compatibility: https://github.com/apache/tomcat-jakartaee-migration

jontxu avatar Jan 11 '24 09:01 jontxu

Hi @jontxu , thank you for the info and remembering me about this other issue.

gmantele avatar Jan 11 '24 09:01 gmantele