NamingEnumeration nenum = context.listBindings(EnvEntry.class.getName()); while (nenum.hasMoreElements())
try
    public void configureDefaults ()    throws Exception    {        super.configureDefaults();                //add java:comp/env entries for all globally defined EnvEntries        Context context = new InitialContext();        NamingEnumeration nenum = context.listBindings(EnvEntry.class.getName());        while (nenum.hasMoreElements())        {            Binding binding = (Binding)nenum.next();            ((EnvEntry)binding.getObject()).bindToEnv();        }    }