title: CDI producer reached once
body: <p>I've created this producer:</p>
  
  <pre><code>@RequestScoped
  public class StripeWebHookProducer {
  
      private static String HEADER_SIGNATURE = "Stripe-Signature";
  
      @Inject @Context private HttpServletRequest request;
  
      @Produces
      public Event getStripeEvent() {
          Event result = null;
          //...
          return result;
      }
  }
  </code></pre>
  
  <p>As you can see it's scoped at <code>@RequestScoped</code>, so as far I've been able to figure out it should be created each time a request is reached on server.</p>
  
  <p>I'm injecting it on my servlet:</p>
  
  <pre><code>@WebServlet(...)
  public class StripeWebhook extends HttpServlet {
      @Inject private Event paymentEvent;
  
      protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              switch (this.paymentEvent.getEventType())
              {
                  case customer_subscription_trialwillend:
                      break;
                  case customer_subscription_updated:
                      break;
              }
              // TODO Auto-generated method stub
              doGet(request, response);
          }
      }
  </code></pre>
  
  <p>Nevertheless, <code>StripeWebHookProducer.getStripeEvent</code> is reached only once. Any ideas?</p>