0 Replies Latest reply on Sep 20, 2016 10:40 AM by milspec

    Migration: JBoss-4X Jersey  to Wildfly 10 JAX-RS 2: What  jars to include? What do we get for free?

    milspec Newbie

      Hi all,

       

      I've posted a few questions about our migration from Jboss-4.2.2.GA to Wildfly. The question today pertains more to the JavaEE spec, specifically 'jax-rs ' and restful stuff.

       

      Question:

       

      What rest-related jars must we bundle with our app and which ones does the app server provide?

       

      Context

      Way back in the day, we added the jars below (appendix a) to get Jersey to work:

       

      With JavaEE7 (and Wildfly) I understand that the app server will provide all the restful functionalit.

       

      Presuppositions

      I presuppose it to  work as follows:

       

      • build compiles against api-jars. (e.g.: javaee-api-7.0.jar,javax.ws.rs-api-2.0.1.jar,jaxb-api.jar)
      • container provides core functionality including jaxb stuff. ; application does not include any jax-rs jars with it
      • If the application needs related functionality (e.g. gson jar below, the application can include  gson.jar)
      • application has access to jaxb, i.e. no classloading problems [e.g. if some class uses jaxb to parse xml]
      • expect some minor wrinkles on 'edge cases' in switching between jaxb implementation (jersey 1 used jackson; jersey2 uses moxy; wildfly uses jettison)..Example: jackson allowed some illegal syntax, but jettison rejects the same syntax
      • application classes will have straightforward access to jaxb

       

      Anything wrong there?

       

      Could anyone comment on classloading issues or any hidden 'gotchas'?

       

      thanks in advance

       

      will

       

      Appendix A. Git commit for Jersey  1.x jars

      This list shows the jars we initially aded to our applicatoin to get jax-rs 1 (jersey 1) to work.


      I imagine all but the orange the application will now get for free

       

      lib/asm-3.1.jar           | Bin 0 -> 43033 bytes <--

      lib/gson-1.7.1.jar        | Bin 0 -> 173590 bytes

      lib/jackson-all-1.8.1.jar | Bin 0 -> 1011147 bytes

      lib/jaxb-api-2.2.4.1.jar  | Bin 0 -> 106733 bytes

      lib/jaxb-api.jar          | Bin 79554 -> 0 bytes

      lib/jaxb-impl-2.2.4.1.jar | Bin 0 -> 896587 bytes

      lib/jaxb-impl.jar         | Bin 849219 -> 0 bytes

      lib/jersey-core-1.6.jar   | Bin 0 -> 457582 bytes

      lib/jersey-json-1.6.jar   | Bin 0 -> 145250 bytes

      lib/jersey-server-1.6.jar | Bin 0 -> 668869 bytes

      lib/jettison-1.1.jar      | Bin 0 -> 67758 bytes

      lib/jsr311-api-1.1.1.jar  | Bin 0 -> 46367 bytes