Log.debug("Bound "+objectNameInNamespace+" using context "+context); Log.debug("Bound "+namingEntryName+" using context "+context);
Log.info("Bound "+objectNameInNamespace+" using context "+context); Log.info("Bound "+namingEntryName+" using context "+context);
    public NamingEntry (String jndiName, Object object)    throws NamingException    {        this.jndiName = jndiName;        this.objectToBind = object;        InitialContext icontext = new InitialContext();              context = getThreadLocalContext();        if (context == null)            context = icontext;               NameParser parser = context.getNameParser("");        namingEntryName = parser.parse("");        namingEntryName.add(getClass().getName());        namingEntryName.add(getJndiName());        //bind this NameEntry in the given context so we can access it later        NamingUtil.bind(context, namingEntryName.toString(), this);                //bind the object itself in the given context so that we can link to it later        objectName = parser.parse(getJndiName());        NamingUtil.bind(context, objectName.toString(), getObjectToBind());               //remember the full name of the bound object so we can use it in the link        objectNameInNamespace = parser.parse(context.getNameInNamespace());        objectNameInNamespace.addAll(objectName);                        Log.debug("Bound "+objectNameInNamespace+" using context "+context);        Log.debug("Bound "+namingEntryName+" using context "+context);    }