KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > tests > common > ejbs > stateful > containermanaged > sbinterface > SFSBSessionBeanItfWithAnnotation


1 /**
2  * EasyBeans
3  * Copyright (C) 2006 Bull S.A.S.
4  * Contact: easybeans@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * 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$
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.sbinterface;
26
27 import java.rmi.RemoteException JavaDoc;
28
29 import javax.annotation.PreDestroy;
30 import javax.ejb.EJBException JavaDoc;
31 import javax.ejb.PostActivate JavaDoc;
32 import javax.ejb.PrePassivate JavaDoc;
33 import javax.ejb.Remote JavaDoc;
34 import javax.ejb.Remove JavaDoc;
35 import javax.ejb.SessionBean JavaDoc;
36 import javax.ejb.SessionContext JavaDoc;
37 import javax.ejb.Stateful JavaDoc;
38
39 import org.objectweb.easybeans.tests.common.ejbs.base.ItfCheck01;
40 import org.objectweb.easybeans.tests.common.ejbs.base.ItfCheck02;
41 import org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.CallbackType;
42 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.callbacklogger.BaseInsertCallbackEvent;
43
44 /**
45  * This class is used as base to test the sessionbean interface.
46  * @author Eduardo Studzinski Estima de Castro
47  * @author Gisele Pinheiro Souza
48  */

49 @Stateful JavaDoc(name = "SFSBSessionBeanItfWithAnnotation")
50 @Remote JavaDoc(ItfCheck02.class)
51 public class SFSBSessionBeanItfWithAnnotation extends BaseInsertCallbackEvent implements SessionBean JavaDoc, ItfCheck02 {
52
53     /**
54      * ID.
55      */

56     private static final long serialVersionUID = 1L;
57
58     /**
59      * ejbActivate method.
60      * @throws EJBException if a problem occurs.
61      * @throws RemoteException if a problem occurs.
62      */

63     @PostActivate JavaDoc
64     public void ejbActivate() throws EJBException JavaDoc, RemoteException JavaDoc {
65         //TODO: test case
66
super.log(SFSBSessionBeanItfWithAnnotation.class.getName(), CallbackType.POST_ACTIVATE,
67                 SFSBSessionBeanItfWithAnnotation.class.getName());
68     }
69
70     /**
71      * ejbPassivate method.
72      * @throws EJBException if a problem occurs.
73      * @throws RemoteException if a problem occurs.
74      */

75     @PrePassivate JavaDoc
76     public void ejbPassivate() throws EJBException JavaDoc, RemoteException JavaDoc {
77         //TODO: test case
78
super.log(SFSBSessionBeanItfWithAnnotation.class.getName(), CallbackType.PRE_PASSIVATE,
79                 SFSBSessionBeanItfWithAnnotation.class.getName());
80     }
81
82     /**
83      * ejbRemove method.
84      * @throws EJBException if a problem occurs.
85      * @throws RemoteException if a problem occurs.
86      */

87     @PreDestroy
88     public void ejbRemove() throws EJBException JavaDoc, RemoteException JavaDoc {
89         super.log(SFSBSessionBeanItfWithAnnotation.class.getName(), CallbackType.PRE_DESTROY,
90                 SFSBSessionBeanItfWithAnnotation.class.getName());
91     }
92
93     /**
94      * Sets the SessionContext.
95      * @param ctx SessionContext
96      * @throws EJBException if a problem occurs.
97      * @throws RemoteException if a problem occurs.
98      */

99     public void setSessionContext(final SessionContext JavaDoc ctx) throws EJBException JavaDoc, RemoteException JavaDoc {
100     }
101
102     /**
103      * Does nothing.
104      * @throws Exception if a problem occurs.
105      */

106     public void check() throws Exception JavaDoc {
107     }
108
109     /**
110      * Bean remove.
111      */

112     @Remove JavaDoc
113     public void remove() {
114     }
115
116 }
117
Popular Tags