Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-1032

JNDI implementation for the ObjectFactory.getObjectInstance returns incorrect value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • jndi.core-0.3.1
    • None
    • JNDI
    • 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():

      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.
        */

      Attachments

        1. ARIES-1032-diff.txt
          5 kB
          Simon Gormley

        Activity

          People

            Unassigned Unassigned
            sgormley Simon Gormley
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: