User: starksm Date: 02/02/25 12:59:57 Modified: src/main/org/jboss/test/hello/ejb HelloBean.java Log: Simplified the test code to get rid of tests that were not used and convered by other unit tests Revision Changes Path 1.4 +5 -105 jbosstest/src/main/org/jboss/test/hello/ejb/HelloBean.java Index: HelloBean.java =================================================================== RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/hello/ejb/HelloBean.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- HelloBean.java 15 Feb 2002 06:15:52 -0000 1.3 +++ HelloBean.java 25 Feb 2002 20:59:57 -0000 1.4 @@ -4,141 +4,37 @@ */ package org.jboss.test.hello.ejb; -import java.io.*; -import java.util.*; -import javax.ejb.*; +import javax.ejb.EJBException; import org.jboss.test.util.ejb.SessionSupport; -import org.jboss.test.hello.util.HelloUtil; import org.jboss.test.hello.interfaces.Hello; import org.jboss.test.hello.interfaces.HelloData; /** * - * @see <related> - * @author $Author: user57 $ - * @version $Revision: 1.3 $ + * @author [EMAIL PROTECTED] + * @version $Revision: 1.4 $ */ public class HelloBean extends SessionSupport { - // Constants ----------------------------------------------------- - - // Attributes ---------------------------------------------------- - - // Static -------------------------------------------------------- - - // Constructors -------------------------------------------------- - - // Public -------------------------------------------------------- public String hello(String name) { return "Hello "+name+"!"; } - + public Hello helloHello(Hello hello) { return hello; } - + public String howdy(HelloData name) { return "Howdy "+name.getName()+"!"; } - - public String sayHello() - { - return "Hello "+sessionCtx.getCallerPrincipal()+"!"; - } - - public void testSpeed(String name, int iter) - throws java.rmi.RemoteException - { - Hello hello = (Hello)sessionCtx.getEJBObject(); - for (int i = 0; i < iter; i++) - hello.hello(name); - } - - public void doNastyStuff() - { - // Try doing not allowed things - try - { - System.getProperty("java.home"); - System.setProperty("java.home","tjo"); - - throw new EJBException("Property Failed"); - } catch (EJBException e) - { - throw e; - } catch (Exception e) - { - } - -/* - try - { - new Thread(new Runnable() - { - public void run() { log.debug("Running"); } - }).start(); - throw new EJBException("Thread Failed"); - } catch (EJBException e) - { - throw e; - } catch (Exception e) - { - } -*/ - try - { - File f = new File("test.txt"); - new FileOutputStream(f).write("Tjosan".getBytes()); - - throw new EJBException("File Failed"); - } catch (EJBException e) - { - throw e; - } catch (Exception e) - { - } - - try - { - Properties cfg = new Properties(); - cfg.load(new HelloUtil().getResource("test.properties", this)); - log.debug(cfg); - } catch (EJBException e) - { - throw e; - } catch (Exception e) - { - throw new EJBException(e); - } - } - public void throwException() { throw new EJBException("Something went wrong"); } } - -/* - * $Id: HelloBean.java,v 1.3 2002/02/15 06:15:52 user57 Exp $ - * Currently locked by:$Locker: $ - * Revision: - * $Log: HelloBean.java,v $ - * Revision 1.3 2002/02/15 06:15:52 user57 - * o replaced most System.out usage with Log4j. should really introduce - * some base classes to make this mess more maintainable... - * - * Revision 1.2 2001/01/07 23:14:39 peter - * Trying to get JAAS to work within test suite. - * - * Revision 1.1.1.1 2000/06/21 15:52:34 oberg - * Initial import of jBoss test. This module contains CTS tests, some simple examples, and small bean suites. - * - * - * - */
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development