4 Replies Latest reply on Oct 26, 2016 5:36 AM by schullerer

    Arquillian Websphere 7 injection does not work

    schullerer

      I' ve tried to get Arquillian to work with Websphere 7.

      I used this tests:

       

       

      https://github.com/arquillian/arquillian-container-was/blob/master/was-remote-7/src/test/java/org/jboss/arquillian/container/was/remote_7/WebsphereIntegrationClientTestCase.java

      The test resources does not inklude a "ibm-ejb-jar-bnd.xml" so I created one (I tested it also without it):

       

      <?xml version="1.0" encoding="UTF-8"?>

      <ejb-jar-bnd

          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://websphere.ibm.com/xml/ns/javaee"

          xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-ejb-jar-bnd_1_0.xsd" version="1.0">

        <session name="MyEjb" simple-binding-name="MyEjbLocal"/>

      </ejb-jar-bnd>

       

       

      I successfully build the "arquillian-container-was" from source and execute the non-modified test. The deployment to websphere works!

      I can see it in the application startup and shutdown of the appication the websphere administration console and the console output of arquillian shows the same.

      The problem is that the EJB instance variables are null at test time. So the @EJB injection does not work. Because of the fact that the test for Websphere 7 (J2EE 5) exists I assume that it should work.

       

       

      The only "error" I get (it is indeed a debug info) is: "BeanManager not found." CDI should not work because it is J2EE 5 so an empty  "beans.xml" does not help.

       

      Can someone help me? :-)