KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas_ejb > container > RequestCtx


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: RequestCtx.java,v 1.16 2005/04/28 16:52:59 benoitf Exp $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.jonas_ejb.container;
27
28 import java.util.List JavaDoc;
29
30 import javax.ejb.EJBContext JavaDoc;
31 import javax.naming.Context JavaDoc;
32 import javax.transaction.Transaction JavaDoc;
33
34 import org.objectweb.util.monolog.api.BasicLevel;
35
36 /**
37  * Context associated to a request to a bean.
38  * @author Philippe Coq, Philippe Durieux
39  */

40 public class RequestCtx {
41
42     /**
43      * must commit current Tx at postInvoke
44      */

45     public boolean mustCommit = false;
46
47     /**
48      * system exception or error raised in business method
49      */

50     public Throwable JavaDoc sysExc = null;
51
52     /**
53      * Tx to be resumed at postInvoke
54      */

55     public Transaction JavaDoc clientTx = null;
56
57     /**
58      * saved JNDICtx to be resumed at postInvoke
59      */

60     public Context JavaDoc jndiCtx = null;
61
62     /**
63      * saved class loader to be resumed at postInvoke
64      */

65     public ClassLoader JavaDoc cloader = null;
66
67     /**
68      * transaction in which the request will execute
69      */

70     public Transaction JavaDoc currTx = null;
71
72     /**
73      * Used at least for stateful session at create.
74      */

75     public EJBContext JavaDoc ejbContext = null;
76
77     /**
78      * ejb business method has been called
79      */

80     public boolean bmcalled = false;
81
82     /**
83      * Transaction Attribute
84      */

85     public int txAttr = 0;
86
87     /**
88      * constructor. Called at preInvoke.
89      * @param txa Transaction Attribute.
90      */

91     public RequestCtx(int txa) {
92         if (TraceEjb.isDebugIc()) {
93             TraceEjb.interp.log(BasicLevel.DEBUG, "");
94         }
95         this.txAttr = txa;
96     }
97
98 }
99
Popular Tags