You can do the following:
standalone.xml:
<subsystem xmlns="urn:jboss:domain:naming:1.2">
<bindings>
<simple name="java:global/user" value="newUser"/>
</bindings>
</subsystem>
and in spring context:
<bean class="java.util.Properties">
<constructor-arg>
<map>
<entry key="user">
<jee:jndi-lookup jndi-name="java:global/user" />
</entry>
</map>
</constructor-arg>
</bean>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…