KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > jtests > beans > etype > EtypeBean


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: EtypeBean.java,v 1.2 2004/03/19 11:57:20 benoitf Exp $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.jonas.jtests.beans.etype;
27
28 import javax.ejb.EntityBean JavaDoc;
29 import javax.ejb.EntityContext JavaDoc;
30 import javax.ejb.RemoveException JavaDoc;
31
32 import org.objectweb.jonas.common.Log;
33 import org.objectweb.util.monolog.api.BasicLevel;
34 import org.objectweb.util.monolog.api.Logger;
35
36
37 /**
38  * This class implements the common code of all the entities beans classes of the etype/* tests.
39  * @author Helene Joanin
40  * Contributor(s):
41  */

42
43 public abstract class EtypeBean implements EntityBean JavaDoc {
44
45     static protected Logger logger = null;
46
47     protected EntityContext JavaDoc entityContext;
48
49     public void setEntityContext(EntityContext JavaDoc ctx) {
50     if (logger == null)
51         logger = Log.getLogger(Log.JONAS_TESTS_PREFIX);
52     logger.log(BasicLevel.DEBUG, "");
53     entityContext = ctx;
54     
55     }
56
57     public void unsetEntityContext() {
58     logger.log(BasicLevel.DEBUG, "");
59     }
60
61     public void ejbActivate() {
62     logger.log(BasicLevel.DEBUG, "");
63     }
64
65     public void ejbPassivate() {
66     logger.log(BasicLevel.DEBUG, "");
67     }
68
69     public void ejbLoad() {
70     logger.log(BasicLevel.DEBUG, "");
71     }
72
73     public void ejbStore() {
74     logger.log(BasicLevel.DEBUG, "");
75     }
76   
77     public void ejbRemove() throws RemoveException JavaDoc {
78     logger.log(BasicLevel.DEBUG, "");
79     }
80
81
82 }
83
Popular Tags