In the O'Reilley EJB book, they present a good solution to this. You
*don't* want to use an interface that extends EJBObject with the Remote
interface, because EJBObject does a lot of stuff that isn't really
pertinent to the functioning of the remote interface. You do want to
create a business logic interface that contains all of your business
methods for the EJB, but it shouldn't extend EJBObject. Instead, both your
bean and the remote interface should utilize it.
So, if you created the business interface and called it CommonBusiness, you
would have:
public interface Account extends CommonBusiness, EJBObject (for the Remote
interface)
public class AccountBean implements CommonBusiness, EntityBean (for the
home interface).
-mrj
At 12:13 PM 6/21/00 -0500, you wrote:
>According to the specification, I know that the create method should have a
>return type of the remote interface of the bean. But my question is whether
>the return type can be a superclass of the remote interface.
>
>So for example,
>
>
>public interface CommonBusinessEntity extends EJBObject {
>
>
>}
>
>The Remote interface of the Bean is
>
>public interface Account extends CommonBusinessEntity{
>
>
>}
>
>Is it valid to have the following?
>
>public interface AccountHome extends EJBHome{
>
> public CommonBusinessEntity create(long id) throws
>RemoteExceptionCreateException;
>
>}
>
>Thanks,
>Seema
>
>===========================================================================
>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".
----------------------------------------------------------------------------------
Jake Reichert email: [EMAIL PROTECTED]
Technical Lead Phone: (415) 876-7500
Allpredict Fax: (240) 250-5593
===========================================================================
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".