On Mon, 21 Aug 2000 17:57:06 -0000, Subramaniam S
<[EMAIL PROTECTED]> wrote:

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

As has been noted earlier in this thread, this is incorrect. The
container will call ejbCreate on an instance before it can be used to
serve client invocations. That is the only relevant rule.

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

Correct, it *may* or *may not*. This is implementation dependent and is
not the heart of the matter. See above.

> For a Stateless Session bean, the ejbCreate()
>method of "empty parameters list" is called only once in the lifecycle
>of the bean.

Correct, although "bean" is ambiguous. "EJB instance" is correct wording
I think.

> The bean will not be activated/deactivated like a Stateful
>Session bean or an Entity bean.

Since there is no state to maintain.

> Moreover, as the bean is stateless

The instance may have state. It may not have client-state however.
Tricky but very important difference.

>there is "no instance/state variable" which need to be initialized
>while calling the create() method.

Change above to "no client-specific state variable" and it is ok.

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

Correct, and this would be the non-client specific state described
above.

/Rickard

--
Rickard �berg

Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com

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