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

    weld-ee-container and ResourceInjectionServices

    Heinz Huber Newbie

      Hi,

       

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

      <dependency>
        <groupId>org.jboss.arquillian.container</groupId>
        <artifactId>arquillian-weld-ee-embedded-1.1</artifactId>
        <version>1.0.0.CR3</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.weld</groupId>
        <artifactId>weld-core</artifactId>
        <version>1.1.8.Final</version>
      </dependency>
      

       

      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)?

       

      tia,

      Heinz