[jboss-user] [Security & JAAS/JBoss] - Re: Anyway of removing the MDB username and password from th

thai777 do-not-reply at jboss.com
Thu Mar 19 22:33:38 EDT 2009


Hi all, we are trying to remove hardcoding the username and password for the MDB from jboss.xml. Tried as suggested but for some reason the property values aren't being picked up in jboss.xml. 


1. deploy/properties-service.xml:

  <mbean code="org.jboss.varia.property.SystemPropertiesService" 
  | 	 name="jboss:type=Service,name=SystemProperties">
  | 
  |     <!-- 
  |        | Set raw properties file style properties.
  |     -->
  | 
  |     <attribute name="Properties">
  | 
  |         username=john
  |         password=needle
  | 
  |     </attribute>
  |     </mbean>


2. jboss.xml:

    <message-driven> 
  |       <ejb-name>SaMDB</ejb-name> 
  |       <destination-jndi-name>queue/TO_SA</destination-jndi-name> 
  | 
  |       <mdb-user>${username}</mdb-user>
  |       <mdb-passwd>${password}</mdb-passwd>
  | 
  |       <resource-ref> 
  |         <res-ref-name>jms/QCF</res-ref-name> 
  |         <jndi-name>ConnectionFactory</jndi-name> 
  |       </resource-ref> 
  |     </message-driven> 

3. <JBOSS_SERVER/common/lib/properties-plugin.jar exists

4. Tried in JBoss version 5.0.0.GA and 5.0.1.GA 

5. ${username} has not been evaluated, got the following exception:

    javax.jms.JMSSecurityException: User ${username} is NOT authenticated



Any help or leads would be most appreciated.


Thanks,

Thai

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

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



More information about the jboss-user mailing list