Please help.
I cannont make the BMP bean throw a FinderException.
I have a client stateless session bean that calles a BMP
FindByPrimaryKey method.
The FindByPrimaryKey method only does one thing (throw a
FinderException).
Can some explain why I cannont make this work.
It seems like the FindByPrimaryKey is never getting called.
Client Stateless Session Bean
------------------------------
private boolean dupGlAcct(InitialContext initialContext, Map dbMap)
throws RemoteException, CreateException, NamingException {
TgaBankcHome tgaBankcHome =
(TgaBankcHome)initialContext.lookup("qsp.TgaBankcHome");
TgaBankcPk tgaBankcPk = new TgaBankcPk("x", "x");
try {
TgaBankc tgaBankc = tgaBankcHome.findByPrimaryKey(tgaBankcPk);
//I'll get a reference even if the bean does not exists
} catch (Exception e) {
return false;
}
return true;
}
Home Interface
--------------
public interface TgaBankcHome extends EJBHome {
public TgaBankc create(Map dbMap) throws RemoteException,
CreateException;
public TgaBankc findByPrimaryKey(TgaBankcPk pk)
throws RemoteException, FinderException;
}
BMP Implimentation
-------------------
/**
* Find by a primary key
*/
public TgaBankcPk ejbFindByPrimaryKey(TgaBankcPk pk)
throws FinderException, RemoteException {
throw new FinderException(); //the one and only statemet - it does
not execute
}
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]