>>>>> "VB" == Vicki Bell <[EMAIL PROTECTED]> writes:
VB> I am trying to use the Batik transcoder from a web component
VB> deployed in the J2EE reference environment (version
VB> 1.3.1). However, when I attempt to transcode an SVG to a JPEG with
VB> size adjustment (see attached code fragment) I get the following
VB> AccessControlException from the J2EE container:
VB> java.security.AccessControlException: access denied
VB> (java.lang.RuntimePermission modifyThreadGroup) at
VB> java.lang.Thread.<init>(Thread.java:330) at
VB> org.apache.batik.util.SoftReferenceCache$1.<init>(Unknown Source)
VB> I believe I could get round this by modifying the J2EE
VB> server.policy file to grant permission to modifythreadgroup
VB> (haven�t tried it yet). Has anyone else encountered this
VB> problem? Anyone know of a way round it without compromising the
VB> security of the J2EE application in the real world?
The problem is that we start some background threads to manage
some soft reference caches. I can't think of a clean way to manage
these without the background threads. I'm a bit surprised that J2EE
doesn't allow code to start threads as this is a really fundamental
tool of Java.
Perhaps someone that knows more about J2EE can suggest how this
issue is normally delt with in J2EE applications.
I don't know how well you know policy files but in case you didn't
know you can limit the ability to create threads to just the Batik
jars, which might help some with your security concerns.
Good luck, and I hope this helps.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]