You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2012/06/25 22:31:48 UTC
[Bug 53465] New: mapped-name is read when in @Resource, but not when
in web.xml
https://issues.apache.org/bugzilla/show_bug.cgi?id=53465
Priority: P2
Bug ID: 53465
Assignee: dev@tomcat.apache.org
Summary: mapped-name is read when in @Resource, but not when in
web.xml
Severity: normal
Classification: Unclassified
Reporter: violetagg@apache.org
Hardware: PC
Status: NEW
Version: 7.0.28
Component: Catalina
Product: Tomcat 7
Created attachment 28995
--> https://issues.apache.org/bugzilla/attachment.cgi?id=28995&action=edit
Patch proposal
Hi,
When I have the code below in a servlet
@Resource(mappedName="test")
private DataSource ds;
'mapped name' is read when @Resource is processed
(org.apache.catalina.startup.WebAnnotationSet.addResource(WebAnnotationSet.java:377))
so later on it is available through Reference object as StringRefAddr
But when I have the declaration below in web.xml
<resource-ref>
<res-ref-name>datasource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<mapped-name>test</mapped-name>
</resource-ref>
'mapped name' is not read at all.
I would like to propose a patch that adds additional Rule to WebRuleSet so that
'mapped name' is process and set as property.
I'm looking forward to your comments.
Regards
Violeta Georgieva
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 53465] mapped-name is read when in @Resource, but not when in
web.xml
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53465
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
OS| |All
--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Thanks for the proposed patch. I extended it to cover all resource types and
applied it trunk and 7.0.x. It will be included in 7.0.29 onwards.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 53465] mapped-name is read when in @Resource, but not when in
web.xml
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53465
Violeta Georgieva <vi...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #28995|0 |1
is patch| |
Attachment #28995|application/octet-stream |text/plain
mime type| |
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org