I'm looking for the official way to authenticate (in this case from an
integration test) against a Glassfish container so that I can simply look up
an EJB reference.
I seem to recall that way back when JBoss allowed you (incorrectly, or at
least hackishly) to pass a username and password into the JNDI
InitialContext, and then used these values to authenticate you against the
container. Although to my way of reading things this was abusing the JNDI
specification a little bit, it worked.
I am aware of the HttpServletRequest#login() method, which of course will do
me no good, and I'm also dimly aware of the Glassfish ProgrammaticLogin
class, which--it would seem--wouldn't do me any good either, since I'm in a
different VM from the server. Or maybe one of those is (somehow) the way to
go here?
Thanks,
Laird