I don't think you can add a method other than finders, creaters to the
EJB home.  The reason is that EJB home is an interface that has no
implementation.  The calls are delegated and implemented by the
container.  This is 100% controlled by the vendor, the application
developer has absolutely no control over it.  A vendor can not possibly
forsee what method you are going to need, let alone implementing it.

To solve your problem, I would recommend using a stateless session bean
to return the type you need.

Joe Zhou

--- Chris Raber <[EMAIL PROTECTED]> wrote:
> EJB does not currently provide for "static" style
> methods on homes, other
> than finders, creaters...
>
> I believe this is a future enhancement under
> consideration for EJB 2.0, but
> my understanding is the spec reviewers are not
> supposed to comment on this
> stuff yet. Maybe Sun will ;-)
>
> -Chris.
>
> > -----Original Message-----
> > From: Chaganthi, Madhusudan R. [SMTP:[EMAIL PROTECTED]]
> > Sent: Friday, September 17, 1999 11:53 AM
> > To:   [EMAIL PROTECTED]
> > Subject:      Re: Adding methods to the EJB home
> interface.
> >
> > Steve
> > Let me try to take a shot at this with my limited
> knowledge.
> > I see you are talking about the EJBHome of Entity
> beans and not Session
> > beans.
> > It is possible with BMP since you do your own
> hacking.
> > With CMP, I really doubt it.
> > I would love to hear from the "GURUS" though.
> > Regards
> > Madhu
> >
> > -----Original Message-----
> > From: Steve Roth [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, September 17, 1999 10:27 AM
> > To: [EMAIL PROTECTED]
> > Subject: Adding methods to the EJB home interface.
> >
> >
> > Hi.  I've been trying to track down whether EJB
> supports a certain
> > expressiveness or not, but so far have been unable
> to find the answer.
> >
> > Does anyone know if it's possible to add new
> class-level methods to the
> > EJB
> > Home Interface for a specifiec EJB type?
> >
> > I understand you can add instance-level (Remote
> interface) methods, but
> > how
> > can you add class-level (Home interface) methods?
> (like static methods)
> >
> > I'd like to add a new method to the Home Interface
> which returns another
> > Type.   I understand you can overload the Find and
> Create methods, but I'd
> > like to add a totally new method.  I'd like to
> call this method even
> > before
> > I have a instance of the type.   That makes it
> difficult to put it in the
> > Remote interface.
> >
> > For example, I'd like to do this:
> >
> >
> > public interface PHome extends EJBHome
> > {
> >   public P create( ... ) throws ...;
> >   public P findByPrimaryKey( PPK pk ) throws ...;
> >   public Enumeration findByName( ... ) throws ...;
> >
> >   // new method-- can you do this?
> >   public Q getARelatedType( ) throws ...;
> > }
> >
> >
> > Thanks
> > -Steve Roth, [EMAIL PROTECTED]
> >
> >
>
==========================================================================

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

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