[JBoss-dev] CVS update: jbosstest/src/main/org/jboss/test/hello/ejb HelloBean.java

2002-02-25 Thread Scott M Stark

  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  ChangesPath
  1.4   +5 -105jbosstest/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.java15 Feb 2002 06:15:52 -  1.3
  +++ HelloBean.java25 Feb 2002 20:59:57 -  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



[JBoss-dev] CVS update: jbosstest/src/main/org/jboss/test/hello/ejb HelloBean.java

2002-02-14 Thread Jason Dillon

  User: user57  
  Date: 02/02/14 22:15:52

  Modified:src/main/org/jboss/test/hello/ejb HelloBean.java
  Log:
   o replaced most System.out usage with Log4j.  should really introduce
 some base classes to make this mess more maintainable...
  
  Revision  ChangesPath
  1.3   +8 -5  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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HelloBean.java7 Jan 2001 23:14:39 -   1.2
  +++ HelloBean.java15 Feb 2002 06:15:52 -  1.3
  @@ -16,8 +16,8 @@
   /**
*  
*   @see related
  - *   @author $Author: peter $
  - *   @version $Revision: 1.2 $
  + *   @author $Author: user57 $
  + *   @version $Revision: 1.3 $
*/
   public class HelloBean
  extends SessionSupport
  @@ -80,7 +80,7 @@
 {
new Thread(new Runnable()
   {
  -   public void run() { System.out.println(Running); }
  +   public void run() { log.debug(Running); }
   }).start();
throw new EJBException(Thread Failed);
 } catch (EJBException e)
  @@ -108,7 +108,7 @@
 {
Properties cfg = new Properties();
cfg.load(new HelloUtil().getResource(test.properties, this));
  - System.out.println(cfg);
  + log.debug(cfg);
 } catch (EJBException e)
 {
throw e;
  @@ -125,10 +125,14 @@
   }
   
   /*
  - *   $Id: HelloBean.java,v 1.2 2001/01/07 23:14:39 peter Exp $
  + *   $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.
*
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development