Simon Gormley created ARIES-1032:
------------------------------------
Summary: JNDI implementation for the
ObjectFactory.getObjectInstance returns incorrect value
Key: ARIES-1032
URL: https://issues.apache.org/jira/browse/ARIES-1032
Project: Aries
Issue Type: Bug
Components: JNDI
Affects Versions: jndi.core-0.3.1
Reporter: Simon Gormley
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():
http://docs.oracle.com/javase/6/docs/api/javax/naming/spi/ObjectFactory.html#getObjectInstance%28java.lang.Object,%20javax.naming.Name,%20javax.naming.Context,%20java.util.Hashtable%29
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.
*/
--
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