Skip to main content

Application-scoped realm?

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
6 replies [Last post]
ljnelson
Offline
Joined: 2003-08-04

In Glassfish, you can supply application-scoped resources with your .ear file by putting a glassfish-resources.xml file in your .ear file's META-INF directory.

Is there any way to supply an application-scoped realm with your .ear file?

Best,
Laird

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Kumar Jayanti Guest
Offline
Joined: 2011-04-02

On 25-Aug-2011, at 12:15 AM, forums@java.net wrote:

> In Glassfish, you can supply application-scoped resources with your .ear file
> by putting a glassfish-resources.xml file in your .ear file's META-INF
> directory.
>
> Is there any way to supply an application-scoped /realm/ with your .ear file?
No. All realms need to be declared in security-service of the server config.

>
> Best,
> Laird
>
>
> --
>
> [Message sent by forum member 'ljnelson']
>
> View Post: http://forums.java.net/node/837039
>
>

ljnelson
Offline
Joined: 2003-08-04

No. All realms need to be declared in security-service of the server config.

OK; thanks.  Is there any reason I'm not aware of that would prevent such an RFE from being considered/implemented?

Best,
Laird

miluch
Offline
Joined: 2007-06-18

Hi

Just to make it clear: by defining realm/realms in a server config is
it possible to configure an application scoped realm in glassfish ? I
mean, the realm that is applied to a SINGLE application ( as it is
possible in Tomcat )?

regards Jakub

2011/9/4 Kumar Jayanti :
>
> On 25-Aug-2011, at 12:15 AM, forums@java.net wrote:
>
>> In Glassfish, you can supply application-scoped resources with your .ear file
>> by putting a glassfish-resources.xml file in your .ear file's META-INF
>> directory.
>>
>> Is there any way to supply an application-scoped /realm/ with your .ear file?
> No. All realms need to be declared in security-service of the server config.
>
>>
>> Best,
>> Laird
>>
>>
>> --
>>
>> [Message sent by forum member 'ljnelson']
>>
>> View Post: http://forums.java.net/node/837039
>>
>>
>
>

Kumar Jayanti Guest
Offline
Joined: 2011-04-02

On 04-Sep-2011, at 7:43 PM, jmilkiewicz@gmail.com wrote:

> Hi
>
> Just to make it clear: by defining realm/realms in a server config is
> it possible to configure an application scoped realm in glassfish ? I
> mean, the realm that is applied to a SINGLE application ( as it is
> possible in Tomcat )?

yes that is possible, you can define any number of realms and associate each one with just a single app. However when i meant Application Scoped realm, it is also about the lifecycle of the realm (as to when it is loaded and unloaded).

>
> regards Jakub
>
>
> 2011/9/4 Kumar Jayanti :
>>
>> On 25-Aug-2011, at 12:15 AM, forums@java.net wrote:
>>
>>> In Glassfish, you can supply application-scoped resources with your .ear file
>>> by putting a glassfish-resources.xml file in your .ear file's META-INF
>>> directory.
>>>
>>> Is there any way to supply an application-scoped /realm/ with your .ear file?
>> No. All realms need to be declared in security-service of the server config.
>>
>>>
>>> Best,
>>> Laird
>>>
>>>
>>> --
>>>
>>> [Message sent by forum member 'ljnelson']
>>>
>>> View Post: http://forums.java.net/node/837039
>>>
>>>
>>
>>

miluch
Offline
Joined: 2007-06-18

Hi

Ok. Thx. So it seems it is the same as in Tomcat where configuring
ream is out-of-application, ie. you can not encapsulate realm
configuration with application archive. Anyway thx for an info.

br Jakub

2011/9/4 Kumar Jayanti :
>
> On 04-Sep-2011, at 7:43 PM, jmilkiewicz@gmail.com wrote:
>
>> Hi
>>
>> Just to make it clear: by defining realm/realms in a server config is
>> it possible to configure an application scoped realm in glassfish ? I
>> mean, the realm that is applied to a SINGLE application ( as it is
>> possible in Tomcat )?

> yes that is possible, you can define any number of realms and associate each one with just a single app. However when i meant Application Scoped realm, it is also about the lifecycle of the realm (as to when it is  loaded and unloaded).
>
>
>>
>> regards Jakub
>>
>>
>> 2011/9/4 Kumar Jayanti :
>>>
>>> On 25-Aug-2011, at 12:15 AM, forums@java.net wrote:
>>>
>>>> In Glassfish, you can supply application-scoped resources with your .ear file
>>>> by putting a glassfish-resources.xml file in your .ear file's META-INF
>>>> directory.
>>>>
>>>> Is there any way to supply an application-scoped /realm/ with your .ear file?
>>> No. All realms need to be declared in security-service of the server config.
>>>
>>>>
>>>> Best,
>>>> Laird
>>>>
>>>>
>>>> --
>>>>
>>>> [Message sent by forum member 'ljnelson']
>>>>
>>>> View Post: http://forums.java.net/node/837039
>>>>
>>>>
>>>
>>>
>
>

wang51829
Offline
Joined: 2010-07-15

hi All

now that we can config application-scoped realms .I dont know how to config , can you give a example

Thanks