Package org.mortbay.jetty.plus.naming

Examples of org.mortbay.jetty.plus.naming.EnvEntry


        Object scope = null;
        List list = NamingEntryUtil.lookupNamingEntries(scope, EnvEntry.class);
        Iterator itor = list.iterator();
        while (itor.hasNext())
        {
            EnvEntry ee = (EnvEntry)itor.next();
            ee.bindToENC(ee.getJndiName());
            Name namingEntryName = NamingEntryUtil.makeNamingEntryName(null, ee);
            NamingUtil.bind(envCtx, namingEntryName.toString(), ee);//also save the EnvEntry in the context so we can check it later         
        }
       
        Log.debug("Binding env entries from the server scope");
       
        scope = getWebAppContext().getServer();
        list = NamingEntryUtil.lookupNamingEntries(scope, EnvEntry.class);
        itor = list.iterator();
        while (itor.hasNext())
        {
            EnvEntry ee = (EnvEntry)itor.next();
            ee.bindToENC(ee.getJndiName());
            Name namingEntryName = NamingEntryUtil.makeNamingEntryName(null, ee);
            NamingUtil.bind(envCtx, namingEntryName.toString(), ee);//also save the EnvEntry in the context so we can check it later         
        }
       
        Log.debug("Binding env entries from the context scope");
        scope = getWebAppContext();
        list = NamingEntryUtil.lookupNamingEntries(scope, EnvEntry.class);
        itor = list.iterator();
        while (itor.hasNext())
        {
            EnvEntry ee = (EnvEntry)itor.next();
            ee.bindToENC(ee.getJndiName());
            Name namingEntryName = NamingEntryUtil.makeNamingEntryName(null, ee);
            NamingUtil.bind(envCtx, namingEntryName.toString(), ee);//also save the EnvEntry in the context so we can check it later
        }
    } 
View Full Code Here


        try
        {
            NamingEntry ne = (NamingEntry)ic.lookup("java:comp/env/"+NamingEntryUtil.makeNamingEntryName(ic.getNameParser(""), name));
            if (ne!=null && ne instanceof EnvEntry)
            {
                EnvEntry ee = (EnvEntry)ne;
                bound = ee.isOverrideWebXml();
            }
        }
        catch (NameNotFoundException e)
        {
            bound = false;
View Full Code Here

       
        WebAppContext wac = new MyWebAppContext();
        wac.setServer(server);
       
        //bind some EnvEntrys at the server level
        EnvEntry ee1 = new EnvEntry(server, "xxx/a", "100", true);
        EnvEntry ee2 = new EnvEntry(server, "yyy/b", "200", false);
        EnvEntry ee3 = new EnvEntry(server, "zzz/c", "300", false);
        EnvEntry ee4 = new EnvEntry(server, "zzz/d", "400", false);
        EnvEntry ee5 = new EnvEntry(server, "zzz/f", "500", true);
       
        //bind some EnvEntrys at the webapp level
        EnvEntry ee6 = new EnvEntry(wac, "xxx/a", "900", true);
        EnvEntry ee7 = new EnvEntry(wac, "yyy/b", "910", true);
        EnvEntry ee8 = new EnvEntry(wac, "zzz/c", "920", false);
        EnvEntry ee9 = new EnvEntry(wac, "zzz/e", "930", false);
       
        assertNotNull(NamingEntryUtil.lookupNamingEntry(server, "xxx/a"));
        assertNotNull(NamingEntryUtil.lookupNamingEntry(server, "yyy/b"));
        assertNotNull(NamingEntryUtil.lookupNamingEntry(server, "zzz/c"));
        assertNotNull(NamingEntryUtil.lookupNamingEntry(server, "zzz/d"));
View Full Code Here

TOP

Related Classes of org.mortbay.jetty.plus.naming.EnvEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.