KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > wssample > beans > ws > WSBeanEndpointSLL


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@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: WSBeanEndpointSLL.java,v 1.3 2004/06/02 08:48:21 sauthieg Exp $
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.wssample.beans.ws;
26
27 import javax.ejb.CreateException JavaDoc;
28 import javax.ejb.SessionBean JavaDoc;
29 import javax.ejb.SessionContext JavaDoc;
30
31 import org.objectweb.jonas.common.Log;
32 import org.objectweb.util.monolog.api.Logger;
33 import org.objectweb.util.monolog.api.BasicLevel;
34
35 /**
36  *
37  */

38 public class WSBeanEndpointSLL implements SessionBean JavaDoc {
39
40     /**
41      * logger
42      */

43     private static Logger logger = null;
44
45     /**
46      * EJB SessionContext
47      */

48     private SessionContext JavaDoc ejbContext;
49
50     // ------------------------------------------------------------------
51
// SessionBean implementation
52
// ------------------------------------------------------------------
53

54     /**
55      * Set the SessionContext
56      * @param ctx SessionContext
57      */

58     public void setSessionContext(SessionContext JavaDoc ctx) {
59         if (logger == null) {
60             logger = Log.getLogger("org.objectweb.jonas_tests");
61         }
62         logger.log(BasicLevel.DEBUG, "");
63         ejbContext = ctx;
64     }
65
66     /**
67      * ejbRemove
68      */

69     public void ejbRemove() {
70         logger.log(BasicLevel.DEBUG, "");
71     }
72
73     /**
74      * ejbRemove
75      * @throws CreateException CreateException
76      */

77     public void ejbCreate() throws CreateException JavaDoc {
78         logger.log(BasicLevel.DEBUG, "");
79     }
80
81     /**
82      * ejbPassivate
83      */

84     public void ejbPassivate() {
85         logger.log(BasicLevel.DEBUG, "");
86     }
87
88     /**
89      * ejbActivate
90      */

91     public void ejbActivate() {
92         logger.log(BasicLevel.DEBUG, "");
93     }
94
95     // ------------------------------------------------------------------
96
// WSBeanEndpoint implementation
97
// ------------------------------------------------------------------
98

99     /**
100      * @param name name
101      * @return Returns "Hello " + name
102      */

103     public String JavaDoc sayHello(String JavaDoc name) {
104         logger.log(BasicLevel.INFO, "sayHello(" + name + ") invokation.");
105         return "Hello " + name;
106     }
107
108     /**
109      * @return Returns integer
110      */

111     public int getCotes() {
112         logger.log(BasicLevel.INFO, "getCotes invokation");
113         return 12;
114     }
115 }
116
117
Popular Tags