Where can I find all the supported types that go with either @Context or @Resource?
Also, for example WebServiceContext is injected using @Context, can it be injected using @Resource? or vice versa?
Thanks
About Question enthuware.ocejws.v6.2.316 :
Moderators: Site Manager, fjwalraven
-
- Posts: 27
- Joined: Tue Nov 15, 2016 11:20 am
- Contact:
-
- Posts: 429
- Joined: Tue Jul 24, 2012 2:43 am
- Contact:
Re: About Question enthuware.ocejws.v6.2.316 :
@Resource is defined in JSR-250.
@Context in the Jersey documentation.
The WebServiceContext is described in JAX-WS 2.x:
Frits
@Context in the Jersey documentation.
The WebServiceContext is described in JAX-WS 2.x:
Regards,The javax.annotation.Resource annotation defined by JSR-250 is used to request injection of the WebServiceContext
Frits
-
- Posts: 16
- Joined: Sat Jun 09, 2018 12:09 pm
- Contact:
Re: About Question enthuware.ocejws.v6.2.316 :
Hello, I'd like to make sure: every Object from "ServletConfig, ServletContext, HttpServletRequest and HttpServletResponse." except ServletConfig and ServletContext could be injected by @Context in this case?
-
- Posts: 429
- Joined: Tue Jul 24, 2012 2:43 am
- Contact:
Re: About Question enthuware.ocejws.v6.2.316 :
from the JAX-RS v1.1 specs (important don't read any newer version):
Frits
Regards,The @Context annotation can be used to indicate a dependency on a Servlet-defined resource. A Servlet- based implementation MUST support injection of the following Servlet-defined types: ServletConfig, ServletContext, HttpServletRequest and HttpServletResponse.
Frits
Who is online
Users browsing this forum: No registered users and 2 guests