I have the following scenario in REST and for certain reasons, I cannot change the design:
- WAR1 is deployed first (Context: /app1).
- WAR2 (context: /app2), (WAR3 and so on) having JAXRS annotations on certain classes is deployed later
- WAR1 needs to behave like a proxy handling all the calls. By this I mean WAR1 needs to be informed about WAR2's RESTful resources (say /res1) during its deployment.
- Call to /app1/app2/res1 will delegate it to WAR2. I would like this be a Java call rather than REST (http).
Please feel free to correct me, but my question from the above scenario is: Is it possible to read/understand the JAXRS annotations of a WAR and apply them dynamically over another war at runtime ?
I'm using Jersey for JAXRS implementation
Thanks in advance