Basically, I need a way to disable one (framework supplied) @Produces
method in favour of using my own @Produces
method.
More specifically, I'm working with jBPM 6 and attempting to get it working correctly inside a container. The HumanTaskServiceProducer
uses the drool's EnvironmentFactory
, which always generates a new Environment
. The code for caching the Environment
in that EnvironmentFactory
is commented out for some reason.
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.
Does anyone know of a way to specify a producer to use? In hope I tried specifying it as an @Alternative
, but that doesn't seem to have worked. Either that, or a way to specify the environment on the HumanTaskServiceProducer
.