I’m writing a Jersey 1.9 JAX-RS application. I have to use 1.9 because it’s the only supported version.
I’m trying to decide if there is any benefit to using EJBs as my Jersey Resources, rather than POJOs.
My Resources are strictly for my REST API; they delegate to my business service EJB as soon as the domain translation is complete. At present, I’m leaning towards POJOs because it’s simpler and I only have a single EJB lookup for my business service that I can centralise in a single utility Class.
Either way I’m going to have to do an InitialContext lookup, either for my business service from my JAX-RS Resources, or for the (potentially) EJB Resources from the Jersey Application Class.
Is there any performance or architectural benefit to using EJBs as my Resources given that the only thing using them is the Jersey servlet?