<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    It would be useful in aligning the rules API - currently we have a
    mix of static classes, "event", and some CDI possibilities. So if I
    need to get something in a CDI-instantiated object, I have to either
    grab it from somewhere in a constructor, or use a setter in the
    place it is injected to. Which seems anti-standard, anti-pattern,
    anti-CDI and bad practice.<br>
    Not necessary though. (Necessary is a fuzzy, subjective and relative
    term anyway :)<br>
    <br>
    Ondra<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 16.2.2015 04:28, Lincoln Baxter, III
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAEp_U4EkxUvfM=aKM_5NOpBK_+naNWfZixbTV3Asj4V8K4rngA@mail.gmail.com"
      type="cite">
      <div dir="ltr">Yeah, this is not something that is currently
        supported. It *used* to be injectable many months ago, but we
        removed that because there were a number of bugs with the lazy
        initialization and I remember thinking at the time that it were
        safer to remove and re-introduce later if necessary/beneficial.
        <div><br>
        </div>
        <div>Not sure we've really seen a need to inject it again yet at
          this point.</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Sat, Feb 14, 2015 at 10:39 PM, Jess
          Sightler <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:jsightle@redhat.com" target="_blank">jsightle@redhat.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">It is not
            currently possible to inject the current GraphContext.<br>
            <div class="HOEnZb">
              <div class="h5"><br>
                On 02/13/2015 11:30 PM, Ondrej Zizka wrote:<br>
                &gt; Hi,<br>
                &gt;<br>
                &gt; I was playing with CDI, trying to inject
                GraphContext into<br>
                &gt; ArchiveIdentificationGraphChangedListener.<br>
                &gt;<br>
                &gt; The original way to get it there is through
                constructor param.<br>
                &gt; So I changed is so it is passed by setter, for the
                purpose of this<br>
                &gt; experiment.<br>
                &gt;<br>
                &gt; When I added @Inject GraphContext grCtx; it is
                injected something<br>
                &gt; different than what the setter gets. I.e. different
                instances.<br>
                &gt; So I conclude that this in GraphContextImpl<br>
                &gt;<br>
                &gt; @Produces<br>
                &gt; @ApplicationScoped<br>
                &gt; public GraphContext produceGraphContext()<br>
                &gt;<br>
                &gt; is not really giving something application scoped.<br>
                &gt;<br>
                &gt; Why?<br>
                &gt; I know there's GraphContextFactory, but still -
                @Inject'ing<br>
                &gt; GraphContext, in the current setup, should IMO
                return the same<br>
                &gt; GraphContext - or not?<br>
                &gt;<br>
                &gt; Thanks,<br>
                &gt; Ondra<br>
                &gt;<br>
                &gt; _______________________________________________<br>
                &gt; windup-dev mailing list<br>
                &gt; <a moz-do-not-send="true"
                  href="mailto:windup-dev@lists.jboss.org">windup-dev@lists.jboss.org</a><br>
                &gt; <a moz-do-not-send="true"
                  href="https://lists.jboss.org/mailman/listinfo/windup-dev"
                  target="_blank">https://lists.jboss.org/mailman/listinfo/windup-dev</a><br>
                <br>
              </div>
            </div>
            <span class="HOEnZb"><font color="#888888">--<br>
                Calendar Free/Busy: <a moz-do-not-send="true"
href="https://www.google.com/calendar/embed?src=jsightle%40redhat.com&amp;ctz=America/New_York"
                  target="_blank">https://www.google.com/calendar/embed?src=jsightle%40redhat.com&amp;ctz=America/New_York</a><br>
              </font></span>
            <div class="HOEnZb">
              <div class="h5"><br>
                _______________________________________________<br>
                windup-dev mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:windup-dev@lists.jboss.org">windup-dev@lists.jboss.org</a><br>
                <a moz-do-not-send="true"
                  href="https://lists.jboss.org/mailman/listinfo/windup-dev"
                  target="_blank">https://lists.jboss.org/mailman/listinfo/windup-dev</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div class="gmail_signature">Lincoln Baxter, III<br>
          <a moz-do-not-send="true" href="http://ocpsoft.org"
            target="_blank">http://ocpsoft.org</a><br>
          "Simpler is better."</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
windup-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:windup-dev@lists.jboss.org">windup-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/windup-dev">https://lists.jboss.org/mailman/listinfo/windup-dev</a></pre>
    </blockquote>
    <br>
  </body>
</html>