Hi all
I have a CMP Entity bean which has a finder method. The SQL for the finder
method is in XML deployment descriptors. The finder is working fine when called
from a client.
How do I call this finder method from inside the bean?
-- Home.java --
Enumeration findByID(int id); // Container will take care of
generating code
MyRemote findByIDAndName(int id, String name); // I will write code
for this
-- Bean.java --
public PK ejbFindByIDAndName(int id, String name) {
Enumeration e = ejbFindByID(id); // ?? Is this correct
while (e.hasMoreElements()) {
MyRemote r = (MyRemote) e.nextElement(); // What will I get here?
if (r.getName() == name) {
return new PK(r.getID()); // ??
}
}
}
Thanks.
--
shiv
[EMAIL PROTECTED]
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".