[jboss-as7-dev] AS7 Naming behaviour change for Context#list and JNDI View
Eduardo Martins
emartins at redhat.com
Tue Oct 9 05:21:34 EDT 2012
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 - a ManagedReferenceFactory, which provides a proper type for Context#list operations results
org.jboss.as.naming.JndiViewManagedReferenceFactory - a ManagedReferenceFactory, which provides a proper (and does it safely) String view of the binding's value
org.jboss.as.naming.ContextListAndJndiViewManagedReferenceFactory - 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-as7-dev/attachments/20121009/d464c294/attachment.html
More information about the jboss-as7-dev
mailing list