KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > cts > ejb > BmpCallbackBean


1 /*
2   * JBoss, Home of Professional Open Source
3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
4   * by the @authors tag. See the copyright.txt in the distribution for a
5   * full listing of individual contributors.
6   *
7   * This is free software; you can redistribute it and/or modify it
8   * under the terms of the GNU Lesser General Public License as
9   * published by the Free Software Foundation; either version 2.1 of
10   * the License, or (at your option) any later version.
11   *
12   * This software 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 GNU
15   * Lesser General Public License for more details.
16   *
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this software; if not, write to the Free
19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21   */

22 package org.jboss.test.cts.ejb;
23
24
25
26 import org.jboss.test.cts.keys.*;
27 import java.rmi.RemoteException JavaDoc;
28 import java.util.Vector JavaDoc;
29 import java.util.Collection JavaDoc;
30 import java.sql.*;
31 import javax.naming.*;
32 import javax.ejb.*;
33 import javax.sql.DataSource JavaDoc;
34
35
36 public class BmpCallbackBean
37    implements EntityBean
38 {
39    org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(getClass());
40    
41     EntityContext ctx;
42
43    /**
44     * Method ejbCreate
45     *
46     *
47     * @param pk
48     * @param personsName
49     *
50     * @return
51     *
52     * @throws CreateException
53     * @throws DuplicateKeyException
54     * @throws EJBException
55     * @throws RemoteException
56     *
57     */

58
59    public AccountPK ejbCreate (AccountPK pk, String JavaDoc personsName)
60       throws CreateException, DuplicateKeyException, EJBException,
61              RemoteException JavaDoc
62    {
63       log.debug("entry ejbCreate");
64
65       return new AccountPK(pk.getKey());
66    }
67
68    /**
69     * Method ejbFindByPrimaryKey
70     *
71     *
72     * @param pk
73     *
74     * @return
75     *
76     * @throws EJBException
77     * @throws FinderException
78     * @throws RemoteException
79     *
80     */

81
82    public AccountPK ejbFindByPrimaryKey (AccountPK pk)
83       throws FinderException, EJBException, RemoteException JavaDoc
84    {
85       log.debug("entry ejbFindByPrimaryKey");
86
87       return new AccountPK(pk.getKey());
88    }
89
90    /**
91     * Method ejbPostCreate
92     *
93     *
94     * @param pk
95     * @param personsName
96     *
97     * @throws CreateException
98     * @throws DuplicateKeyException
99     * @throws EJBException
100     * @throws RemoteException
101     *
102     */

103
104    public void ejbPostCreate (AccountPK pk, String JavaDoc personsName)
105       throws CreateException, DuplicateKeyException, EJBException,
106              RemoteException JavaDoc
107    {
108       log.debug("ejbPostCreate (AccountPK, String) called");
109    }
110
111    /**
112     * Method ejbLoad
113     *
114     *
115     * @throws EJBException
116     * @throws RemoteException
117     *
118     */

119
120    public void ejbLoad ()
121       throws EJBException, RemoteException JavaDoc
122    {
123       log.debug("ejbLoad () called");
124    }
125
126    /**
127     * Method ejbStore
128     *
129     *
130     * @throws EJBException
131     * @throws RemoteException
132     *
133     */

134
135    public void ejbStore ()
136       throws EJBException, RemoteException JavaDoc
137    {
138       log.debug("ejbStore () called");
139
140    }
141
142    /**
143     * Method ejbRemove
144     *
145     *
146     * @throws EJBException
147     * @throws RemoteException
148     *
149     */

150
151    public void ejbRemove ()
152       throws EJBException, RemoteException JavaDoc
153    {
154       log.debug("ejbRemove () called");
155    }
156
157    /**
158     * Method ejbActivate
159     *
160     *
161     * @throws EJBException
162     * @throws RemoteException
163     *
164     */

165
166    public void ejbActivate ()
167       throws EJBException, RemoteException JavaDoc
168    {
169       log.debug("ejbActivate () called");
170    }
171
172    /**
173     * Method ejbPassivate
174     *
175     *
176     * @throws EJBException
177     * @throws RemoteException
178     *
179     */

180
181    public void ejbPassivate ()
182       throws EJBException, RemoteException JavaDoc
183    {
184       log.debug("ejbPassivate () called");
185    }
186
187    /**
188     * Method setEntityContext
189     *
190     *
191     * @param ctx
192     *
193     * @throws EJBException
194     * @throws RemoteException
195     *
196     */

197
198    public void setEntityContext (EntityContext ctx)
199       throws EJBException, RemoteException JavaDoc
200    {
201       log.debug("setEntityContext () called");
202
203       this.ctx = ctx;
204
205    }
206
207    /**
208     * Method unsetEntityContext
209     *
210     *
211     * @throws EJBException
212     * @throws RemoteException
213     *
214     */

215
216    public void unsetEntityContext ()
217       throws EJBException, RemoteException JavaDoc
218    {
219       log.debug("unsetEntityContext () called");
220
221       ctx = null;
222    }
223
224 }
225
226
227 /*------ Formatted by Jindent 3.23 Basic 1.0 --- http://www.jindent.de ------*/
228
229
230
Popular Tags