Hi,
It seems that EJB3 stateless session has slight different view on how the
init and destroy are invoked. In EJB, the init (@PostConstruct) and destroy
(@PreDestroy) callbacks are only invoked once per stateless session bean
instance. The sequence is:
DI
PostConstruct
Ready to take one or more methods (in the pool, no resetting is required)
m1
m2
m1
...
PreDestroy
We probably need to clarify with SCA spec to understand if SCA follows the
same pattern in this case.
Thanks,
Raymond
From: Simon Laws
Sent: Friday, October 10, 2008 7:08 AM
To: [email protected]
Subject: Re: [jira] Created: (TUSCANY-2635) Pool stateless-scoped Java impl
instances
On Fri, Oct 10, 2008 at 2:21 PM, Scott Kurz (JIRA) <[email protected]>
wrote:
Pool stateless-scoped Java impl instances
-----------------------------------------
Key: TUSCANY-2635
URL: https://issues.apache.org/jira/browse/TUSCANY-2635
Project: Tuscany
Issue Type: Improvement
Reporter: Scott Kurz
Priority: Minor
I'd like to see if we can pool the stateless instances in order to improve
performance. The proxy injection in particular is expensive.
Of course, this assumes that, in a general sense, the references backing the
proxies are not being setup with any type of context as they are used.
I'm speaking generally since I don't have any specific examples to the
contrary... but if there were such examples it would obviously be the key
consideration in deciding how to go forward on this, so I'd be interested to
hear.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
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