This is a great explanation! Thanks

-----Original Message-----
From: Dale V. Georg [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 30, 2000 10:24 AM
To: [EMAIL PROTECTED]
Subject: Re: [EJB-INT] which of these should be an entity bean?


Yes and no. :)  For the methods of TeacherLite to be available in the
Entity Bean, you would need to declare the methods either in the Teacher
interface itself or in a TeacherLiteIfc interface that Teacher extends;
in either case the method signatures in the interface would have to
declare "throws RemoteException" but the methods in the TeacherLite
class itself would not be required to do so.  And this actually makes
sense, because when TeacherLite is used by itself, it's not remote and
its methods do not throw RemoteException; when the methods are accessed
via the Entity Bean, it IS remote, and the remote interface method
signatures DO declare "throw RemoteException".

Make sense?

Dale


================================
   Dale V. Georg
   Technical Manager
   Indus Consultancy Services
   [EMAIL PROTECTED]
   (201) 261-3100 x229
================================



"Nelson, Laird" wrote:
>
> > -----Original Message-----
> > The lite classes are "regular" Java classes.  In your case, you might
> > define something like the following:
> >
> > 1) TeacherLite, a Java class with attributes for ID, name, and other
> > basic info;
> > 2) TeacherBean, a Java class which extends TeacherLite, implements
> > EntityBean, and adds attributes such as a Vector of Credentials;
> > 3) TeacherHome, the home interface for TeacherBean; and
> > 4) Teacher, the remote interface for TeacherBean.
>
> The only trick here is that your TeacherLite class/interface has to throw
> RemoteExceptions, I think, even though it may not always be used in a
> Remote-like context.  Just something to bear in mind.  And yes, this is
more
> ammunition for the fact that RemoteException should be a RuntimeException.
> :-)
>
> Cheers,
> Laird
>
>
===========================================================================
> 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".

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