How is it possible to check that particular user has write rights to Queue
/ Topic
, without affecting Destination
.
If user has no such rights exception will be thrown and there would be zero-affection.
But if user has such rights, then new message will appear in Queue
/ Topic
, and this is that shouldn't occur.
Is there any way to perform such test? May be is it possible to use开发者_开发知识库 transaction without commit?
I think generally, it will depend on the JMS provider that you're using, as JMS itself does not specify security mechanisms. On IBM MQ, for example, calling Session.createProducer(Destination queueOrTopic)
will throw an InvalidDestinationException if you're not authorized to send/publish messages to a destination.
精彩评论