문제

I'm trying to test my EJBs with the embedded container.

container = EJBContainer.createEJBContainer();

But I have some of my methods that are restricted to some roles. So, my question is. How can I log into the container so I can test these methods simulating the user that will call the Session Bean ?

Thanks

도움이 되었습니까?

해결책

I found a post in Oracle blog answering my question to whoever needs as well.

The answer is to use ProgrammaticLogin. You can find more information here.

http://blogs.oracle.com/nithya/entry/running_a_secure_application_using

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top