[jboss-as7-dev] AS7 Naming behaviour change for Context#list and JNDI View

Eduardo Martins emartins at redhat.com
Tue Oct 9 05:33:37 EDT 2012


These special default values are used only for bindings which use a ManagedReferenceFactory that do not support the new extensions. I upgraded the ones which are more commonly used, see the PR link.

For any other binding types a lookup is done to retrieve the binding type and jndi view.

-- E

On Oct 9, 2012, at 10:27 AM, Jaikiran Pai <jpai at redhat.com> wrote:

> A quick question - Does this also show "?" if as a user I used the naming subsystem to bind primitive types to JNDI?
> 
> -Jaikiran
> On Tuesday 09 October 2012 02:51 PM, Eduardo Martins wrote:
>> Just a quick alert to all devs working on AS7 or AS7 extensions, with respect to some changes in the Naming module behaviour.
>> 
>> Till now Context#list operations and JNDI View's management operation where doing "plain" JNDI lookups to generate results, and this was problematic in many ways (e.g. AS7-2217 and AS7-5347). From now on lookups will only be done for entries which do not use ManagedReferenceFactory as a mean to return the lookup value, and for these special entries the Naming module will now return safe default values, Object.class for list operations, and the String "?" as the value printed in JNDI View.
>> 
>> Now, along with these behaviour changes, 3 new extensions of the ManagedReferenceFactory interface are introduced:
>> 
>>  * org.jboss.as.naming.ContextListManagedReferenceFactory
>>    <https://github.com/jbossas/jboss-as/blob/master/naming/src/main/java/org/jboss/as/naming/ContextListManagedReferenceFactory.java> -
>>    a ManagedReferenceFactory, which provides a proper type for
>>    Context#list operations results
>> 
>> 
>>  * org.jboss.as.naming.JndiViewManagedReferenceFactory
>>    <https://github.com/jbossas/jboss-as/blob/master/naming/src/main/java/org/jboss/as/naming/JndiViewManagedReferenceFactory.java> -
>>    a ManagedReferenceFactory, which provides a proper (and does it
>>    safely) String view of the binding's value
>> 
>> 
>>  * org.jboss.as.naming.ContextListAndJndiViewManagedReferenceFactory
>>    <https://github.com/jbossas/jboss-as/blob/master/naming/src/main/java/org/jboss/as/naming/ContextListAndJndiViewManagedReferenceFactory.java> -
>>    a combination of the two previous ones
>> 
>> 
>> By implementing these, instead of the raw ManagedReferenceFactory, AS7 Naming module will provide more detailed and proper results, so if you are responsible for some factory, or perhaps start seeing Object.class and/or "?" from bindings you are responsible, please consider the upgrade to the new extensions.
>> 
>> I already upgraded the main ones, see https://github.com/jbossas/jboss-as/pull/3137/files
>> 
>> -- E
>> 
>> 
>> 
>> _______________________________________________
>> jboss-as7-dev mailing list
>> jboss-as7-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
> 




More information about the jboss-as7-dev mailing list