Bug 918346 - Binding subcontexts with <lookup> does not work
Summary: Binding subcontexts with <lookup> does not work
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Naming
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: emartins
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-06 02:11 UTC by James Livingston
Modified: 2019-08-19 12:46 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-19 12:46:14 UTC
Type: Enhancement
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker AS7-6655 0 Major Open binding subcontexts with <lookup> does not work 2017-05-03 20:17:05 UTC

Description James Livingston 2013-03-06 02:11:06 UTC
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.

Comment 1 JBoss JIRA Server 2013-03-27 18:52:04 UTC
Eduardo Martins <emartins.redhat> made a comment on jira AS7-6655

Allowing resolveresult for naming contexts obtained through managed ref factories

Comment 2 JBoss JIRA Server 2013-03-27 18:56:11 UTC
Eduardo Martins <emartins.redhat> made a comment on jira 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


Note You need to log in before you can comment on or make changes to this bug.