Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.1.2
-
None
-
None
-
None
-
openejb-core 3.1.2
Maven version: 2.0.9
Java version: 1.5.0_12
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
testng 5.8
Description
I am not sure whether this is an improvement or a bug. The method org.apache.openejb.client.inject(Object) will detect whether a class or super class has the annotation LocalClient. In case only the super class is annotated the fields of the subclass are not injected.
@LocalClient
public abstract class MyBaseClass {
Context context;
@BeforeClass
public void initContainer()
}
public class MyTest extends MyBaseClass {
@EJB
MyEjbLocal myEjbBean;
@Test
public void testMyEjb()
}
The above test will fail. I am using testng but this will also work with junit 4. My first though was that this mechanism should be working, but either my assumptions are wrong or the code could be improved.