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