[EMAIL PROTECTED] wrote:
> I try to use the @ejb.select tag. But it does not work for me.
> [...]
> When I supply the FinderExceptionn to the methods, they are included
> neither into the home nor in the ejb interface. What am I doing

I've only created one ejbSelect so far, so my understanding may be
incomplete. AFAIK, the ejbSelect method is only available on the bean
instance -- not through the local/remote nor home interfaces. Since it
is a method in the bean class, it couldn't possibly be executed from the
home interface. If there's a way to expose them in the local/remote
interfaces, I do not know of it.

The following is a pair of methods to implement a select method. In my
case the bean's PK (id) is the only parameter, so I created a second
method that takes no parameters and instead passes in getId(). It's this
second method that is exposed in the local interface.

  /**
   * @ejb.select
   *      query="SELECT COUNT(t.id) FROM Ticket AS t WHERE t.blockId =
?1"
   */
  public abstract Integer ejbSelectRealTicketCount ( Integer blockId )
  throws FinderException ;

  /**
   * @ejb.interface-method
   * @ejb.transaction type="Supports"
   */
  public Integer getRealTicketCount ( )
  {
    try {
      return ejbSelectRealTicketCount(getId());
    }
    catch ( FinderException e ) {
      throw new ServiceException("Failure calling
Block.ejbSelectRealTicketCount", e);
    }
  }

Good luck!

David Harkness
Sr. Software Engineer
Sony Pictures Digital Networks
(310) 482-4756


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to