I’m hoping that either someone on the list can offer some guidance or point us in the direction of some more comprehensive migration documentation than that at
https://eclipse-ee4j.github.io/jersey.github.io/documentation/latest/migration.html#mig-1.x
We are attempting to replace Jersey 1.19 with Jersey 2.41 and have hit a few classes that do not have a clear replacement.
- com.sun.jersey.server.impl.application.WebApplicationContext
We have a method which is receives an implementation of UriInfo. This is cast to WebApplicationContext to call its getRequest() method (which is then cast to javax.ws.rs.core.HttpHeaders).
This is used to find out if the incoming request has X_FORWARDED_HOST or X_FORWARDED_PROTO headers that we would need to include into any URLs that we include as part of the response.
- ResourceConfigurator interface
We have a class:
@Provider
public class JacksonResourceConfigurator implements ResourceConfigurator
{
public void configure( ResourceConfig config )
{
config.register( JacksonFeature.class );
}
}
We’ve replaced this with "extends ResourceModelConfigurator" but not sure this is right.
- Injectable
We have a class with this definition to provide a translator object
@Provider
public class TranslatorInjector extends AbstractHttpContextInjectable<Translator> implements InjectableProvider<Context, Type>
(Translator is our class) We cannot find a replacement for InjectableProvider or AbstractHttpContextInjectable
Thank you
Ed Webb
Software Engineer
This e-mail together with any attachments is confidential, may be subject to legal privilege and may contain proprietary information, including information protected by copyright. If you are not the intended recipient, please do not copy, use or disclose this e-mail; please notify us immediately by return e-mail and then delete this e-mail. No liability is accepted for unauthorized transmissions or actions arising. Any views or opinions expressed in this e-mail may be solely those of the author and are not necessarily those of Gentrack. This email, if it relates to a specific contract, is sent on behalf of the Gentrack company which entered into the contract. Please contact the sender if you are unsure of the contracting Gentrack company or visit our web page http://www.gentrack.com for further information on the Gentrack Group. Where Gentrack UK Ltd is the company referred to, its details are: Registered in England & Wales No. 08229203. Reg. office: 203 Eversholt Street, London, NW1 1BU