2 Replies Latest reply on Apr 11, 2011 3:02 PM by Tim Kelley

    PicketLink IDM JBoss Cache Clearing

    Tim Kelley Newbie

      I posted this question over in the PicketLink forum.  But since it has more to do with JBoss and GateIn, I thought I would post it here as well:

       

      I am using PicketlLink IDM in the JBoss EPP 5.1 server.  I am working to figure out how to clear the cache of Identity objects.  The reason for this is that I have developed stored procedures that enable another system to be used to provision users.  Therefore, while the server is running, users are added and user roles are updated manually (via the SQL in the stored procedure).  The issue is that the Hibernate cache that PicketLink is using is not picking up the changes.

       

      I am wondering if anyone has had experiece with this or could provide some documentation as to how to clear cache or configure the cache so it is refereshed on a specified interval or something.

       

      Any assistance is appreciated.

       

      Thanks,

      Tim Kelley

        • 1. PicketLink IDM JBoss Cache Clearing
          Marek Posolda Apprentice

          Hi Tim,

           

          Picketlink is internally using JBoss cache, which can be cleared via jmx. You will need some tool for access to JMX (Like JBoss jmx-console  or Sun's jconsole) and you will need to find this mbean: exo:portal="portal",service=PicketLinkIDMCacheService,name=plidmcache and call operation invalidateAll .

           

          If you want some periodic cleanup, you may need to change JBoss cache configuration, which can be found under server/default/deploy/gatein.ear/02portal.war/WEB-INF/conf/organization/picketlink-idm in file jboss-cache.xml or jboss-cache-cluster.xml (if you are using cluster profile). You can try to change eviction configuration . By default it uses ExpirationAlgorithm but AFAIK expiration is defacto not triggered because AFAIK there is no support in picketlink code for it. So you can try to change to LRUAlgorithm or something different  (See jboss cache documentation for details).

           

          If it didn't help, you may need to clear Hibernate cache as well because picketlink is using Hibernate. I think it can be possible through jmx as well but you will need to investigate...

           

          Hope this helps,

          Marek

          • 2. PicketLink IDM JBoss Cache Clearing
            Tim Kelley Newbie

            I have tried the JMX console and it doesn't do anything.  I have also tried an empty jboss-cache.xml file as well as changing the configurations.

             

            I am testing this by inserting a user manually in the MySQL database I have locally.  I then have a page that retrieves all users.  The view does not get refreshed with the new user.