tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <>
Subject Re: Problem with Testing OpenEJB Security - Examples
Date Fri, 11 Sep 2009 21:50:10 GMT

On Sep 8, 2009, at 8:02 AM, Quintin Beukes wrote:

> Hey,
> I am trying to make unit tests for my security. So I try implementing
> the example in my code, but it's not working.
> I worked from the first example, as it seems more robust/legible for
> testing different security scenarios. Problem is that the static
> classes aren't being loaded as EJBs by OpenEJB.
> I attached my context properties, unit test code, and the log output.
> What's wrong here? I am sure I didn't miss anything in the example.

The log output shows only one module, so your test module isn't  
getting picked up.  You probably missed this chunk of javadoc in that  

      * This little bit of magic allows our test code to execute in
      * the desired security scope.
      * <p/>
      * The src/test/resource/META-INF/ejb-jar.xml will cause this
      * EJB to be automatically discovered and deployed when
      * OpenEJB boots up.

Add an empty ejb-jar.xml to your test sources and you'll be good to go.


View raw message