1 22 package org.jboss.ejb3.test.dd.override.unit; 23 24 import javax.naming.InitialContext ; 25 import javax.naming.NamingEnumeration ; 26 import org.jboss.logging.Logger; 27 import org.jboss.test.JBossTestCase; 28 import junit.framework.Test; 29 30 36 public class OverrideTestCase 37 extends JBossTestCase { 38 39 private static final Logger log = Logger 40 .getLogger(OverrideTestCase.class); 41 42 public OverrideTestCase(String name) 43 { 44 super(name); 45 } 46 87 88 public void testNaming() 89 { 90 lookup(""); 91 } 92 93 private void lookup(String name) 94 { 95 log.info("lookup " + name); 96 try { 97 InitialContext jndiContext = new InitialContext (); 98 NamingEnumeration names = jndiContext.list(name); 99 if (names != null){ 100 while (names.hasMore()){ 101 log.info(" " + names.next()); 102 } 103 } 104 } catch (Exception e){ 105 } 106 } 107 108 public static Test suite() throws Exception 109 { 110 return getDeploySetup(OverrideTestCase.class, "dd-override1B.jar"); 111 } 112 113 } 114 | Popular Tags |