[JBoss Messaging Users] - Re: Persistence Manager Problem - null-persistence-service.x
by amalraj.palanichamy
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
16 years, 6 months
[JCA] - Re: Datasource Failover Notification
by mayankmit2002
|
| <datasources>
| <ha-xa-datasource>
| <jndi-name>PostgresDS</jndi-name>
| <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
| <xa-datasource-property name="ServerName">${data.source}</xa-datasource-property>
| <xa-datasource-property name="PortNumber">5432</xa-datasource-property>
| <xa-datasource-property name="DatabaseName">smd</xa-datasource-property>
| <!--xa-datasource-property name="Ssl">false</xa-datasource-property-->
| <xa-datasource-property name="User">systemmgr</xa-datasource-property>
| <xa-datasource-property name="Password">cms10</xa-datasource-property>
| <url-property>ServerName</url-property>
| <url-delimiter>,</url-delimiter>
|
| <track-connection-by-tx/>
|
| <metadata>
| <type-mapping>PostgreSQL 8.0</type-mapping>
| </metadata>
|
| <prepared-statement-cache-size>32</prepared-statement-cache-size>
| <min-pool-size>5</min-pool-size>
| <max-pool-size>20</max-pool-size>
| <max-idle-timeout>0</max-idle-timeout>
| <blocking-timeout-millis>30000</blocking-timeout-millis>
| <idle-timeout-minutes>0</idle-timeout-minutes>
| <track-statements>true</track-statements>
| <check-valid-connection-sql>select version()</check-valid-connection-sql>
| </ha-xa-datasource>
|
| <ha-xa-datasource>
| <jndi-name>ArgusDS</jndi-name>
| <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
| <xa-datasource-property name="ServerName">${data.source}</xa-datasource-property>
| <xa-datasource-property name="PortNumber">5432</xa-datasource-property>
| <xa-datasource-property name="DatabaseName">smd</xa-datasource-property>
| <!--xa-datasource-property name="Ssl">false</xa-datasource-property-->
| <xa-datasource-property name="User">systemmgr</xa-datasource-property>
| <xa-datasource-property name="Password">cms10</xa-datasource-property>
| <url-property>ServerName</url-property>
| <url-delimiter>,</url-delimiter>
|
| <track-connection-by-tx/>
|
| <metadata>
| <type-mapping>PostgreSQL 8.0</type-mapping>
| </metadata>
|
| <prepared-statement-cache-size>32</prepared-statement-cache-size>
| <min-pool-size>5</min-pool-size>
| <max-pool-size>20</max-pool-size>
| <max-idle-timeout>0</max-idle-timeout>
| <blocking-timeout-millis>30000</blocking-timeout-millis>
| <idle-timeout-minutes>0</idle-timeout-minutes>
| <track-statements>true</track-statements>
| <check-valid-connection-sql>select version()</check-valid-connection-sql>
| </ha-xa-datasource>
|
| <ha-xa-datasource>
| <jndi-name>DefaultDS</jndi-name>
| <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
| <xa-datasource-property name="ServerName">${data.source}</xa-datasource-property>
| <xa-datasource-property name="PortNumber">5432</xa-datasource-property>
| <xa-datasource-property name="DatabaseName">jms</xa-datasource-property>
| <!--xa-datasource-property name="Ssl">false</xa-datasource-property-->
| <xa-datasource-property name="User">systemmgr</xa-datasource-property>
| <xa-datasource-property name="Password">cms10</xa-datasource-property>
| <url-property>ServerName</url-property>
| <url-delimiter>,</url-delimiter>
|
| <track-connection-by-tx/>
|
| <metadata>
| <type-mapping>PostgreSQL 8.0</type-mapping>
| </metadata>
|
| <prepared-statement-cache-size>32</prepared-statement-cache-size>
| <min-pool-size>5</min-pool-size>
| <max-pool-size>20</max-pool-size>
| <max-idle-timeout>0</max-idle-timeout>
| <blocking-timeout-millis>30000</blocking-timeout-millis>
| <idle-timeout-minutes>0</idle-timeout-minutes>
| <track-statements>true</track-statements>
| <check-valid-connection-sql>select version()</check-valid-connection-sql>
| </ha-xa-datasource>
|
| <ha-xa-datasource>
| <jndi-name>BMSDS</jndi-name>
| <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
| <xa-datasource-property name="ServerName">${data.source}</xa-datasource-property>
| <xa-datasource-property name="PortNumber">5432</xa-datasource-property>
| <xa-datasource-property name="DatabaseName">bms</xa-datasource-property>
| <xa-datasource-property name="User">systemmgr</xa-datasource-property>
| <xa-datasource-property name="Password">cms10</xa-datasource-property>
| <url-property>ServerName</url-property>
| <url-delimiter>,</url-delimiter>
|
| <track-connection-by-tx/>
|
| <metadata>
| <type-mapping>PostgreSQL 8.0</type-mapping>
| </metadata>
|
| <prepared-statement-cache-size>32</prepared-statement-cache-size>
| <min-pool-size>5</min-pool-size>
| <max-pool-size>20</max-pool-size>
| <max-idle-timeout>0</max-idle-timeout>
| <blocking-timeout-millis>30000</blocking-timeout-millis>
| <idle-timeout-minutes>0</idle-timeout-minutes>
| <track-statements>true</track-statements>
| <check-valid-connection-sql>select version()</check-valid-connection-sql>
| </ha-xa-datasource>
|
| </datasources>
|
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4262395#4262395
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4262395
16 years, 6 months