KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > tests > common > ejbs > stateless > containermanaged > ejb2view > CMTEjb2ViewBean


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: CMTEjb2ViewBean.java 826 2006-07-10 13:05:42Z pinheirg $
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.ejb2view;
26
27 import java.rmi.RemoteException JavaDoc;
28
29 import javax.ejb.CreateException JavaDoc;
30 import javax.ejb.Init JavaDoc;
31 import javax.ejb.Local JavaDoc;
32 import javax.ejb.LocalHome JavaDoc;
33 import javax.ejb.Remote JavaDoc;
34 import javax.ejb.RemoteHome JavaDoc;
35 import javax.ejb.Stateless JavaDoc;
36 import javax.ejb.TransactionAttribute JavaDoc;
37 import javax.ejb.TransactionAttributeType JavaDoc;
38
39 /**
40  * Bean defined as ejb 2.1.
41  * @author Gisele Pinheiro Souza
42  * @author Eduardo Studzinski Estima de Castro
43  *
44  */

45 @Stateless JavaDoc
46 @Remote JavaDoc(CMTEjb2View.class)
47 @Local JavaDoc(CMTEjb2LocalView.class)
48 @RemoteHome JavaDoc(CMTEjb2ViewHome.class)
49 @LocalHome JavaDoc(CMTEjb2ViewLocalHome.class)
50 public class CMTEjb2ViewBean{
51
52     /**
53      * The bean local create method.
54      * @throws CreateException if an error during the creation occurs.
55      */

56     @Init JavaDoc
57     public void initLocal() throws CreateException JavaDoc{
58
59     }
60
61     /**
62      * The bean create method.
63      * @throws CreateException if an error during the creation occurs.
64      * @throws RemoteException if a system level exception occurs.
65      */

66     @Init JavaDoc
67     public void initRemote() throws CreateException JavaDoc, RemoteException JavaDoc{
68
69     }
70
71     /**
72      * Does nothing, but has the transaction attribute mandatory.
73      * @throws RemoteException if a system level exception occurs.
74      */

75     @TransactionAttribute JavaDoc(TransactionAttributeType.MANDATORY)
76     public void attributeMandatory() throws RemoteException JavaDoc{
77
78     }
79
80     /**
81      * Does nothing, but has the transaction attribute never.
82      * @throws RemoteException if a system level exception occurs.
83      */

84     @TransactionAttribute JavaDoc(TransactionAttributeType.NEVER)
85     public void attributeNever() throws RemoteException JavaDoc{
86
87     }
88
89     /**
90      * Does nothing, but has the transaction attribute mandatory.
91      */

92     @TransactionAttribute JavaDoc(TransactionAttributeType.MANDATORY)
93     public void attributeMandatoryLocal(){
94
95     }
96
97     /**
98      * Does nothing, but has the transaction attribute never.
99      *
100      */

101     @TransactionAttribute JavaDoc(TransactionAttributeType.NEVER)
102     public void attributeNeverLocal(){
103
104     }
105
106  }
107
Popular Tags