[jboss-jira] [JBoss JIRA] (AS7-6655) binding subcontexts with <lookup> does not work

Eduardo Martins (JIRA) jira-events at lists.jboss.org
Wed Mar 27 14:57:42 EDT 2013


    [ https://issues.jboss.org/browse/AS7-6655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12763590#comment-12763590 ] 

Eduardo Martins commented on AS7-6655:
--------------------------------------

Please note, the fix allows this use case to go through, yet it does not introduce any change wrt msc dependencies, which are globally under discussion in the context of AS7-6787 
                
> binding subcontexts with <lookup> does not work
> -----------------------------------------------
>
>                 Key: AS7-6655
>                 URL: https://issues.jboss.org/browse/AS7-6655
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: Naming
>    Affects Versions: 7.1.3.Final (EAP)
>            Reporter: James Livingston
>            Assignee: Eduardo Martins
>
> If you attempt to bind a subcontext via <lookup> in the naming subsystem it will fail when anything is looked up under it.
> To reproduce, add <lookup name="java:jboss/ds" lookup="java:jboss/datasources"/>, and then look up something under java:jboss/ds/
> In ServiceBasedNamingStore.lookup() it needs to return a ResolveResult, but the (!(obj instanceof NamingContext)) check skips it.
> As a work-around, you can write an object factory which looks up the sub-context and then returns a wrapper around it, a Context implementation which simply delegates all methods to the original context. Since that wrapper is not a NamingContext instance, it works.

--
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