@@ -0,0 +1,2427 @@
+package edu.usc.glidein.util;%0A%0Aimport javax.naming.Context;%0Aimport javax.naming.InitialContext;%0Aimport javax.naming.NamingException;%0A%0Aimport edu.usc.glidein.service.impl.GlideinFactoryService;%0Aimport edu.usc.glidein.service.impl.GlideinNames;%0Aimport edu.usc.glidein.service.impl.GlideinResourceHome;%0Aimport edu.usc.glidein.service.impl.GlideinService;%0Aimport edu.usc.glidein.service.impl.SiteFactoryService;%0Aimport edu.usc.glidein.service.impl.SiteNames;%0Aimport edu.usc.glidein.service.impl.SiteResourceHome;%0Aimport edu.usc.glidein.service.impl.SiteService;%0A%0Apublic class NamingUtil %0A%7B%0A%09public static String getHomeLocation(String service)%0A%09%7B%0A%09%09return %22java:comp/env//services/%22 + service + %22/home%22;%0A%09%7D%0A%09%0A%09public static SiteResourceHome getSiteResourceHome()%0A%09throws NamingException%0A%09%7B%0A%09%09String location = getHomeLocation(SiteNames.SITE_SERVICE);%0A%09%09Context initialContext = new InitialContext();%0A    %09return (SiteResourceHome)initialContext.lookup(location);%0A%09%7D%0A%09%0A%09public static GlideinResourceHome getGlideinResourceHome()%0A%09throws NamingException%0A%09%7B%0A%09%09String location = getHomeLocation(GlideinNames.GLIDEIN_SERVICE);%0A%09%09Context initialContext = new InitialContext();%0A    %09return (GlideinResourceHome)initialContext.lookup(location);%0A%09%7D%0A%09%0A%09public static String getServiceLocation(String service)%0A%09%7B%0A%09%09return %22java:comp/env//services/%22 + service;%0A%09%7D%0A%09%0A%09public static SiteService getSiteService()%0A%09throws NamingException%0A%09%7B%0A%09%09String location = getServiceLocation(SiteNames.SITE_SERVICE);%0A%09%09Context initialContext = new InitialContext();%0A    %09return (SiteService)initialContext.lookup(location);%0A%09%7D%0A%09%0A%09public static SiteFactoryService getSiteFactoryService()%0A%09throws NamingException%0A%09%7B%0A%09%09String location = getServiceLocation(SiteNames.SITE_FACTORY_SERVICE);%0A%09%09Context initialContext = new InitialContext();%0A    %09return (SiteFactoryService)initialContext.lookup(location);%0A%09%7D%0A%09%0A%09public static GlideinService getGlideinService()%0A%09throws NamingException%0A%09%7B%0A%09%09String location = getServiceLocation(GlideinNames.GLIDEIN_SERVICE);%0A%09%09Context initialContext = new InitialContext();%0A    %09return (GlideinService)initialContext.lookup(location);%0A%09%7D%0A%09%0A%09public static GlideinFactoryService getGlideinFactoryService() %0A%09throws NamingException%0A%09%7B%0A%09%09String location = getServiceLocation(GlideinNames.GLIDEIN_FACTORY_SERVICE);%0A%09%09Context initialContext = new InitialContext();%0A    %09return (GlideinFactoryService)initialContext.lookup(location);%0A%09%7D%0A%7D%0A

Add JNDI utility class