01: /**
02: * EasyBeans
03: * Copyright (C) 2006 Bull S.A.S.
04: * Contact: easybeans@ow2.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or any later version.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this library; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19: * USA
20: *
21: * --------------------------------------------------------------------------
22: * $Id: SLSBTwoAroundInvokeError.java 1970 2007-10-16 11:49:25Z benoitf $
23: * --------------------------------------------------------------------------
24: */package org.ow2.easybeans.tests.enhancer.wrongspecification.bean;
25:
26: import javax.ejb.Stateless;
27: import javax.interceptor.AroundInvoke;
28: import javax.interceptor.InvocationContext;
29:
30: /**
31: * This bean has two annotations(AroundInvoke).
32: * It isn't in agreement with the JSR 220 - EJB 3.0 Spec.
33: * @author Eduardo Studzinski Estima de Castro
34: * @author Gisele Pinheiro Souza
35: *
36: */
37: @Stateless
38: public class SLSBTwoAroundInvokeError implements ItfOneMethod00 {
39:
40: /**
41: * Intercepts the method and do nothing.
42: * @param invocationContext contains attributes of invocation, the first
43: * parameter of the intercepted method must be a list.
44: * @return method's invocation result
45: * @throws Exception if invocation fails
46: */
47: @AroundInvoke
48: public Object doNothing1(final InvocationContext invocationContext)
49: throws Exception {
50: return invocationContext.proceed();
51: }
52:
53: /**
54: * Intercepts the method and do nothing.
55: * @param invocationContext contains attributes of invocation, the first
56: * parameter of the intercepted method must be a list.
57: * @return method's invocation result
58: * @throws Exception if invocation fails
59: */
60: @AroundInvoke
61: public Object doNothing2(final InvocationContext invocationContext)
62: throws Exception {
63: return invocationContext.proceed();
64: }
65:
66: /**
67: * Does nothing.
68: * @param i integer
69: * @return null
70: */
71: public Object doOne(final Integer i) {
72: return null;
73: }
74:
75: }
|