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.
It is wrong because it doesn't use the java:global JNDI namespace but the relative value, right?
So if I use the "lookup" attribute JNDI location for @Resource it always have to be the global one?
I think it is correct because the question says, "... specified it in your message producer's environment under the name "jms/myTCF"..." Therefore, java:comp/env/jms/myTCF and jms/myTCF both are valid.
If you like our products and services, please help us by posting your review here.
For Option 3, the explaination of why it is wrong says:
"The right syntax for resource injection would be:
@Resource(name="jms/myTCF")
ConnectionFactory myTCF;"
But according to 6.2.420, the name does not need to be specified, as "name" is the default attributes. viewtopic.php?f=4&t=801
So option 3 should also be correct.
Jofen wrote:For Option 3, the explaination of why it is wrong says:
"The right syntax for resource injection would be:
@Resource(name="jms/myTCF")
ConnectionFactory myTCF;"
But according to 6.2.420, the name does not need to be specified, as "name" is the default attributes. viewtopic.php?f=4&t=801
So option 3 should also be correct.
You are right. This has now been fixed.
thank you for your feedback!
If you like our products and services, please help us by posting your review here.
Have you tried this? Resouce annotation doesn't compile without name attribute specified. So Option 3 should be
@Resource(name="jms/myTCF")
ConnectionFactory myTCF;
admin do you mind checking the last comment posted by Nuno Agostinho. because he is correct. in case of annotations if there is an attribute named value in the annotation defintion, then only can you skip writting the attribute name(if no other attributes have been specified) i.e MyAnnotation("helloworld).
i wonder why nuno hasnt been replied to since feb 24