-
1. Re: How do you enable JMSXUserID message property
osganian Dec 29, 2006 8:08 AM (in response to osganian)So it looks like JBoss 4.0.4 doesn't support the optional JMSX property JMSXUserID. So is there a way to know on the MDB side what user id sent the message? It's not an authentication thing since the user was already authenticated in order to connect to the queue and publish a message to it. Its about know who sent the message so I can perform business logic queries and such.
Weblogic supports this by setting a boolean property on its connection factory.
Anybody know how to do this in JBoss? Of course I can't simply say the client must set a message property because that would be cheating (i.e., user is named 'test' and he decides to set the special username message property to 'root'). The provider during the message send operation will have to do it.
Thanks for any help.
Mike -
2. Re: How do you enable JMSXUserID message property
osganian Dec 29, 2006 10:12 AM (in response to osganian)I also tried calling MessageDrivenContext.getCallerPrincipal() but that always returns 'anonymous'. I'm creating a connection to the factory like:
Connection sendConnection = connectionFactory.createConnection("dude", "test");
Any help would be appreciated.
Mike