users@glassfish.java.net

Re: Is it possible to have access to used Realm from EJB

From: Miroslav Nachev <miro_at_space-comm.com>
Date: Sat, 12 May 2007 20:18:58 +0300

Hi,

I need of the invoker EnterpriseBean in getGroupNames(...) method to
realize the following:
In the real world there are many companies (CompanyBean). But all these
companies are related in different way for different people. For example
when I am in Sun company I must have observer right, when I am in Cosmos
company I must to have manger right, when I am in a museum I must to
have viewer right. So, I am designed a tree database structure with
Global Unique Identifiers (binary 32) where the user groups and roles
are not statics and depends from the current GUID which can be a
company, warehouse, cinema, shop, museum, branch office, client,
customer, etc.
If I know the GUID of the invoker (EnterpriseBean), I can determine the
correct user group(s) or/and role(s). My tree with GUID inherit the
rights and other properties, so I have a algorithm easy to retrieve this
information.


Regards,
Miro.


Shing Wai Chan wrote:
> Hi,
> I am wondering why you need an EnterpriseBean in getGroupNames method.
> What info do you look for?
> Shing Wai Chan
>
> Miroslav Nachev wrote:
>> Hi,
>>
>> To ensure additional functionality I need to have direct access to
>> the used Realm. Is it possible?
>> Because I need to have dynamic user *groups* depending from the
>> current object, not only from the current user (the EJB which invoke
>> the Realm method *getGroupNames(String username)* I would like to
>> create my own Realm implementation where to add the following method:
>> *getGroupNames(String username, EnterpriseBean targetObject)*
>>
>> To be able to invoke this new method I need to have access to my
>> Realm implementation.
>>
>> Any help, ideas or suggestions?
>>
>>
>> Regards,
>> Miro.
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net For
>> additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>