Re: Optimize the reference injection for java components

2007-09-15 Thread Simon Nash
I like option A better. It also has the advantage that others could create alternative experimental patches and post them so that the results could be compared. Simon Jean-Sebastien Delfino wrote: [snip] Simon Nash wrote: Thanks for getting these performance numbers. They confirm that

Re: Optimize the reference injection for java components

2007-09-14 Thread Jean-Sebastien Delfino
[EMAIL PROTECTED] To: tuscany-dev@ws.apache.org Sent: Thursday, September 13, 2007 5:18 PM Subject: Re: Optimize the reference injection for java components Yes, I agree. The only risk of doing this for stateless components is that an improperly coded implementation could malfunction due to left

Re: Optimize the reference injection for java components

2007-09-14 Thread Simon Nash
5:18 PM Subject: Re: Optimize the reference injection for java components Yes, I agree. The only risk of doing this for stateless components is that an improperly coded implementation could malfunction due to left over state from the previous use. Getting a clean instance every time will cover

Re: Optimize the reference injection for java components

2007-09-14 Thread Jean-Sebastien Delfino
[snip] Simon Nash wrote: Thanks for getting these performance numbers. They confirm that an optimization for this case is needed. The question is whether the current patch is the right fix, and also whether now is the right time to apply it. Consider the following case, which could also be a

Re: Optimize the reference injection for java components

2007-09-13 Thread Simon Nash
If I understand this correctly, it would affect the lifecycle of the target component instance. So when A has a reference to B, the creation of A currently involves creating and injecting a B proxy but not a B instance. With this change, I think the creation of A would involve creating a B

Re: Optimize the reference injection for java components

2007-09-13 Thread Mike Edwards
Raymond, Raymond Feng wrote: Hi, We use either JDK or CGLib proxies in reference injections for java components. It is a bit heavy and unnecessary for some cases. I now add a simple optimization to inject the implementation instance directly if the following criteria are met: 1) Both the

Re: Optimize the reference injection for java components

2007-09-13 Thread Raymond Feng
Message - From: Simon Nash [EMAIL PROTECTED] To: tuscany-dev@ws.apache.org Sent: Thursday, September 13, 2007 1:42 AM Subject: Re: Optimize the reference injection for java components If I understand this correctly, it would affect the lifecycle of the target component instance. So when A has

Re: Optimize the reference injection for java components

2007-09-13 Thread Mike Edwards
Simon, Some comments inline Simon Nash wrote: If I understand this correctly, it would affect the lifecycle of the target component instance. So when A has a reference to B, the creation of A currently involves creating and injecting a B proxy but not a B instance. With this change, I

Re: Optimize the reference injection for java components

2007-09-13 Thread Simon Nash
, September 13, 2007 1:42 AM Subject: Re: Optimize the reference injection for java components If I understand this correctly, it would affect the lifecycle of the target component instance. So when A has a reference to B, the creation of A currently involves creating and injecting a B proxy but not a B

Re: Optimize the reference injection for java components

2007-09-13 Thread scabooz
Comments inline - Original Message - From: Mike Edwards [EMAIL PROTECTED] To: tuscany-dev@ws.apache.org Sent: Thursday, September 13, 2007 11:44 AM Subject: Re: Optimize the reference injection for java components Simon, Some comments inline Simon Nash wrote: If I understand

Re: Optimize the reference injection for java components

2007-09-13 Thread Raymond Feng
that multiple requests will be routed to the same instance. Thanks, Raymond - Original Message - From: scabooz [EMAIL PROTECTED] To: tuscany-dev@ws.apache.org Sent: Thursday, September 13, 2007 1:57 PM Subject: Re: Optimize the reference injection for java components Comments inline

Re: Optimize the reference injection for java components

2007-09-13 Thread Mike Edwards
Folks, Comments inline... Raymond Feng wrote: Even for the stateless case, I would argue it's legal to do the optimization. The SCA java spec says: 283 1.2.4.1. Stateless scope 284 For stateless components, there is no implied correlation between service requests. You've picked the

Re: Optimize the reference injection for java components

2007-09-13 Thread Mike Edwards
Folks, Comments inline Mike. Simon Nash wrote: By changing the lifecycle of the target instance I mean that it would be created eagerly (on source reference creation) rather than lazily (on source reference invocation) as is done currently. From looking at the new code I believe this is

Re: Optimize the reference injection for java components

2007-09-13 Thread scabooz
: Thursday, September 13, 2007 5:12 PM Subject: Re: Optimize the reference injection for java components Even for the stateless case, I would argue it's legal to do the optimization. The SCA java spec says: 283 1.2.4.1. Stateless scope 284 For stateless components, there is no implied correlation

Re: Optimize the reference injection for java components

2007-09-13 Thread Raymond Feng
@ws.apache.org Sent: Thursday, September 13, 2007 5:18 PM Subject: Re: Optimize the reference injection for java components Yes, I agree. The only risk of doing this for stateless components is that an improperly coded implementation could malfunction due to left over state from the previous use. Getting

Optimize the reference injection for java components

2007-09-12 Thread Raymond Feng
Hi, We use either JDK or CGLib proxies in reference injections for java components. It is a bit heavy and unnecessary for some cases. I now add a simple optimization to inject the implementation instance directly if the following criteria are met: 1) Both the source and target are java