9 Replies Latest reply on May 15, 2013 3:00 AM by Bond Chan

    Disappearing credentials after publisher.send

    Tarek Hammoud Novice


      I hope that this is the right forum for this. We are undergoing an effort to switch to JBOSS messaging from ActiveMQ (Soon 2.x). Our first effort is to get our stuff to work with JBM 1.4x and then 2.x. We have noticed that when we send a message using JMS, the current active principal is no longer active.

      Basically, we call the following (Before and After the publisher.send call)

      java.security.Principal userPrincipal = SecurityContextAssociation.getSecurityContext().getUtil().getUserPrincipal();

      After the send, the call returns null. Our code above the JMS layer must run in the proper security context. As far as JMS is concerned, basic guest authentication is all we need. We use JAAS for all our our authentication.

      There must be a logic to this. Can someone kindly explain why we are seeing this behavior? Thank you.