Under option
@Resource(name="WebServiceContext", type=java.lang.Object.class)
@WebService
public class MathTableImpl { . . . }
you note that
"This is not injecting in the class: it is only creating an entry in the bean's environment."
in the explanation:
"If the type is java.lang.Object, then the resource MUST be injected into a field or a method."
If it is correct to set @Resource on class level with type=java.lang.Object.class the explanation
states what and what Object will be created in the bean's environment?
About Question enthuware.ocejws.v6.2.58 :
Moderators: Site Manager, fjwalraven
-
- Posts: 28
- Joined: Fri Jan 02, 2015 12:13 pm
- Contact:
-
- Posts: 429
- Joined: Tue Jul 24, 2012 2:43 am
- Contact:
Re: About Question enthuware.ocejws.v6.2.58 :
In this case: no object. It was a general comment about the @Resource annotation on a class level.If it is correct to set @Resource on class level with type=java.lang.Object.class the explanation
states what and what Object will be created in the bean's environment?
I have updated the explanation:
Thanks for your feedback!An @Resource annotation on a class is not injecting anything in the class: it is only creating an entry in the bean's environment. In this case where it involves a WebServiceContext and the type is java.lang.Object.class it is only allowed on a field or property inside the class. No entry is created in the bean's environment.
Regards,
Frits
Who is online
Users browsing this forum: No registered users and 4 guests