KickJava   Java API By Example, From Geeks To Geeks.

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


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

25
26 package org.objectweb.jonas_ejb.container;
27
28 import javax.ejb.EJBException JavaDoc;
29 import javax.ejb.RemoveException JavaDoc;
30
31 import org.objectweb.jonas_ejb.deployment.api.SessionDesc;
32
33 import org.objectweb.util.monolog.api.BasicLevel;
34
35 /**
36  * This class is the Standard LocalHome for Session objects It exists only for
37  * beans that have declared a Local Interface. It implements
38  * javax.ejb.EJBLocalHome interface It implements a pool of EJBLocalObject's
39  * @author Philippe Durieux
40  */

41 public abstract class JSessionLocalHome extends JLocalHome {
42
43     /**
44      * constructor
45      * @param dd The Session Deployment Decriptor
46      * @param bf The Session Factory
47      */

48     public JSessionLocalHome(SessionDesc dd, JSessionFactory bf) {
49         super(dd, bf);
50         if (TraceEjb.isDebugIc()) {
51             TraceEjb.interp.log(BasicLevel.DEBUG, "");
52         }
53     }
54
55     // ---------------------------------------------------------------
56
// EJBLocalHome implementation
57
// The only method is remove(pk)
58
// ---------------------------------------------------------------
59

60     /**
61      * remove(pk) is not allowed for session beans
62      * @param pk the primary key
63      * @throws RemoveException Always.
64      */

65     public void remove(java.lang.Object JavaDoc pk) throws EJBException JavaDoc, RemoveException JavaDoc {
66         throw new RemoveException JavaDoc("remove by PK Cannot be called in a session bean");
67     }
68
69     // ---------------------------------------------------------------
70
// other public methods, for internal use.
71
// ---------------------------------------------------------------
72

73     /**
74      * Creates the EJBLocalObject This is in the generated class because it is
75      * mainly "new objectClass()"
76      * @return The Local Object
77      */

78     abstract public JSessionLocal createLocalObject();
79
80 }
Popular Tags