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: RequestCtx.java 8098 2006-03-09 14:15:42Z durieuxp $
023: * --------------------------------------------------------------------------
024: */package org.objectweb.jonas_ejb.container;
025:
026: import java.util.Hashtable;
027: import java.util.List;
028:
029: import javax.ejb.EJBContext;
030: import javax.naming.Context;
031: import javax.transaction.Transaction;
032:
033: import org.objectweb.util.monolog.api.BasicLevel;
034:
035: /**
036: * Context associated to a request to a bean.
037: * @author Philippe Coq, Philippe Durieux
038: */
039: public class RequestCtx {
040:
041: /**
042: * must commit current Tx at postInvoke
043: */
044: public boolean mustCommit = false;
045:
046: /**
047: * system exception or error raised in business method
048: */
049: public Throwable sysExc = null;
050:
051: /**
052: * Tx to be resumed at postInvoke
053: */
054: public Transaction clientTx = null;
055:
056: /**
057: * saved JNDICtx to be resumed at postInvoke
058: */
059: public Context jndiCtx = null;
060:
061: /**
062: * saved class loader to be resumed at postInvoke
063: */
064: public ClassLoader cloader = null;
065:
066: /**
067: * transaction in which the request will execute
068: */
069: public Transaction currTx = null;
070:
071: /**
072: * Used for stateful session at create and for stateless session beans
073: */
074: public JSessionContext ejbContext = null;
075:
076: /**
077: * ejb business method has been called
078: */
079: public boolean bmcalled = false;
080:
081: /**
082: * Transaction Attribute
083: */
084: public int txAttr = 0;
085:
086: /**
087: * Holds the state of the SFSB before calling the method (in preinvoke)
088: * COMPLETE Added for the replication mechanishm in HA service
089: */
090: public byte[] state;
091:
092: /**
093: * constructor. Called at preInvoke.
094: * @param txa Transaction Attribute.
095: */
096: public RequestCtx(int txa) {
097: if (TraceEjb.isDebugIc()) {
098: TraceEjb.interp.log(BasicLevel.DEBUG, "");
099: }
100: this.txAttr = txa;
101: }
102:
103: }
|