>From the EJB 2.0 spec (same for 1.0 and 1.1):

'The return type for a find<METHOD> method must be the entity bean?s remote
interface type (for a
single-object finder), or a collection thereof (for a multi-object finder).'

So in your case the findByPrimaryKey in XChildHome should return IXChild and not
IX.

---
Peter Verkest






Thamba Ananth <[EMAIL PROTECTED]> on 12/12/2001 03:05:08

Please respond to Thamba Ananth <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:    (bcc: Peter Verkest/I/SECUREX)

Subject:  EJB Home and Remote Object Inheritence


Hi,

Can someone tell me what is or if is violated on EJB if i have a same home
and remote class for many different bean managed entity bean classes. This
is because most of the beans have got the same functionality.

Also the reason why i came up with this is because i cannot do a inheritence
on home and remote interface classes.

Suppose
////////////////////////////////////////////////////////////////////////////////
public interface XHome extends EJBHome {
public IX findByPrimaryKey(Long primaryKey) throws FinderException;

}

////////////////////////////////////////////////////////////////////////////////

public interface IX extends EJBObject {

public IBusinessObject getObject() throws EJBException, RemoteException;
}

////////////////////////////////////////////////////////////////////////////////

public interface XChildHome extends XHome {
}

////////////////////////////////////////////////////////////////////////////////

public interface IXChild extends IX {
}

I get exceptions on the finder method. I would greatly appreciate if someone
could help me on this!

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.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".






==========================================================================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".

Reply via email to