The issue with the MDB run as tests was that there was the
tag missing in the Level1CallerBean.
If Level1CallerBean does not define an explicit run-as or use-caller-principal, the run-as defined by the MDB can never be propagated to Level2CallerBean. Level2CallerBean defines use-caller-identity.
Not sure how this worked in 4.x
In JBAS5, we have clear separation of run as and subject principals. More spec-like behavior.
There were lots of default behavior spread all over, so we probably just picked up a default of use-caller-identity somewhere.
The EJBSpecUnitTestCase should be passing in full. JBAS-5054 is resolved.