开发者

Testing EJB with embedded container. How can I log in?

开发者 https://www.devze.com 2023-04-10 12:01 出处:网络
I\'m trying to test my EJBs with the embedded container. container = EJBContainer.createEJBContainer();

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号