This discussion is archived
1 Reply Latest reply: Oct 29, 2012 3:36 AM by Mohammed Rayan-Oracle RSS

When should AccessController.doPrivileged() be used?

Aacc Newbie
Currently Being Moderated
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 Journeyer
    Currently Being Moderated
    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

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points