You forgot to put @ejb:create-method for ejbCreate. For a stateless
session bean xdoclet will automatically add create() to home intf
because slsb always has a no-arg create method, but for other beans you
add @ejb:create-method. The reason a tag is needed is that some
frameworks (TopLink BMP for example) have some utility createImpl
methods so xdoclet would pick it too if it were to rely on ejbCreate
signature only.

Ara. 

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:xdoclet-user-
> [EMAIL PROTECTED]] On Behalf Of Jozsa Kristof
> Sent: Saturday, January 19, 2002 4:48 PM
> To: Andrew Stevens
> Cc: [EMAIL PROTECTED]
> Subject: Re: [Xdoclet-user] Stateful bean's ejbCreate()
> 
> Hi Andrew,
> 
> I had a few days of holiday, so did not got a chance to answer
earlier..
> 
> On Wed, Jan 16, 2002 at 11:49:00PM +0000, Andrew Stevens wrote:
> > A wise old hermit known only as Jozsa Kristof <[EMAIL PROTECTED]>
once
> > said:
> > > ..does not appear in the home interface for me. If I change the
bean
> > > type to
> > > Stateless, the ejbCreate() method gets generated into the home
> > > interface, if
> > > I change it back to Stateful, it does not.
> >
> > I assume you mean the home interface's create() method.  Do you have
an
> > ejbCreate() in the bean file?
> 
> Yes, I do have it.
> 
> > For stateful beans, you don't *have* to have a no-argument create
> method,
> > so long as there's some ejbCreate(...) method(s).  For stateless,
you
> must
> > have a no-arg create method and no others. (sections 6.3/6.4 and 7.5
of
> > the EJB2.0 spec)
> 
> The signature is:
> public void ejbCreate() throws javax.ejb.CreateException
> 
> I think this will do for a stateful bean as well..
> 
> > If you're using the <session> subtask,
> 
> Yep.
> 
> > for stateless beans xdoclet adds an ejbCreate() in the generated
Session
> > class if there isn't one (so less code required in your bean class),
but
> > for stateful beans it doesn't (since you might not want it).
Perhaps
> the
> > home interface generation is also including a create() when there's
no
> > ejbCreate, but only for stateless session beans?
> 
> Looks like a good guess, but in my case I have an ejbCreate() in the
*Bean
> code, so it could got generated either way as I see. I was searching
for
> any
> example Stateful Session bean around which use XDoclet for help, but
> couldn't find any :(
> 
> >
> > Hope that helps.  If not, perhaps you could post some of your code -
the
> > class level tags and create methods of your bean class in
particular,
> and
> > the ejbdoclet task parameters.
> 
> I'll attach my stateful bean initiate, upon which the create()
function
> doesn't get generated by xdoclet, and the ant build script's
> ejbdoclet-related part.
> 
> tia,
> Christopher
> --
> .Digital.Yearning.for.Networked.Assassination.and.Xenocide



_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to