01: /**
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 1999 Bull S.A.
04: * Contact: jonas-team@objectweb.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * 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 6673 2005-04-28 16:53:00Z benoitf $
23: * --------------------------------------------------------------------------
24: */package org.objectweb.jonas_ejb.container;
25:
26: import javax.ejb.EJBException;
27: import javax.ejb.RemoveException;
28:
29: import org.objectweb.jonas_ejb.deployment.api.SessionDesc;
30:
31: import org.objectweb.util.monolog.api.BasicLevel;
32:
33: /**
34: * This class is the Standard LocalHome for Session objects It exists only for
35: * beans that have declared a Local Interface. It implements
36: * javax.ejb.EJBLocalHome interface It implements a pool of EJBLocalObject's
37: * @author Philippe Durieux
38: */
39: public abstract class JSessionLocalHome extends JLocalHome {
40:
41: /**
42: * constructor
43: * @param dd The Session Deployment Decriptor
44: * @param bf The Session Factory
45: */
46: public JSessionLocalHome(SessionDesc dd, JSessionFactory bf) {
47: super (dd, bf);
48: if (TraceEjb.isDebugIc()) {
49: TraceEjb.interp.log(BasicLevel.DEBUG, "");
50: }
51: }
52:
53: // ---------------------------------------------------------------
54: // EJBLocalHome implementation
55: // The only method is remove(pk)
56: // ---------------------------------------------------------------
57:
58: /**
59: * remove(pk) is not allowed for session beans
60: * @param pk the primary key
61: * @throws RemoveException Always.
62: */
63: public void remove(java.lang.Object pk) throws EJBException,
64: RemoveException {
65: throw new RemoveException(
66: "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: }
|