In previous releases of JBoss EAP 6, if Security Manager was enabled then Narayana Transaction Manager could not be allowed read or write from the files of object store managed by FileSystemStore class.
This was because, when the security manager is used, it verifies that the code has permissions to access the file system. This process checks the entire method call chain, meaning there is a chance that some classes do not have permission to access the filesystem.
The fix implemented in this release is to access the file system as a privileged entity, `AccessController.doPrivileged()`, which reduces the stack to classes that the security manager recognizes as privileged to have file system access.
When java security manager is enabled, com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore throws the exception below: 16:23:20,930 ERROR [stderr] (ServerService Thread Pool -- 48) java.security.AccessControlException: access denied ("java.io.FilePermission" "/tmp/jboss-eap-6.3.2/standalone/data/tx-object-store/ShadowNoFileLockStore/defaultStore/EISNAME" "read") 16:23:20,931 ERROR [stderr] (ServerService Thread Pool -- 48) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372) 16:23:20,931 ERROR [stderr] (ServerService Thread Pool -- 48) at java.security.AccessController.checkPermission(AccessController.java:559) 16:23:20,932 ERROR [stderr] (ServerService Thread Pool -- 48) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) 16:23:20,932 ERROR [stderr] (ServerService Thread Pool -- 48) at java.lang.SecurityManager.checkRead(SecurityManager.java:888) 16:23:20,932 ERROR [stderr] (ServerService Thread Pool -- 48) at java.io.File.list(File.java:1111) 16:23:20,932 ERROR [stderr] (ServerService Thread Pool -- 48) at java.io.File.list(File.java:1149) 16:23:20,933 ERROR [stderr] (ServerService Thread Pool -- 48) at com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore.allObjUids(FileSystemStore.java:173)