01: package org.mockejb;
02:
03: import java.lang.reflect.Method;
04:
05: /**
06: * Indicates that the method you're trying to call must be intercepted,
07: * MockEJB itself does not support this method.
08: * This is usually the case for CMP finders.
09: */
10: public class MustBeInterceptedException extends RuntimeException {
11:
12: /**
13: * @param method Method that must have been intercepted
14: */
15: public MustBeInterceptedException(Method method) {
16: super (
17: "The method "
18: + method.getName()
19: + " must be intercepted using AspectSystem and "
20: + "interceptors. MockEJB does not support CMP finders and sjbSelect methods.\n"
21: + method);
22: }
23:
24: public MustBeInterceptedException() {
25: super (
26: "The method that you are trying to call must be intercepted using AspectSystem and "
27: + "interceptors. MockEJB does not support CMP finders and other methods.");
28:
29: }
30: }
|