title: Choosing a @Produces method for CDI when more than one are available
body: <p>Basically, I need a way to disable one (framework supplied) <code>@Produces</code> method in favour of using my own <code>@Produces</code> method.</p>
  
  <p>More specifically, I'm working with jBPM 6 and attempting to get it working correctly inside a container. The <code>HumanTaskServiceProducer</code> uses the drool's <code>EnvironmentFactory</code>, which always generates a new <code>Environment</code>. The code for caching the <code>Environment</code> in that <code>EnvironmentFactory</code> is commented out for some reason.</p>
  
  <p>This means that jBPM picks up the JTA transaction manager rather than the Container transaction manager. I'm trying to supply my own producer for the task service that correctly sets the environment instead of using the default one.</p>
  
  <p>Does anyone know of a way to specify a producer to use? In hope I tried specifying it as an <code>@Alternative</code>, but that doesn't seem to have worked. Either that, or a way to specify the environment on the <code>HumanTaskServiceProducer</code>.</p>