KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > tests > common > ejbs > stateless > containermanaged > basic > SLSBSessionBeanTester02


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: SLSBSessionBeanTester02.java 896 2006-07-20 08:37:35Z pinheirg $
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.basic;
26
27 import javax.ejb.EJB JavaDoc;
28 import javax.ejb.Remote JavaDoc;
29 import javax.ejb.Stateless JavaDoc;
30
31 import org.objectweb.easybeans.tests.common.ejbs.base.ItfSimplePrintMessage;
32
33 /**
34  * Verifies if a bean that does not implemesnts the local and remote business
35  * interface can be deployed and injected.
36  * @author Gisele Pinheiro Souza
37  * @author Eduardo Studzinski Estima de Castro
38  */

39 @Stateless JavaDoc
40 @Remote JavaDoc
41 public class SLSBSessionBeanTester02 implements ItfSessionBeanTester01 {
42
43     /**
44      * Simple stateless bean.
45      */

46     @EJB JavaDoc(beanName = "SLSBDeployTest03")
47     private ItfSimplePrintMessage slsbBeanRemote;
48
49     /**
50      * Simple stateful bean.
51      */

52     @EJB JavaDoc(beanName = "SFSBDeployTest03")
53     private ItfSimplePrintMessage sfsbBeanRemote;
54
55     /**
56      * Simple stateless bean.
57      */

58     @EJB JavaDoc(beanName = "SLSBDeployTest04")
59     private ItfSimplePrintMessage slsbBeanLocal;
60
61     /**
62      * Simple stateful bean.
63      */

64     @EJB JavaDoc(beanName = "SFSBDeployTest04")
65     private ItfSimplePrintMessage sfsbBeanLocal;
66
67     /**
68      * Verifies if the local instance of the stateless bean injected is not
69      * null. The local bean interface as well as the annotation are defined in
70      * the superclass.
71      */

72     public void testSLLocal(){
73         slsbBeanLocal.getMessage();
74     }
75
76     /**
77      * Verifies if the local instance of the stateful bean injected is not
78      * null. The local bean interface as well as the annotation are defined in
79      * the superclass.
80      */

81     public void testSFLocal(){
82         sfsbBeanLocal.getMessage();
83     }
84
85     /**
86      * Verifies if the remtoe instance of the stateless bean injected is not
87      * null. The remote bean interface as well as the annotation are defined in
88      * the superclass.
89      */

90     public void testSLRemote(){
91         slsbBeanRemote.getMessage();
92     }
93
94     /**
95      * Verifies if the remote instance of the stateful bean injected is not
96      * null. The remote bean interface as well as the annotation are defined in
97      * the superclass.
98      */

99     public void testSFRemote(){
100         sfsbBeanRemote.getMessage();
101     }
102
103 }
104
Popular Tags