On Tue, Jun 8, 2010 at 8:29 PM, Stuart Douglas <stuart@baileyroberts.com.au> wrote:
I tried that, it did not work in weld, and according to the spec it is not required to work.

We need the scope to be a Normal scope as we are after a client proxy, however according to the spec normal scopes need to follow the rules that I included below.

Ah, got it now.
 

I talked to Pete about this and I am going to resurrect the @ManagedProducer stuff I did in WELDX a while ago, but with javassist rather than JDK proxies. These work by injecting a dependent scoped proxy into the bean, and the proxy calls the @ManagedProducer method every time to get the instance to invoke the method on. This also has the advantage that you can inject the InjectionPoint into the @ManagedProducer method.

Cool.
 

I am not totally sold on the name @ManagedProducer, but as previously discussed making up names is not really my strong point :-)

To be honest, names are just tough in general. I've got a couple of suggestions:

PerpetualProducer
ContinuousProducer
Activator
Regenerator
 

I committed an initial implementation last night, it still needs a bit more work but it should be functional.

As always, great job!

-Dan

--
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597

http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://www.google.com/profiles/dan.j.allen