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: DerivedSF.java 4406 2004-03-19 11:57:20Z benoitf $
023: * --------------------------------------------------------------------------
024: */
025:
026: // DerivedSF.java
027: package org.objectweb.jonas.jtests.beans.secured;
028:
029: import javax.ejb.EJBContext;
030: import javax.ejb.SessionBean;
031: import javax.ejb.SessionContext;
032:
033: import org.objectweb.jonas.common.Log;
034: import org.objectweb.util.monolog.api.BasicLevel;
035:
036: public class DerivedSF extends BaseCommon implements SessionBean {
037:
038: protected SessionContext ejbContext;
039:
040: public EJBContext getEJBContext() {
041: return ejbContext;
042: }
043:
044: // ------------------------------------------------------------------
045: // SessionBean implementation
046: // ------------------------------------------------------------------
047:
048: public void setSessionContext(SessionContext ctx) {
049: if (logger == null)
050: logger = Log.getLogger(Log.JONAS_TESTS_PREFIX);
051: logger.log(BasicLevel.DEBUG, "");
052: ejbContext = ctx;
053: }
054:
055: public void ejbRemove() {
056: logger.log(BasicLevel.DEBUG, "");
057: }
058:
059: public void ejbCreate() {
060: logger.log(BasicLevel.DEBUG, "");
061: }
062:
063: public void ejbPassivate() {
064: logger.log(BasicLevel.DEBUG, "");
065: }
066:
067: public void ejbActivate() {
068: logger.log(BasicLevel.DEBUG, "");
069: }
070:
071: // ------------------------------------------------------------------
072: // Derived Interface Remote implementation
073: // ------------------------------------------------------------------
074:
075: public void otherMethod() {
076: logger.log(BasicLevel.DEBUG, "");
077: }
078:
079: // ------------------------------------------------------------------
080: // Derived Interface Local implementation
081: // ------------------------------------------------------------------
082:
083: public void anotherMethod() {
084: logger.log(BasicLevel.DEBUG, "");
085: }
086:
087: public void noRunAsWithRole1() {
088: logger.log(BasicLevel.DEBUG, "");
089: }
090:
091: public void noRunAsWithRole2() {
092: logger.log(BasicLevel.DEBUG, "");
093: }
094:
095: public void runAsRole2() {
096: logger.log(BasicLevel.DEBUG, "");
097: }
098:
099: public void runAsWithRole2() {
100: logger.log(BasicLevel.DEBUG, "");
101: }
102:
103: public void runAsWithRole1() {
104: logger.log(BasicLevel.DEBUG, "");
105: }
106:
107: public void runAsRole3() {
108: logger.log(BasicLevel.DEBUG, "");
109: }
110:
111: public void runAsRole2AndCallAnotherBean() {
112: logger.log(BasicLevel.DEBUG, "");
113: }
114:
115: }
|