1 22 package org.jboss.test.cts.test; 23 24 import javax.naming.Context ; 25 import javax.naming.InitialContext ; 26 27 import junit.framework.Test; 28 29 import org.jboss.test.JBossTestCase; 30 import org.jboss.test.cts.interfaces.StatelessSession; 31 import org.jboss.test.cts.interfaces.StatelessSessionHome; 32 33 40 public class StatefulSessionLocalUnitTestCase 41 extends JBossTestCase 42 { 43 44 public StatefulSessionLocalUnitTestCase (String name) 45 { 46 super(name); 47 } 48 49 57 public void testPassivationByTimeLocal() throws Exception 58 { 59 Context ctx = new InitialContext (); 60 getLog().debug("+++ testPassivationByTimeLocal"); 61 StatelessSessionHome sessionHome = ( StatelessSessionHome ) ctx.lookup("ejbcts/StatelessSessionHome"); 62 StatelessSession session = sessionHome.create(); 63 session.testPassivationByTimeLocal(); 64 getLog().debug("--- testPassivationByTimeLocal"); 65 } 66 67 public static Test suite() throws Exception 68 { 69 return getDeploySetup(StatefulSessionLocalUnitTestCase.class, "cts.jar"); 70 } 71 } 72 | Popular Tags |