10 Replies Latest reply on Aug 15, 2007 4:02 PM by Andrew Fielden

    JMSSecurityException when trying to subscribe to a temporary

    Andrew Fielden Newbie

      Hi,

      I'm using QueueSession.createTemporaryQueue() and trying to receive messages from this queue. However I'm getting a JMSSecurityException (shown below) at the point where I create a JMS receiver
      I know that the jbossmq-destinations-service.xml file is used to setup permissions for individual queues, however my question is, how can I configure the permissions dynamically for my temporary queue?


      javax.jms.JMSSecurityException: Connection not authorized to subscribe to destination: JMS_TQ34
      at org.jboss.mq.security.ServerSecurityInterceptor.subscribe(ServerSecurityInterceptor.java:141)
      at org.jboss.mq.server.TracingInterceptor.subscribe(TracingInterceptor.java:816)
      at org.jboss.mq.server.JMSServerInvoker.subscribe(JMSServerInvoker.java:297)
      at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:160)
      at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:356)
      at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)