tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <>
Subject Re: Injection fails in any class that didn't instantiate an embedded ejb container
Date Fri, 17 Feb 2012 06:18:19 GMT

You can either add an annotation to make it managed (managedbean one for
instance) or use openejb.additionnal.callers property to specify the
qualified name of the test class in the map you give when you start the

The reason it doesnt work is you dont start the container in the test class.

- Romain

Le 17 févr. 2012 03:44, "afryer" <> a écrit :
I am writing unit test cases for a group of stateless session ejbs and to
speed up test case execution, I want to create the embedded ejb container
once and use it across all the test case classes.

An example of my test case structure is shown below.  Assuming MyFirstTest
runs first, then the injection will work for MyFirstTest.  The problem is
the injection fails for MySecondTest with the "Unable to find injection
meta-data for..." error message.  Why does the injection work in the class
that actually causes the EJBContainer to be instantiated and not in any
other class?

View this message in context:
Sent from the OpenEJB User mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message