2 Replies Latest reply: May 8, 2013 2:03 AM by 795131 RSS

    getSubject() always return null after jdk1.6.0_39

      We use following code to get subject in JMX Server. The Subject.getSubject(acc) always return null event the user is authenticated. It is Ok for JDK oldder than 1.6.0_39.
      So, is there any body knows if it is a JDK's bug, or there are something changed in JDK after 1.6.0_39?
      If the feature changed after 1.6.0_39, how i get current user's subject?

      AccessControlContext acc = AccessController.getContext();
      Subject subject = Subject.getSubject(acc);