[cdi-dev] Proxy implementation leaks
struberg at yahoo.de
Wed May 25 06:20:57 EDT 2011
I'd prefer to see the current behaviour written into the spec.
There is no golden way out and it works fairly well and is the de facto standard already.
The overly eager initialization also would crash lots of already existing CDI based code. And it would be fairly hard to implement those features another way.
--- On Wed, 5/25/11, Pete Muir <pmuir at redhat.com> wrote:
> From: Pete Muir <pmuir at redhat.com>
> Subject: Re: [cdi-dev] Proxy implementation leaks
> To: "Jens Schumann" <jens.schumann at openknowledge.de>
> Cc: "CDI-Dev" <cdi-dev at lists.jboss.org>
> Date: Wednesday, May 25, 2011, 9:53 AM
> Interesting, however my gut tells me
> that this is a loophole.
> So, do people want this specified as it works today? Or
> left unspecified?
> On 24 May 2011, at 22:15, Jens Schumann wrote:
> > On 24.05.11 21:46 Pete Muir wrote:
> >> On 24 May 2011, at 20:42, Mark Struberg wrote:
> >>> Imo it is surprising, since it would break all
> kinds of 'business
> >>> injections' (as opposed to classic 'resource
> injections' - Jens Schumann
> >>> can explain this well ;)
> >> Can you make him explain it for our edification?
> > Haha Mark;)
> > Just a brief answer - since I crossed the critical
> wake period already...
> > What I call 'business injection' (the German term
> 'fachliche injection' is
> > more precise) shouldn't be any news to you guys. I
> keep telling my
> > audience that CDI helps me to go beyond classic
> infrastructure injection
> > towards a more domain / business oriented approach.
> Instead of injecting
> > data sources, services or DAO's I am able to inject
> the current user, a
> > selected item or a newly created customer - across
> application layers.
> > This - in combination with "business driven" event
> handling  - is what
> > I
> > love about CDI;)
> > On 24.05.11 21:24 Pete Muir wrote:
> >>> Thus if you would require all contextual
> instances being created
> >>> immediately, then you would get a
> >> Yes, but this isn't that surprising and the
> principle of least surprise
> >> is a good one to follow ;-)
> > As Mark said before: Think about the current
> authenticated user that
> > should be available to infrastructure code. Enforcing
> all contextual
> > instances being created immediately would kill that
> feature - as far I
> > understand.
> > Hope that helps,
> > Jens
> >  sendWelcomeEmail(@Observes @Created Customer
> > _______________________________________________
> > cdi-dev mailing list
> > cdi-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/cdi-dev
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
More information about the cdi-dev