1 22 package org.jboss.test; 23 24 import java.net.URL ; 25 import java.util.Properties ; 26 import javax.naming.InitialContext ; 27 28 35 public class JBossIIOPTestCase extends JBossTestCase 36 { 37 protected Properties jndiProps; 38 39 public JBossIIOPTestCase(String name) 40 { 41 super(name); 42 } 43 44 protected InitialContext getInitialContext() throws Exception 46 { 47 if( jndiProps == null ) 48 { 49 URL url = ClassLoader.getSystemResource("cosnaming.jndi.properties"); 50 jndiProps = new java.util.Properties (); 51 jndiProps.load(url.openStream()); 52 String host = System.getProperty("jbosstest.server.host", "localhost"); 53 String corbaloc = "corbaloc::"+host+":3528/JBoss/Naming/root"; 54 jndiProps.setProperty("java.naming.provider.url", corbaloc); 55 } 56 return new InitialContext (jndiProps); 57 } 58 59 protected InitialContext getInitialJnpContext() throws Exception 60 { 61 return super.getInitialContext(); 62 } 63 64 } 65 | Popular Tags |