Bug 50019 - Adding JNDI "lookup-name" support In XML and Resource Annotations
Summary: Adding JNDI "lookup-name" support In XML and Resource Annotations
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Catalina (show other bugs)
Version: trunk
Hardware: PC Linux
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-28 10:38 UTC by Gurkan Erdogdu
Modified: 2018-05-11 19:07 UTC (History)
0 users



Attachments
Patch that provides lookup functionality and resolves explained issue (44.46 KB, patch)
2010-09-28 10:38 UTC, Gurkan Erdogdu
Details | Diff
Test for the lookup (8.97 KB, patch)
2010-09-28 10:40 UTC, Gurkan Erdogdu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gurkan Erdogdu 2010-09-28 10:38:17 UTC
Created attachment 26095 [details]
Patch that provides lookup functionality and resolves explained issue

1* Support for 

@Resource("lookup")
@EJB(lookup)
@WebServiceRef("lookup")

and via XML
....
<lookup-name>

2* Currently DefaultInstanceManager looks for <injection-target> element's <injection-target-class> name for getting injections from web.xml. But it must also look at class hierarchy. This patch also resolves this issue.
Comment 1 Gurkan Erdogdu 2010-09-28 10:40:12 UTC
Created attachment 26096 [details]
Test for the lookup
Comment 2 Shawn Heisey 2018-04-17 17:23:05 UTC
There is a commit on the 7.0 branch that says it's related to this bug entry:

http://svn.apache.org/viewvc?view=revision&revision=1826828

This commit changes the default factory from dbcp to dbcp2, but since dbcp2 support isn't present until version 8, I don't think this is a correct change.

A quick glance at the other changes in the commit looks like they're just whitespace changes.
Comment 3 Konstantin Kolinko 2018-04-20 06:05:50 UTC
(In reply to Shawn Heisey from comment #2)
> There is a commit on the 7.0 branch that says it's related to this bug entry:
> 
> http://svn.apache.org/viewvc?view=revision&revision=1826828
> 
> This commit changes the default factory from dbcp to dbcp2, but since dbcp2
> support isn't present until version 8, I don't think this is a correct
> change.
> 
> A quick glance at the other changes in the commit looks like they're just
> whitespace changes.

I filed bug 62316 for this issue.
Comment 4 Mark Thomas 2018-05-10 15:53:54 UTC
Apologies for the long delay in applying this.

Thanks for the patch.

Fixed in:
- trunk for 9.0.9 onwards
- 8.5.x for 8.5.32 onwards
- 8.0.x for 8.0.53 onwards
- 7.0.x for 7.0.89 onwards