01: package org.mockejb;
02:
03: import java.lang.reflect.Method;
04:
05: /**
06: * Dummmy object used to trigger "must be intercepted" exception when
07: * an attempt was made to call finder or ejbSelect that MockEJB does not handle.
08: */
09: class DummyCMPBean {
10:
11: public void throwMustBeIntercepted() {
12: throw new MustBeInterceptedException();
13: }
14:
15: Method getTargetMethod() throws SecurityException,
16: NoSuchMethodException {
17:
18: Method targetMethod = this .getClass().getMethod(
19: "throwMustBeIntercepted", new Class[] {});
20:
21: return targetMethod;
22: }
23:
24: }
|