The ejbCreate() of a stateless Session bean is called on the first
client invocation of the create() method. Subsequent create() calls
by clients will not result in ejbCreate() method of a Stateless
Session to be called.
Dave, did you mean empty parameter list in create() methods? Or, did
you mean empty body in ejbCreate() method?
Anyway, here is my two cents worth. Calling create() method by the
client need not result in equivalent ejbCreate() calls on the
stateless Session Bean. For a Stateless Session bean, the ejbCreate()
method of "empty parameters list" is called only once in the lifecycle
of the bean. The bean will not be activated/deactivated like a Stateful
Session bean or an Entity bean. Moreover, as the bean is stateless
there is "no instance/state variable" which need to be initialized
while calling the create() method. Hence the create() method is always
of empty parameter lists.
The "No instance variable" condition of a stateless Session bean is
not a rule. The ejbCreate() method of the bean can always initialize
an instance variable of the bean or open any resources, for example
debugging port. As the bean will be never be deactivated, the debug
port can be kept for the entire life of the bean until ejbRemove()
is called.
--
Regards
Subra
Subramaniam S - Viveka Software Technologies
http://www.thinktankpartners.com/
> Date: Thu, 17 Aug 2000 12:56:09 +0530
> From: Vivek Singh <[EMAIL PROTECTED]>
> Subject: Re: Life cycle of beans(Session and entity)
>
> Dave the there were more confusion than this....
> When is the ejbCreate of stateless session bean is called?
>
> PS: u might have to follow the whole of this mail.
>
> Thanks.
>
> -----Original Message-----
> From: Dave Wolf [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 17, 2000 2:04 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Life cycle of beans(Session and entity)
>
>
> No stateless session beans can only have emtpy creates. I was incorrect
> when I earlier inferred you could.
>
> You can however still manage state if each user uses a unique login, then
> you can query the container for the users name to hash state with.
>
> Dave Wolf
> Internet Applications Division
> Sybase
===========================================================================
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".