[jboss-user] [Messaging, JMS & JBossMQ] - How do you enable JMSXUserID message property

osganian do-not-reply at jboss.com
Thu Dec 28 17:35:11 EST 2006


I'm using JBoss 4.0.4.

The JMS spec says that the message driven bean can get the username of the user that dropped the message on the queue by getting the message property value 'JMSXUserID".  I am doing the following in my client:


  | System.setProperty(Context.SECURITY_AUTHENTICATION, "simple");
  | System.setProperty(Context.SECURITY_PRINCIPAL, "test");
  | System.setProperty(Context.SECURITY_CREDENTIALS, "test");
  | Hashtable ht = new Hashtable(System.getProperties());
  | ConnectionFactory cf = (new InitialContext(ht)).lookup(JNDI_FACTORY_NAME);
  | ...
  | producer.send(message);
  | ...
  | 
            
In my MDB:


  | String username = message.getStringProperty("JMSXUserID");
  | 
            
What am i missing?

Thanks!
Mike


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996740#3996740

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996740



More information about the jboss-user mailing list