User: mnf999  
  Date: 01/06/25 22:50:14

  Modified:    src/main/org/jboss/test/threading/mbean Threads.java
  Log:
  So far the fucking bug is eluding me... still no clear repro...
  
  Revision  Changes    Path
  1.2       +14 -7     jbosstest/src/main/org/jboss/test/threading/mbean/Threads.java
  
  Index: Threads.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/threading/mbean/Threads.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Threads.java      2001/06/26 01:08:50     1.1
  +++ Threads.java      2001/06/26 05:50:14     1.2
  @@ -18,7 +18,7 @@
   *
   *   @see <related>
   *   @author  <a href="mailto:[EMAIL PROTECTED]";>Marc Fleury</a>
  -*   @version $Revision: 1.1 $
  +*   @version $Revision: 1.2 $
   *   
   *   Revisions:
   *
  @@ -106,6 +106,9 @@
                                EJBThreads ejbTest;
                                while(runMe) 
                                {
  +                                     
  +                                     ejbTest = null;
  +                                     
                                        try {
                                                
                                                ejbTest = 
testHome.findByPrimaryKey("test1");
  @@ -113,24 +116,28 @@
                                        catch (Exception e) 
                                        {
                                                // Bean wasn't found create it 
  -                                             ejbTest = testHome.create("test1");
  +                                             try {
  +                                                     ejbTest = 
testHome.create("test1");
  +                                             }
  +                                     
  +                                             catch (Exception e2) {}
                                        }
                                        
  -                                     try {
  +                                     if (ejbTest != null) try {
                                                
                                                // get a random value between 1 and 100
                                                int value = random.nextInt(100);
                                                
                                                // 10% removal
  -                                             if (value <40) {
  +                                             if (value <10) {
                                                        ejbTest.remove();
                                                }
                                                // 40% normal
  -                                             else if (value<41) {
  +                                             else if (value<50) {
                                                        ejbTest.test();
                                                }
                                                // 20% business exception
  -                                             else if (value<42) {
  +                                             else if (value<70) {
                                                        
ejbTest.testBusinessException();
                                                }
                                                // 20 % runtime excpetion
  @@ -150,7 +157,7 @@
                                
                                }
                        }
  -                     catch (Exception e) {e.printStackTrace();}
  +                     catch (Exception e) {System.out.println("Exception for 
thread"+Thread.currentThread()); e.printStackTrace();}
                
                }
        }
  
  
  

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

Reply via email to