1 Reply Latest reply on Jan 3, 2013 7:43 AM by Heinz Huber

    weld-ee-container and ResourceInjectionServices

    Heinz Huber Newbie



      I'm trying to test a bean using an @Resource with the following dependencies:



      Unfortunately, I can't find a way to override the MockResourceInjectionService of the weld-ee container.


      I have a solution at hand that works with weld-se:

      1. provide my own ConfigurationBuilder,
      2. in there provide my own ExtensionLoader,
      3. in there add my own ResourceInjectionService to the BeanDeploymentArchive.

      In weld-ee this don't work since the BeanDeploymentArchive is built directly and not loaded via any ConfigurationBuilder :-(


      On the other hand, the tests contain RequestScoped beans => weld-se won't work because it doesn't have request or session scope :-(


      Is there any way to override the Mock-Services (JPA is the next on my list)?