tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndegraev <nick.degra...@telenet.be>
Subject Re: JUnit: Sessioncontext.isCallerInRole allways returns false
Date Thu, 03 Feb 2011 14:41:21 GMT

Ah, pity.

How would I then best test functionality which relies on the caller
Principal?

What I'm planning to do is create a class that implements SessionContext and
on which I can set roles. The isCallerInRoles() will check the parameter
against the set roles. Via reflection I then set this context on my EJB for
the tests.

Do you know a better way?

Thanks,

Nick
-- 
View this message in context: http://openejb.979440.n4.nabble.com/JUnit-Sessioncontext-isCallerInRole-allways-returns-false-tp3257408p3258218.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Mime
View raw message