Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
jndi.core-0.3.1
-
None
-
None
Description
The JNDI implementation for the ObjectFactory.getObjectInstance is incorrect. If it is unable to create the required object it will return the provided reference when it should return null according to the JNDI API spec. The Aries osgi.service.jndi.JNDIProviderAdmin interface implementation requires its getObjectInstance to return the provided reference in the failure scenario, so need to make sure that still takes place.
Docs for javax.naming.spi.ObjectFactory.getObjectInstance():
JNDIProviderAdmin Javadoc:
/**
- Resolve the object from the given reference.
- @param refInfo Reference info
- @param name the JNDI name associated with this reference
- @param context the JNDI context associated with this reference
- @param environment the JNDI environment associated with this JNDI context
- @return an Object based on the reference passed in, or the original
- reference object if the reference could not be resolved.
- @throws Exception in the event that an error occurs while attempting to
- resolve the JNDI reference.
*/