users@glassfish.java.net

Re: Glassfish + Metro web service + Custom realm

From: Kumar Jayanti <Vbkumar.Jayanti_at_Sun.COM>
Date: Thu, 08 Jul 2010 10:10:17 +0530

glassfish_at_javadesktop.org wrote:
> Hello experts,
>
> I've created a web service (metro 1.3) I've enabled the security, but the Glassfish (open source 3.0.1) is using file realm for authentication. I want to use my own custom realm which is similar to jdbc realm. With my WAR & EJB modules it works like a charm, but I don't know how to change the realm for web service. I have two questions:
> 1) Where should I create web services? In EJB or in WAR module?
>
You can have webserivces within EJB as well as WAR.
> 2) How to change the realm for web service(s) authentication?
>
>
if you are creating an EAR have a sun-application.xml and specify the
realm element in it. Or you can set GlassFish to have your custom realm
as the default one using Admin GUI.

> Thank you in advance!
> [Message sent by forum member 'ladislav_gredi']
>
> http://forums.java.net/jive/thread.jspa?messageID=477027
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>