[jboss-user] [JBoss Messaging Users] - Re: Persistence Manager Problem - null-persistence-service.x
amalraj.palanichamy
do-not-reply at jboss.com
Tue Oct 27 07:48:15 EDT 2009
JBoss Messaging Null Persistence Service
===========================
Purpose: To disable the Database Persistence Policy and introducing Null Persistence Service.
--------
Step 1: we have to delete the existing \server\default\deploy\messaging\hsqldb-persistence-service.xml.
--------
Step 2: delete the following messaging security policy from the \server\default\deploy\messaging\messaging-jboss-beans.xml file
--------
<!-- messaging application-policy definition -->
<application-policy xmlns="urn:jboss:security-beans:1.0" name="messaging">
<login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
<module-option name="unauthenticatedIdentity">guest</module-option>
<module-option name="dsJndiName">java:/DefaultDS</module-option>
<module-option name="principalsQuery">SELECT PASSWD FROM JBM_USER WHERE USER_ID=?</module-option>
<module-option name="rolesQuery">SELECT ROLE_ID, 'Roles' FROM JBM_ROLE WHERE USER_ID=?</module-option>
</login-module>
</application-policy>
Step 3: Include the messaging policy in the \server\default\conf\login-config.xml file as the follows,
-------
<!-- A template configuration for messaging. This
defaults to the UsersRolesLoginModule the same as other and should be
changed to a stronger authentication mechanism as required.
-->
<application-policy name="messaging">
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
flag="required">
<module-option name = "unauthenticatedIdentity">guest</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>
And also place the following properties files in the directory \server\default\conf\props
1. messaging-users.properties
------------------------------
#
# user=password
#
guest=guest
2. messaging-roles.properties
-------------------------------
#
# user=role1,role2,...
#
guest=guest
Step 4: Place the null-persistence-service.xml file with the following contents under the directory \server\default\deploy\messaging
-------
<?xml version="1.0" encoding="UTF-8"?>
<!--
Null persistence config.
Use this if you don't actually want to persist anything
$Id$
-->
<!-- Persistence Manager MBean configuration
======================================== -->
<mbean code="org.jboss.messaging.core.jmx.NullPersistenceManagerService"
name="jboss.messaging:service=PersistenceManager"
xmbean-dd="xmdesc/NullPersistenceManager-xmbean.xml"/>
<!-- Messaging Post Office MBean configuration
========================================= -->
<mbean code="org.jboss.messaging.core.jmx.MessagingPostOfficeService"
name="jboss.messaging:service=PostOffice"
xmbean-dd="xmdesc/MessagingPostOffice-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer
<depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager
<!-- The name of the post office -->
JMS post office
<!-- This post office is clustered. If you don't want a clustered post office then set to false -->
false
<!-- Messaging JMS User Manager MBean config
======================================= -->
<mbean code="org.jboss.jms.server.plugin.JDBCJMSUserManagerService"
name="jboss.messaging:service=JMSUserManager"
xmbean-dd="xmdesc/JMSUserManager-xmbean.xml">
<depends optional-attribute-name="TransactionManager">jboss:service=TransactionManager
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4262399#4262399
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4262399
More information about the jboss-user
mailing list