KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opensubsystems > core > logic > impl > StatelessControllerImpl


1 /*
2  * Copyright (c) 2005 - 2007 OpenSubsystems s.r.o. Slovak Republic. All rights reserved.
3  *
4  * Project: OpenSubsystems
5  *
6  * $Id: StatelessControllerImpl.java,v 1.16 2007/01/07 06:14:42 bastafidli Exp $
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; version 2 of the License.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  */

21
22 package org.opensubsystems.core.logic.impl;
23
24 import java.rmi.RemoteException JavaDoc;
25
26 import javax.ejb.EJBException JavaDoc;
27 import javax.ejb.SessionBean JavaDoc;
28 import javax.ejb.SessionContext JavaDoc;
29
30 import org.opensubsystems.core.error.OSSException;
31 import org.opensubsystems.core.logic.StatelessController;
32
33 /**
34  * Implementation of StatelessController. This controller will be base class for
35  * all deriver controller implementation classes.
36  *
37  * The main reason why all the xdoclet EJB related tags, implements SessionBeans
38  * and methods are here is that XDoclet will not generate the required interfaces
39  * for derived beans if this is not here. And since we are using derived controllers
40  * as POJOs they cannot be abstract and therefore we have to have implementation
41  * of the SessionBean methods here. NEVER PUT ANY CODE INTO THESE METHODS since
42  * xdoclet will eventually generate xxxEjb class which will contain these same
43  * methods therefore basically hiding the implementation here
44  *
45  * We do not want to generate EJB for this class since it is abstract base
46  * class for real EJBs
47  * @ejb.bean generate="false"
48  *
49  * We need to generate interface since xdoclet will require them for interfaces
50  * derived from StatelessController. Since remote and local interfaces have to
51  * extend different ejb interfaces and we have only one base interface, the
52  * extends tags have to except our controller contain also the interfaces
53  * required by the spec
54  * @ejb.interface
55  * local-extends="javax.ejb.EJBLocalObject, org.opensubsystems.core.logic.StatelessController"
56  * extends="javax.ejb.EJBObject, org.opensubsystems.core.logic.StatelessController"
57  *
58  * @version $Id: StatelessControllerImpl.java,v 1.16 2007/01/07 06:14:42 bastafidli Exp $
59  * @author Julo Legeny
60  * @code.reviewer Miro Halas
61  * @code.reviewed 1.13 2005/09/22 13:44:15 bastafidli
62  */

63 public abstract class StatelessControllerImpl implements StatelessController,
64                                                          SessionBean JavaDoc
65 {
66    // Public methods ///////////////////////////////////////////////////////////
67

68    /**
69     * {@inheritDoc}
70     */

71    public void ejbActivate(
72    ) throws EJBException JavaDoc,
73             RemoteException JavaDoc
74    {
75       // Never put any code here, read comments in header
76
}
77
78    /**
79     * {@inheritDoc}
80     */

81    public void ejbPassivate(
82    ) throws EJBException JavaDoc,
83             RemoteException JavaDoc
84    {
85       // Never put any code here, read comments in header
86
}
87
88    /**
89     * {@inheritDoc}
90     */

91    public void ejbRemove(
92    ) throws EJBException JavaDoc,
93             RemoteException JavaDoc
94    {
95       // Never put any code here, read comments in header
96
}
97
98    /**
99     * {@inheritDoc}
100     */

101    public void setSessionContext(
102       SessionContext JavaDoc sessionContext
103    ) throws EJBException JavaDoc,
104             RemoteException JavaDoc
105    {
106       // Never put any code here, read comments in header
107
}
108    
109    /**
110     * {@inheritDoc}
111     *
112     * @ejb.interface-method
113     * @ejb.transaction type="Supports"
114     */

115    public void constructor() throws OSSException
116    {
117       // This emtpy method has to be defined here WITHOUT throwing RemoteException
118
// otherwise XDoclet will not generate this method into the interface
119
// and once used in derived beans it will not build during stub generation.
120
// It has to have the @ejb.interface-method so that xdoclet generated
121
// correct interface methods
122
}
123 }
124
Popular Tags