2 Replies Latest reply: Jun 6, 2011 11:25 PM by Weijun RSS

    Why is sun.security.krb5.internal.ktab.KeyTab a singleton?


      while trying to find out why my server side application couldn't login 2 different javax.security.auth.Subject-s from 2 different keytab files, I found out it is because KeyTab is implemented as a singleton:


      Now, I understand the argument that I should try to put all my Subjects into one keytab file, but forcing it (1 keytab per JVM process) with such implementation seems like a overkill - what if someone really needed to use multiple keytab files in the same JVM process?