[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - how to prevent sending message to a queue ??

subrata_jboss do-not-reply at jboss.com
Thu Mar 13 06:57:31 EDT 2008


i have a queue named /queue/MessageQueue

i created one role as admin with read/write/create

now i want other than admin no body can send a message to this queue.

while using createConnection("user","password") , it is working as it is userid and password for admin.

But my createConnection() is also able to send the message to the queue !

i am using jboss messaging 1.4.2
In destinations-service.xml  i added
<mbean code="org.jboss.jms.server.destination.QueueService"
          name="jboss.messaging.destination:service=Queue,name=SubrataTest"
          xmbean-dd="xmdesc/Queue-xmbean.xml">
          <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer
          jboss.messaging:service=PostOffice
          
	     
	        
	     
          
          
   
    

in login-config.xml i added
<application-policy name = "messaging">
        
             <login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
             flag = "required" >
          <module-option name = "unauthenticatedIdentity">Subrata</module-option>
          <module-option name = "usersProperties">props/messaging-users.properties</module-option>
          <module-option name = "rolesProperties">props/messaging-roles.properties</module-option>
          </login-module>
        
    </application-policy>
In messaging-roles.properties,messaging-users.properties i added password , role.

Any help??



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4136247#4136247

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4136247



More information about the jboss-dev-forums mailing list