Service Attribute Value - Caching

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Service Attribute Value - Caching

J Singh
Hi,

I'm using OpenAM 13 on Tomcat 7 and Java 7. 

Requirement:

Get access to service attributes programatically.

What I am doing? If there's a better or a different way, suggestion would be much appreciated.

SSOToken ssoToken = AccessController.doPrivileged(AdminTokenAction.getInstance());
ServiceManager serviceManager = new ServiceManager(ssoToken);
ServiceConfigManager serviceConfigManager = serviceManager.getConfigManager(serviceName, serviceVersion);
ServiceConfig serviceConfig = serviceConfigManager.getOrganizationConfig(realmName, null);

// Below call to getAttributes return Map of old values
Map configurationAttributes = serviceConfig.getAttributes(); 

Problem:

The above call to "serviceConfig.getAttributes()" returns a Map of old values from cache. If values of service attribute are updated via OpenAM Web Console, the Map returned is still old.

Question:

How can I get reference to the most recent Map of service attributes with up to date values?

Any pointers would be much appreciated.

Thanks,
Jatinder

_______________________________________________
Visit the OpenAM forum at https://forgerock.org/forum/fr-projects/openam/
OpenAM mailing list
[hidden email]
https://lists.forgerock.org/mailman/listinfo/openam
Reply | Threaded
Open this post in threaded view
|

Re: Service Attribute Value - Caching

Bernhard Thalmayr
Only one OpenAM instance or multiple?

-Bernhard


Am 13/06/16 um 20:27 schrieb J Singh:

> Hi,
>
> I'm using OpenAM 13 on Tomcat 7 and Java 7.
>
> *Requirement:*
>
> Get access to service attributes programatically.
>
> *What I am doing?* If there's a better or a different way, suggestion
> would be much appreciated.
>
> SSOToken ssoToken =
> AccessController.doPrivileged(AdminTokenAction.getInstance());
> ServiceManager serviceManager = new ServiceManager(ssoToken);
> ServiceConfigManager serviceConfigManager =
> serviceManager.getConfigManager(serviceName, serviceVersion);
> ServiceConfig serviceConfig =
> serviceConfigManager.getOrganizationConfig(realmName, null);
>
> // Below call to getAttributes return Map of old values
> Map configurationAttributes = serviceConfig.getAttributes();
>
> *Problem:*
>
> The above call to "serviceConfig.getAttributes()" returns a Map of old
> values from cache. If values of service attribute are updated via OpenAM
> Web Console, the Map returned is still old.
>
> *Question:*
> *
> *
> How can I get reference to the most recent Map of service attributes
> with up to date values?
>
> Any pointers would be much appreciated.
>
> Thanks,
> Jatinder
>
>
> _______________________________________________
> Visit the OpenAM forum at https://forgerock.org/forum/fr-projects/openam/
> OpenAM mailing list
> [hidden email]
> https://lists.forgerock.org/mailman/listinfo/openam
>


--
Painstaking Minds
IT-Consulting Bernhard Thalmayr
Herxheimer Str. 5, 83620 Vagen (Munich area), Germany
Tel: +49 (0)8062 7769174
Mobile: +49 (0)176 55060699

[hidden email] - Solution Architect
http://www.xing.com/profile/Bernhard_Thalmayr
http://de.linkedin.com/in/bernhardthalmayr

This e-mail may contain confidential and/or privileged information.If
you are not the intended recipient (or have received this email in
error) please notify the sender immediately and delete this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
_______________________________________________
Visit the OpenAM forum at https://forgerock.org/forum/fr-projects/openam/
OpenAM mailing list
[hidden email]
https://lists.forgerock.org/mailman/listinfo/openam
Reply | Threaded
Open this post in threaded view
|

Re: Service Attribute Value - Caching

J Singh
At this time I only have 1 OpenAM instance - but we will have multiple openam instances and replication between them.

On Mon, Jun 13, 2016 at 3:37 PM, Bernhard Thalmayr <[hidden email]> wrote:
Only one OpenAM instance or multiple?

-Bernhard


Am 13/06/16 um 20:27 schrieb J Singh:
> Hi,
>
> I'm using OpenAM 13 on Tomcat 7 and Java 7.
>
> *Requirement:*
>
> Get access to service attributes programatically.
>
> *What I am doing?* If there's a better or a different way, suggestion
> would be much appreciated.
>
> SSOToken ssoToken =
> AccessController.doPrivileged(AdminTokenAction.getInstance());
> ServiceManager serviceManager = new ServiceManager(ssoToken);
> ServiceConfigManager serviceConfigManager =
> serviceManager.getConfigManager(serviceName, serviceVersion);
> ServiceConfig serviceConfig =
> serviceConfigManager.getOrganizationConfig(realmName, null);
>
> // Below call to getAttributes return Map of old values
> Map configurationAttributes = serviceConfig.getAttributes();
>
> *Problem:*
>
> The above call to "serviceConfig.getAttributes()" returns a Map of old
> values from cache. If values of service attribute are updated via OpenAM
> Web Console, the Map returned is still old.
>
> *Question:*
> *
> *
> How can I get reference to the most recent Map of service attributes
> with up to date values?
>
> Any pointers would be much appreciated.
>
> Thanks,
> Jatinder
>
>
> _______________________________________________
> Visit the OpenAM forum at https://forgerock.org/forum/fr-projects/openam/
> OpenAM mailing list
> [hidden email]
> https://lists.forgerock.org/mailman/listinfo/openam
>


--
Painstaking Minds
IT-Consulting Bernhard Thalmayr
Herxheimer Str. 5, 83620 Vagen (Munich area), Germany
Tel: <a href="tel:%2B49%20%280%298062%207769174" value="+4980627769174">+49 (0)8062 7769174
Mobile: <a href="tel:%2B49%20%280%29176%2055060699" value="+4917655060699">+49 (0)176 55060699

[hidden email] - Solution Architect
http://www.xing.com/profile/Bernhard_Thalmayr
http://de.linkedin.com/in/bernhardthalmayr

This e-mail may contain confidential and/or privileged information.If
you are not the intended recipient (or have received this email in
error) please notify the sender immediately and delete this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
_______________________________________________
Visit the OpenAM forum at https://forgerock.org/forum/fr-projects/openam/
OpenAM mailing list
[hidden email]
https://lists.forgerock.org/mailman/listinfo/openam


_______________________________________________
Visit the OpenAM forum at https://forgerock.org/forum/fr-projects/openam/
OpenAM mailing list
[hidden email]
https://lists.forgerock.org/mailman/listinfo/openam