KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > tests > common > ejbs > stateless > containermanaged > simpleentry > SLSBSimpleEnvEntryReference00


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: SLSBSimpleEnvEntryReference00.java 547 2006-05-30 13:50:43Z studzine $
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.simpleentry;
26
27 import static org.objectweb.easybeans.tests.common.helper.ContextHelper.checkSimpleEntry;
28
29 import javax.annotation.Resource;
30 import javax.annotation.Resources;
31 import javax.ejb.Remote JavaDoc;
32 import javax.ejb.SessionContext JavaDoc;
33 import javax.ejb.Stateless JavaDoc;
34
35 import org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry;
36
37 /**
38  * This bean is used to test the "resource" annotation on the bean class. Resources will be declared in the
39  * environment, but they will not be injected.
40  * @author Eduardo Studzinski Estima de Castro
41  * @author Gisele Pinheiro Souza
42  */

43 @Stateless JavaDoc(name="SLSBSimpleEnvEntryReference00")
44 @Remote JavaDoc({ItfSimpleEnvEntry.class})
45 @Resources({@Resource(name = "str00", type = java.lang.String JavaDoc.class),
46         @Resource(name = "chr00", type = java.lang.Character JavaDoc.class),
47         @Resource(name = "str00", type = java.lang.Integer JavaDoc.class),
48         @Resource(name = "int00", type = java.lang.Integer JavaDoc.class),
49         @Resource(name = "bol00", type = java.lang.Boolean JavaDoc.class),
50         @Resource(name = "dbl00", type = java.lang.Double JavaDoc.class),
51         @Resource(name = "bte00", type = java.lang.Byte JavaDoc.class),
52         @Resource(name = "shr00", type = java.lang.Short JavaDoc.class),
53         @Resource(name = "lng00", type = java.lang.Long JavaDoc.class),
54         @Resource(name = "flt00", type = java.lang.Float JavaDoc.class)})
55 @Resource(name = "fltAlone00", type = java.lang.Float JavaDoc.class)
56 public class SLSBSimpleEnvEntryReference00 implements ItfSimpleEnvEntry{
57
58     /**
59      * SessionContext.
60      */

61     @Resource
62     private SessionContext JavaDoc sessionContext;
63
64     /**
65      * @see org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry
66      */

67     public void checkString00() {
68         checkSimpleEntry(sessionContext, "str00", ENTRY_STRING);
69     }
70
71     /**
72      * @see org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry
73      */

74     public void checkCharacter00() {
75         checkSimpleEntry(sessionContext, "chr00", ENTRY_CHARACTER);
76     }
77
78     /**
79      * @see org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry
80      */

81     public void checkInteger00() {
82         checkSimpleEntry(sessionContext, "int00", ENTRY_INTEGER);
83     }
84
85     /**
86      * @see org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry
87      */

88     public void checkBoolean00() {
89         checkSimpleEntry(sessionContext, "bol00", ENTRY_BOOLEAN);
90     }
91
92     /**
93      * @see org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry
94      */

95     public void checkDouble00() {
96         checkSimpleEntry(sessionContext, "dbl00", ENTRY_DOUBLE);
97     }
98
99     /**
100      * @see org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry
101      */

102     public void checkByte00() {
103         checkSimpleEntry(sessionContext, "bte00", ENTRY_BYTE);
104     }
105
106     /**
107      * @see org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry
108      */

109     public void checkShort00() {
110         checkSimpleEntry(sessionContext, "shr00", ENTRY_SHORT);
111     }
112
113     /**
114      * @see org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry
115      */

116     public void checkLong00() {
117         checkSimpleEntry(sessionContext, "lng00", ENTRY_LONG);
118     }
119
120     /**
121      * @see org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry
122      */

123     public void checkFloat00() {
124         //@Resources tes
125
checkSimpleEntry(sessionContext, "flt00", ENTRY_FLOAT);
126         //@Resource test
127
checkSimpleEntry(sessionContext, "fltAlone00", ENTRY_FLOAT);
128     }
129
130 }
131
Popular Tags