1 22 package org.jboss.ejb3.test.standalone; 23 24 import javax.ejb.Stateless ; 25 import javax.interceptor.Interceptors; 26 27 33 @Stateless  34 public class CalculatorBean implements CalculatorLocal, CalculatorRemote 35 { 36 public static boolean test = false; 37 38 public int add(int x, int y) 39 { 40 if (test && StupidInterceptor.count != 1) 41 { 42 System.out.println("Throwing count exception"); 43 throw new RuntimeException ("count is wrong: " + StupidInterceptor.count); 44 } 45 return x + y; 46 } 47 48 public int sub(int x, int y) 49 { 50 return x - y; 51 } 52 } 53 | Popular Tags |