OK, So

On Fri, Oct 10, 2008 at 10:08 AM, Simon Laws <[EMAIL PROTECTED]>wrote:

>
> Hi Scott
>
> Can you say a little more about what the implications for pooling stateless
> instances would be, for example,
>
> 1st call - Create object
>    @Reference injected
>    @Init run
>
> 1st Operation execution ends
>    @Destory called
>    Reset any conversational/callback state help in the components
> references
>    object put in pool
>
> 2nd call - Retrieve object from pool
>    @Init called
>
> 2nd Operation execution ends
>    @Destory called
>    Reset any conversational/callback state help in the components
> references
>    object put in pool
>
> Is that the sort of thing you were thinking of in order to remove the
> injection overhead?
>
>
Simon, yes, unlike, say ejbCreate() for a SLSB, the @Init is supposed to get
called every time for a stateless invocation

So let's look at conversational state, which is the type of concern I was
hoping to get to.    I'm pretty ignorant of what this looks like at a low
level.   At a high level, though,  a new conversation is supposed to begin
every time a conversational-interfaced-reference is injected into the client
component.

So, my naive take on this would be that this isn't all that useful when the
client component is stateless, since you don't know when the container is
going to give you a new stateless instance (with an
already-started-conversation) or an existing one.

So if you need better control over starting a conversation from a stateless
component, you need to get your conversational reference programmatically.

I suppose you could read into the specs the idea that they intended the
references to be injected at the start of the scope..... there is this
(which I don't believe helps):

Java C&I - 1.2.2.1

192 If @Reference marks a public or protected field, the SCA runtime is
required to provide the appropriate
193 implementation of the service reference contract as specified by the
field type. This must done by setting
194 the field on an implementation instance. When injection occurs is
defined by the scope of the
195 implementation.

I don't think it helps since I don't see that the specs define this with
respect to the Java impl scopes.

So... given that my model is, we don't really consider this is a smart use
case and we leave the conversation dangling in such a case... do we still
have anything to worry about for conversations?

Scott

Reply via email to