1 /**2 * EasyBeans3 * Copyright (C) 2006 Bull S.A.S.4 * Contact: easybeans@objectweb.org5 *6 * This library is free software; you can redistribute it and/or7 * modify it under the terms of the GNU Lesser General Public8 * License as published by the Free Software Foundation; either9 * 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 of13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU14 * Lesser General Public License for more details.15 *16 * You should have received a copy of the GNU Lesser General Public17 * License along with this library; if not, write to the Free Software18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-130719 * USA20 *21 * --------------------------------------------------------------------------22 * $Id: SLSBInvocationContext02.java 880 2006-07-17 11:51:17Z studzine $23 * --------------------------------------------------------------------------24 */25 package org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.invocationcontext;26 27 import javax.ejb.Remote ;28 import javax.ejb.Stateless ;29 import javax.interceptor.AroundInvoke;30 import javax.interceptor.Interceptors;31 import javax.interceptor.InvocationContext;32 33 import org.objectweb.easybeans.tests.common.ejbs.base.invocationcontext.ItfInvocationParameter01;34 import org.objectweb.easybeans.tests.common.helper.InvocationContextHelper;35 import org.objectweb.easybeans.tests.common.interceptors.invocationcontext.BeanDescriptor;36 import org.objectweb.easybeans.tests.common.interceptors.invocationcontext.ComplexObject00;37 import org.objectweb.easybeans.tests.common.interceptors.invocationcontext.ICDataAddInterceptor;38 import org.objectweb.easybeans.tests.common.interceptors.invocationcontext.ICDataCheckEmptyInterceptor;39 import org.objectweb.easybeans.tests.common.interceptors.invocationcontext.ICDataClearInterceptor;40 41 /**42 * This bean is used to manipulate the invocation context object.43 * @author Eduardo Studzinski E. de Castro44 * @author Gisele Pinheiro Souza45 */46 @Stateless 47 @Remote 48 @Interceptors({ICDataAddInterceptor.class, ICDataClearInterceptor.class, ICDataCheckEmptyInterceptor.class})49 public class SLSBInvocationContext02 implements ItfInvocationParameter01 {50 51 /**52 * Returns objects passed as parameters.53 * @param objCP complex object54 * @param beanDescriptor a bean descriptor55 * @return null56 * @throws Exception if a problem occurs.57 */58 @Interceptors({ICDataCheckEmptyInterceptor.class, ICDataAddInterceptor.class, ICDataClearInterceptor.class,59 ICDataCheckEmptyInterceptor.class, ICDataAddInterceptor.class, ICDataClearInterceptor.class})60 public Object [] getObjects(final ComplexObject00 objCP, final BeanDescriptor beanDescriptor) throws Exception {61 return null;62 }63 64 /**65 * Interceptor that checks the invocation context object.66 * @param ic contains attributes of invocation67 * @return method's invocation result68 * @throws Exception if invocation fails69 */70 @AroundInvoke71 public Object intercept(final InvocationContext ic) throws Exception {72 return InvocationContextHelper.isEmptyContextData(ic);73 }74 }75