users@glassfish.java.net

Re: How do logon or set principle/roles/groups when using Embedded API

From: Siraj Ghaffar <Siraj.Ghaffar_at_Sun.COM>
Date: Wed, 03 Feb 2010 16:44:04 -0500

How are you using the embedded API? Can you send out the code snippet
that creates the server and EJB container?
Please refer to this doc for details :
http://docs.sun.com/app/docs/doc/821-1208/gjldt?a=view

Are you using a pre-installed glassfish server, and pointing to it using
something like :

...
...
    EmbeddedFileSystem.Builder efsb = new EmbeddedFileSystem.Builder();
    efsb.installRoot(installDir);
    efsb.instanceRoot(domainDir);
    efsb.configurationFile(domainXml);
...

Are you using glassfish-embedded-static-shell.jar? Or
glassfish-embedded-all.jar ?

Is there an error output that you can send?


Thanks
--Siraj

glassfish_at_javadesktop.org wrote:
>> the invocation of the ejb will occur over the RMI/IIOP protocol
>>
>
> But does that stuff still apply when using the Embedded API? I was under the impression it was running in the same VM when using the new Embedded API.
>
> I couldn't find anything in the FAQ you pointed to that dealt with logging in. Using the Embedded API I can get the reference to the bean already just fine, it's just the security level on the method call to the bean that is failing.
>
> Also, you mention prompting a username and password, but that's something I want to avoid in this case because it's a unit test. I'd rather specify that in some config file or perhaps with parameters to the JVM invokation when running the test.
>
> I get the impression that there is no client container to pop up a username or password when using the embedded API. I think I need some sort of substitute for that.
>
> Please forgive me if I misinterpreted your response and you really already addressed what I have above and I was just not understanding it correctly.
>
> Thanks,
> Mark
> [Message sent by forum member 'markkr2' (mark_at_the-kruegers.name)]
>
> http://forums.java.net/jive/thread.jspa?messageID=384174
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>