Mmmm... good question.. it can be accessed through the BrokerService object, but it was never intended to be made accessible... would have to use some hacking to get at it. See attached unit test that has such hacking.
Otherwise, to get at it in JMX, make sure your broker is populating the username: BrokerService service = new BrokerService(); service.setUseJmx(true); service.setPopulateUserNameInMBeans(true); Good luck! On Thu, Nov 29, 2012 at 12:29 PM, prgtrdr <prgt...@gmail.com> wrote: > Thanks, Christian. > > To put it more succinctly, what I want to do is retrieve the userName for a > given ConnectionId returned by the Advisory onMessage function. > > Do you think JMX is the easiest way to do this? Can't I use the > BrokerService or some other object I have created in the embedded ActiveMQ > instance? > > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/How-can-I-retrieve-a-Stomp-username-when-a-new-Connection-is-made-tp4659949p4659954.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > -- *Christian Posta* http://www.christianposta.com/blog twitter: @christianposta