[jboss-jira] [JBoss JIRA] (AS7-6121) Naming subsystem <lookup> could use LinkRef/Reference
James Livingston (JIRA)
jira-events at lists.jboss.org
Mon Jan 7 17:19:08 EST 2013
[ https://issues.jboss.org/browse/AS7-6121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743940#comment-12743940 ]
James Livingston commented on AS7-6121:
---------------------------------------
It was from a customer request, but we found another way of doing what they needed in the interim.
They had an application from a 3rd party vendor which wanted to lookup EJBs in a specific location. Since they couldn't change the code, adding a <lookup> let them point the legal JNDI names to new JNDI ones. They asked if there was any way to lookup the "target" name programmatically, and lookupLink() with a LinkRef, Reference or similar seemed like a reasonable solution.
Does being able to use lookupLink() to get the target sound like a reasonable thing to do? If so, I wonder if there is a good way of allowing it without breaking the CDI TCK (also, why did it fail?).
> Naming subsystem <lookup> could use LinkRef/Reference
> -----------------------------------------------------
>
> Key: AS7-6121
> URL: https://issues.jboss.org/browse/AS7-6121
> Project: Application Server 7
> Issue Type: Feature Request
> Components: Naming
> Affects Versions: 7.1.3.Final (EAP)
> Reporter: James Livingston
> Assignee: Eduardo Martins
> Fix For: 7.2.0.Alpha1
>
>
> NameBindingAdd.installLookup() sets up the machinery so that when Context.lookup() is done it looks up the redirected name and returns it.
> It should be possible to do that by binding a LinkRef, Reference or similar object into JNDI instead.
> Where this could make a difference is when Context.lookupLink() is called instead.
> Currently if you have
> <simple name="java:/v" value="hello"/>
> <lookup name="java:/a" lookup="java:/b"/>
> lookupLink("java:/a") will return "hello" rather a LinkRef/Reference/whatever pointing to java:/b.
> We need to decide whether a <lookup> should be considered a "link" for the purposes of lookup() or not. If it should be considered one, then we should change NameBindingAdd.installLookup() to make lookupLink() return the other value.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list