1 Reply Latest reply: Oct 29, 2012 5:36 AM by Mohammed Rayan-Oracle RSS

    When should AccessController.doPrivileged() be used?

    Aacc-Oracle
      I found some answers to my question at following link:
      http://stackoverflow.com/questions/2233761/when-should-accesscontroller-doprivileged-be-used

      However, the above seems too general about Java. Could someone explain it with the weblogic system-jazn-data.xml. for example, what settings in the system-jazn-data.xml would requires certain code need to be called using AccessController.doPrivileged(), or, what method need to be wrapped with AccessController.doPrivileged() .

      Thanks
        • 1. Re: When should AccessController.doPrivileged() be used?
          Mohammed Rayan-Oracle
          You can refer the below links,which contains useful examples

          Refer the section "Watch out those code source grants & Know about AccessController.doPrivileged when invoking protected APIs"

          http://fusionsecurity.blogspot.com/2011_04_01_archive.html


          Refer the sections in the below link

          Code for CSF Operations

          Example 1: JavaSE Application with Wallet Store
          Example 2: JavaEE Application with Wallet Store
          Example 3: JavaEE Application with LDAP Store


          http://docs.oracle.com/cd/E17904_01/core.1111/e10043/devcsf.htm#BABGIHAH