Interesting this topic should come up now. I've been wondering why EJBs are
not defined as implementing their remote interfaces. A session bean, for
example, is defined as implementing only SessionBean, and not its own remote
interface. I agree with your sentiment below, that an interface is a
specification. IMHO, EJBs should be defined as implementing their remote
interfaces, as that interface is the spec to which clients are written.
This would enable the compiler to ensure that the EJB has completely
implemented its remote interface.
----- Original Message -----
From: fractals <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 06, 2001 7:35 AM
Subject: Re: [JBoss-user] access modifiers lost in EJB programming ?
> I don't think of an interface as a "pattern specifically about the
publicly
> available views/facets of an object". You can define interfaces that are
> visible only from the package, and in fact, this is a feature that I use
> often in my designs. In my opinion, interfaces are a means for
> specification: they state what you have to implement if you want to be
> coherent with your designs. That is something that applies as well for
what
> you intend for the general public as for what you intend for your
> application's internals.
>
> In EJB, I see the home and remote interfaces for a specification as well:
> they state what features you want the container/application server to
> exhibit from a specification you give and partially implement. I the case
of
> ejb-references, you could want to make calls on remote objects that you
> wouldn't want others to see.
>
> But if I'd like to have something like this in j2ee, it's probably due to
> the fact that I'm a beginner in using those tools ;-)
>
> regards,
>
> candide
>
> > There is no way to define anything but public method in any interface.
> This
> > is not limited to remote interfaces or EJB. Interfaces are an OO pattern
> specifically
> > about the publicly available views/facets of an object. If you want to
> hide
> > some method of an EJB implementation then don't put the method in the
> > public interface. EJB adds the ability to restrict who can access the
> public
> > methods as well, so if the method should be available to some you have
> > this path as well.
> >
> > ----- Original Message -----
> > From: "fractals" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, March 05, 2001 2:37 PM
> > Subject: [JBoss-user] access modifiers lost in EJB programming ?
> >
> >
> > > AFAIK, there's no way to make a method anything else than public in a
> remote
> > > interface. Sad, because I *would* like to hide some of the methods I
> define
> > > for some of my beans.
> > >
> > > Really, is there no way to get this cornerstone of OO programming back
> into
> > > the EJB realm ?
> > >
> > > Thanks,
> > >
> > > candide
> > >
> > >
> >
> >
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
> >
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user