001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.test.cts.ejb;
023:
024: import org.jboss.test.cts.keys.*;
025: import java.rmi.RemoteException;
026: import java.util.Vector;
027: import java.util.Collection;
028: import java.sql.*;
029: import javax.naming.*;
030: import javax.ejb.*;
031: import javax.sql.DataSource;
032:
033: public class BmpCallbackBean implements EntityBean {
034: org.apache.log4j.Category log = org.apache.log4j.Category
035: .getInstance(getClass());
036:
037: EntityContext ctx;
038:
039: /**
040: * Method ejbCreate
041: *
042: *
043: * @param pk
044: * @param personsName
045: *
046: * @return
047: *
048: * @throws CreateException
049: * @throws DuplicateKeyException
050: * @throws EJBException
051: * @throws RemoteException
052: *
053: */
054:
055: public AccountPK ejbCreate(AccountPK pk, String personsName)
056: throws CreateException, DuplicateKeyException,
057: EJBException, RemoteException {
058: log.debug("entry ejbCreate");
059:
060: return new AccountPK(pk.getKey());
061: }
062:
063: /**
064: * Method ejbFindByPrimaryKey
065: *
066: *
067: * @param pk
068: *
069: * @return
070: *
071: * @throws EJBException
072: * @throws FinderException
073: * @throws RemoteException
074: *
075: */
076:
077: public AccountPK ejbFindByPrimaryKey(AccountPK pk)
078: throws FinderException, EJBException, RemoteException {
079: log.debug("entry ejbFindByPrimaryKey");
080:
081: return new AccountPK(pk.getKey());
082: }
083:
084: /**
085: * Method ejbPostCreate
086: *
087: *
088: * @param pk
089: * @param personsName
090: *
091: * @throws CreateException
092: * @throws DuplicateKeyException
093: * @throws EJBException
094: * @throws RemoteException
095: *
096: */
097:
098: public void ejbPostCreate(AccountPK pk, String personsName)
099: throws CreateException, DuplicateKeyException,
100: EJBException, RemoteException {
101: log.debug("ejbPostCreate (AccountPK, String) called");
102: }
103:
104: /**
105: * Method ejbLoad
106: *
107: *
108: * @throws EJBException
109: * @throws RemoteException
110: *
111: */
112:
113: public void ejbLoad() throws EJBException, RemoteException {
114: log.debug("ejbLoad () called");
115: }
116:
117: /**
118: * Method ejbStore
119: *
120: *
121: * @throws EJBException
122: * @throws RemoteException
123: *
124: */
125:
126: public void ejbStore() throws EJBException, RemoteException {
127: log.debug("ejbStore () called");
128:
129: }
130:
131: /**
132: * Method ejbRemove
133: *
134: *
135: * @throws EJBException
136: * @throws RemoteException
137: *
138: */
139:
140: public void ejbRemove() throws EJBException, RemoteException {
141: log.debug("ejbRemove () called");
142: }
143:
144: /**
145: * Method ejbActivate
146: *
147: *
148: * @throws EJBException
149: * @throws RemoteException
150: *
151: */
152:
153: public void ejbActivate() throws EJBException, RemoteException {
154: log.debug("ejbActivate () called");
155: }
156:
157: /**
158: * Method ejbPassivate
159: *
160: *
161: * @throws EJBException
162: * @throws RemoteException
163: *
164: */
165:
166: public void ejbPassivate() throws EJBException, RemoteException {
167: log.debug("ejbPassivate () called");
168: }
169:
170: /**
171: * Method setEntityContext
172: *
173: *
174: * @param ctx
175: *
176: * @throws EJBException
177: * @throws RemoteException
178: *
179: */
180:
181: public void setEntityContext(EntityContext ctx)
182: throws EJBException, RemoteException {
183: log.debug("setEntityContext () called");
184:
185: this .ctx = ctx;
186:
187: }
188:
189: /**
190: * Method unsetEntityContext
191: *
192: *
193: * @throws EJBException
194: * @throws RemoteException
195: *
196: */
197:
198: public void unsetEntityContext() throws EJBException,
199: RemoteException {
200: log.debug("unsetEntityContext () called");
201:
202: ctx = null;
203: }
204:
205: }
206:
207: /*------ Formatted by Jindent 3.23 Basic 1.0 --- http://www.jindent.de ------*/
|