About Question enthuware.ocejws.v6.2.58 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
disznoperzselo
Posts: 28
Joined: Fri Jan 02, 2015 12:13 pm
Contact:

About Question enthuware.ocejws.v6.2.58 :

Post by disznoperzselo »

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?

fjwalraven
Posts: 429
Joined: Tue Jul 24, 2012 2:43 am
Contact:

Re: About Question enthuware.ocejws.v6.2.58 :

Post by fjwalraven »

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?
In this case: no object. It was a general comment about the @Resource annotation on a class level.

I have updated the explanation:
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.
Thanks for your feedback!

Regards,
Frits

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest