[jboss-jira] [JBoss JIRA] (AS7-5492) JNDI listBindings() does not work for items in java:jboss/exported

James Livingston (JIRA) jira-events at lists.jboss.org
Tue Sep 4 21:43:32 EDT 2012


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

James Livingston commented on AS7-5492:
---------------------------------------

If the JNDI entry is added by implementing a ServiceActivator containing the following code (based on RemoteNamingTestCase), the entry is added to boundServices so it works:
  BinderService nestedBinding = new BinderService("abc/def");
  serviceActivatorContext.getServiceTarget().addService(ContextNames.EXPORTED_CONTEXT_SERVICE_NAME.append("abc", "def"), nestedBinding)
    .addDependency(ContextNames.EXPORTED_CONTEXT_SERVICE_NAME, ServiceBasedNamingStore.class, nestedBinding.getNamingStoreInjector())
    .addInjection(nestedBinding.getManagedObjectInjector(), new ValueManagedReferenceFactory(Values.immediateValue("hello world")))
    .install();


If the JNDI entry is added by the naming subsystem, then it does not work. I'm attempting to create a test case now.
                
> JNDI listBindings() does not work for items in java:jboss/exported
> ------------------------------------------------------------------
>
>                 Key: AS7-5492
>                 URL: https://issues.jboss.org/browse/AS7-5492
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: Naming
>    Affects Versions: 7.1.2.Final (EAP)
>            Reporter: James Livingston
>            Assignee: Eduardo Martins
>
> When an object is bound to java:jboss/exported/abc/def (for example using the naming subsystem in standalone.xml), it can be retrieved from a remote client with context.lookup("abc/def").
> Calling context.listBindings("abc") return 0 bindings. This appears to be because ServiceBasedNamingStore.lookup() checks the service registry and then the boundServices, but listBindings() only checks the boundServices.

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