Hi Everybody,
I am using a little different solution for testing secured ejbs with embedded glassfish. I have domain.xml in src/test/java/org/glassfish/embed with custom data source as I learned from this website:
http://blog.blackbit.be/?p=5 To tests ejbs with @RolesAllowed restriction I created (with standalone glassfish) test user and groups named after roles within the file realm and copy the keyfile into src/test/java/config. Everything works fine just with this initialization:
container = EJBContainer.createEJBContainer();
context = container.getContext();
ProgrammaticLogin pl = new ProgrammaticLogin();
pl.login("user", "", "file", true);
Is that approach all right? Thank you.
[Message sent by forum member 'stan_svec']
http://forums.java.net/jive/thread.jspa?messageID=394538