Page 1 of 1
Question enthuware.ocejws.v6.2.200: wrong answer?
Posted: Mon Dec 02, 2013 8:27 pm
by socialguy
An EJB with a remote view can't be exposed as a JAX-RS resource. The answer says otherwise.
Re: Question enthuware.ocejws.v6.2.200: wrong answer?
Posted: Tue Dec 03, 2013 3:26 am
by fjwalraven
Note that the EJB exposes both a remote view and a no-interface view (by the @LocalBean annotation) and therefore AdditionService is a correct JAX-RS root resource class.
Re: Question enthuware.ocejws.v6.2.200: wrong answer?
Posted: Tue Dec 03, 2013 11:31 am
by socialguy
The spec is silent about what happens when both local view and remote view are exposed by a EJB resource. Did you have some code by chance that actually does this?
Re: Question enthuware.ocejws.v6.2.200: wrong answer?
Posted: Wed Dec 04, 2013 4:01 pm
by fjwalraven
Yes, both Glassfish and JBoss accept an EJB exposing both remote and local views as a JAX-RS root-resource.
Note that when an EJB-container exposes multiple views it will use different proxy objects. A proxy object for a remote view has more functionality than a proxy object for a local view.
JBoss even allows an EJB with only a remote view to be a JAX-RS root resource.
Regards,
Frits
Re: Question enthuware.ocejws.v6.2.200: wrong answer?
Posted: Wed Dec 04, 2013 4:15 pm
by socialguy
fjwalraven wrote:Yes, both Glassfish and JBoss accept an EJB exposing both remote and local views as a JAX-RS root-resource.
OK, thank you.
fjwalraven wrote:
JBoss even allows an EJB with only a remote view to be a JAX-RS root resource.
That's probably not required by the spec but no one's complaining
