My application is using a sun-provided API which requires me to set some system properties before calling it. Now, I'll be running multiple threads, so I'm pretty sure I'll run into issues given that System is a global object. Is there a way to set system properties on a thread-by-thread basis?? That solution would be ideal.
Another solution is to use synchronization, but I really DON'T want to do this because it would hurt performance considerably.
Another solution I thought about was to create a wrapper around the underlying sun-provided source. This is not good enough, though, because these properties are fetched by internal classes that I don't even have access to (nor can I see their documentation).
I hope someone can help me out before I'm forced to reinvent the wheel...
I'm using JAAS to perform Kerberos authentication.
JAAS requires me to set the java.security.krb5.realm and java.security.krb5.kdc properties. Then I use a LoginContext to perform the authentication. The LoginContext instantiates a Krb5LoginModule, which gets the Kerberos realm and KDC info from a call to PrincipalName (which, I assume, gets it from the system properties).
I have the source for LoginContext and the Krb5LoginModule, but I cannot access (nor find documentation about) the PrincipalName class (in the sun.security.krb5 package).
If you're not familiar with JAAS, this probably didn't make any sense, but at least now you know the properties I'm using.
I'm doing laundry! Look how clean this tiny ad is:
Free, earth friendly heat - from the CodeRanch trailboss