我想禁止用户将消息发送到特定队列(jms)。我正在使用tibco ems服务器,tibco管理工具。
我做了以下事情:
tcp://localhost:7222> create user test "Test user" password=test
> tcp://localhost:7222> create group admin
> Group 'admin' has been created
> tcp://localhost:7222> create group users
> Group 'users' has been created
> tcp://localhost:7222> add member users test
> Group 'users' has been modified
> tcp://localhost:7222> add member admin admin
> Group 'admin' has been modified
> tcp://localhost:7222> add member admin EMS-SERVER
> Group 'admin' has been modified
> tcp://localhost:7222> add member admin EMS-SERVER2
> Group 'admin' has been modified
> tcp://localhost:7222> show users
> User Name Description
> admin Administrator
> EMS-SERVER Main Server
> EMS-SERVER2 Route Server
> test Test user
> tcp://localhost:7222> grant queue in.queue group=admin all
> Permissions have been changed
> tcp://localhost:7222> showacl queue in.queue
> Principal Permissions for queue 'in.queue'
> Group=admin receive,send,browse
此外,我想检查"测试"用户没有凭据在" in.queue"上发送消息。 java代码如下:
> String user = "test";
> String password = "test";
> try {
> connection = qcf.createQueueConnection(user, password);
但是最终这个用户发送了消息。
textMessage.setText("您好"!); sender.send(文字信息);
结果在我的队列中,我收到了新消息。
我做错了什么?
答案 0 :(得分:0)
解决方案是
tcp://localhost:7222> set server authorization=enabled
Server parameters have been changed