users@glassfish.java.net

Re: Embedded Glassfish and security questions

From: Nithya Subramanian <nithya.subramanian_at_oracle.com>
Date: Wed, 20 Apr 2011 18:18:05 +0530

Hi,

It is possible to test secure EJB3s with GF embedded server as well.
Dynamic creation of file users can then be done using the CommandRunner API.

Please check
http://blogs.sun.com/nithya/entry/running_a_secure_application_using for
details.

HTH
Nithya

On Wednesday 20 April 2011 03:03 PM, forums_at_java.net wrote:
> I'm trying to test my EJB3s on Glassfish via Arquillian. Arquillian
> doesn't
> provide a direct way to use security with EJBs but I found some code that
> looks up the running embedded server, dynamically creates users in the
> file-realm and logs in. Here's a link to a full test project:
> arquillianTests.zip [1]
>
> The problem is that
>
> final List<String> serverNames = Server.getServerNames();
> always returns an empty list. I just can't get the running server.
>
> I'm using the Maven dependency
> *org.glassfish.extras:glassfish-embedded-all:3.1*
>
> Any ideas?
>
>
> [1]
> http://community.jboss.org/servlet/JiveServlet/download/601089-31411/arquillianTests.zip
>
> --
>
> [Message sent by forum member 'nickdegraeve']
>
> View Post: http://forums.java.net/node/793586
>
>