[jboss-jira] [JBoss JIRA] Created: (JBNAME-42) Log debug info when NamingContext.getObjectInstance() fails to create the instance

Brian Stansberry (JIRA) jira-events at lists.jboss.org
Mon Dec 7 12:49:29 EST 2009


Log debug info when NamingContext.getObjectInstance() fails to create the instance
----------------------------------------------------------------------------------

                 Key: JBNAME-42
                 URL: https://jira.jboss.org/jira/browse/JBNAME-42
             Project: JBoss Naming
          Issue Type: Feature Request
          Components: jnpserver
            Reporter: Brian Stansberry


NamingManager.getObjectInstance() doesn't provide any debugging output when it's unable to create an object from a Reference; it just silently returns the Reference. Perhaps org.jnp.interfaces.NamingContext.getObjectInstance() can help here

private Object getObjectInstance(Object obj, Name name, Hashtable env)
      throws Exception
   {
      if (useAbsoluteName(env))
         name = getAbsoluteName(name);
      Object result = NamingManager.getObjectInstance(obj, name, this, env);
      if (result == obj log.isDebugEnabled())
      {
         try
         {
            Reference ref == null;
            if (obj instanceof Reference)
            {
               ref = (Reference) obj;
            }
            else if (obj instanceof Referenceable)
            {
               ref = ((Referenceable) obj).getReference();
            }
         
            if (ref != null)
            {
            	log.debug("Could not resolve reference " + ref + " with factory class " + ref.getFactoryClassName();
            }
         }
         catch (RumtimeException ignored)
         {
            ;
         }
         catch (NamingException ne)
         {
            if (ne.getCause() instanceof InterruptedException)
            {
               Thread.currentThread().interrupted();
            }
         }
         
      }
      return result;
   }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list