https://issues.apache.org/bugzilla/show_bug.cgi?id=49956

           Summary: @Resource(name=) Normalization of JNDI Name
           Product: Tomcat 7
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: gurkanerdo...@yahoo.com


Created an attachment (id=26048)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26048)
Resolves issue

name attribute of @Resource defines JNDI name of the resource that binds the
resource to web component java:comp/env/. 

java:comp/env/bla..bla.. could be given as a JNDI name. Therefore before using
name in DefaultInstanceManager to inject fields & methods, it must be
normalized.

For example, 
@Resource(name="java:comp/env/myDataSource") 
DataSource ds;

Before looking up "context.lookup(name)" in DefaultInstanceManager, we have to
normalize name to "myDataSource".

Patch is attached

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to