001: /**
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 1999 Bull S.A.
004: * Contact: jonas-team@objectweb.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * --------------------------------------------------------------------------
022: * $Id: WSBeanEndpointSLL.java 4883 2004-06-02 08:48:21Z sauthieg $
023: * --------------------------------------------------------------------------
024: */package org.objectweb.wssample.beans.ws;
025:
026: import javax.ejb.CreateException;
027: import javax.ejb.SessionBean;
028: import javax.ejb.SessionContext;
029:
030: import org.objectweb.jonas.common.Log;
031: import org.objectweb.util.monolog.api.Logger;
032: import org.objectweb.util.monolog.api.BasicLevel;
033:
034: /**
035: *
036: */
037: public class WSBeanEndpointSLL implements SessionBean {
038:
039: /**
040: * logger
041: */
042: private static Logger logger = null;
043:
044: /**
045: * EJB SessionContext
046: */
047: private SessionContext ejbContext;
048:
049: // ------------------------------------------------------------------
050: // SessionBean implementation
051: // ------------------------------------------------------------------
052:
053: /**
054: * Set the SessionContext
055: * @param ctx SessionContext
056: */
057: public void setSessionContext(SessionContext ctx) {
058: if (logger == null) {
059: logger = Log.getLogger("org.objectweb.jonas_tests");
060: }
061: logger.log(BasicLevel.DEBUG, "");
062: ejbContext = ctx;
063: }
064:
065: /**
066: * ejbRemove
067: */
068: public void ejbRemove() {
069: logger.log(BasicLevel.DEBUG, "");
070: }
071:
072: /**
073: * ejbRemove
074: * @throws CreateException CreateException
075: */
076: public void ejbCreate() throws CreateException {
077: logger.log(BasicLevel.DEBUG, "");
078: }
079:
080: /**
081: * ejbPassivate
082: */
083: public void ejbPassivate() {
084: logger.log(BasicLevel.DEBUG, "");
085: }
086:
087: /**
088: * ejbActivate
089: */
090: public void ejbActivate() {
091: logger.log(BasicLevel.DEBUG, "");
092: }
093:
094: // ------------------------------------------------------------------
095: // WSBeanEndpoint implementation
096: // ------------------------------------------------------------------
097:
098: /**
099: * @param name name
100: * @return Returns "Hello " + name
101: */
102: public String sayHello(String name) {
103: logger.log(BasicLevel.INFO, "sayHello(" + name
104: + ") 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: }
|