11 Replies Latest reply on Jul 6, 2009 9:31 AM by Clebert Suconic

    Data dirs wrong in AS config

    Tim Fox Master

      The directory used for data in the default AS config is just the default directory - this is not correct, it should be relative to the server config directory.

      This was changed by Andy (from its previously correct value) in revision 6744:

      Index: jbm-configuration.xml
      ===================================================================
      --- jbm-configuration.xml (revision 6743)
      +++ jbm-configuration.xml (revision 6744)
      @@ -1,55 +1,7 @@
      -<configuration xmlns="urn:jboss:messaging"
      - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      - xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-configuration.xsd">
      - <clustered>false</clustered>
      -
      - <!-- Maximum number of threads to use for scheduled deliveries -->
      - <scheduled-thread-pool-max-size>30</scheduled-thread-pool-max-size>
      +<configuration xmlns="urn:jboss:messaging"
      + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      + xsi:schemaLocation="urn:jboss:messaging ../schemas/jbm-configuration.xsd">
      
      - <security-enabled>true</security-enabled>
      -
      - <security-invalidation-interval>10000</security-invalidation-interval>
      -
      - <wild-card-routing-enabled>true</wild-card-routing-enabled>
      -
      - <management-address>jbm.management</management-address>
      - <management-notification-address>jbm.notifications</management-notification-address>
      -
      - <!-- true to expose JBoss Messaging resources through JMX -->
      - <jmx-management-enabled>true</jmx-management-enabled>
      -
      - <!-- by default, message counter is disabled -->
      - <message-counter-enabled>false</message-counter-enabled>
      -
      - <connection-scan-period>10000</connection-scan-period>
      -
      - <!--how long before timing a transaction out-->
      - <transaction-timeout>60000</transaction-timeout>
      - <!--how often to scan for timedout transactions-->
      - <transaction-timeout-scan-period>1000</transaction-timeout-scan-period>
      -
      - <!-- how often do we scan the queues for expired messages-->
      - <message-expiry-scan-period>30000</message-expiry-scan-period>
      - <!-- the priority of the thread that expires th emessages (between 1 - 10 inclusive)-->
      - <message-expiry-thread-priority>3</message-expiry-thread-priority>
      -
      - <!-- Example interceptors
      - <remoting-interceptors>
      - <class-name>org.jboss.messaging.tests.unit.core.config.impl.TestInterceptor1</class-name>
      - <class-name>org.jboss.messaging.tests.unit.core.config.impl.TestInterceptor2</class-name>
      - </remoting-interceptors>
      - -->
      -
      - <queue-activation-timeout>30000</queue-activation-timeout>
      -
      - <backup>false</backup>
      -
      - <persist-delivery-count-before-delivery>false</persist-delivery-count-before-delivery>
      -
      - <!--
      - <backup-connector-ref connector-name="netty-backup"/>
      - -->
      -
       <!-- Connectors -->
       <connectors>
       <connector name="netty-connector">
      @@ -57,13 +9,6 @@
       <param key="jbm.remoting.netty.host" value="${jboss.bind.address}" type="String"/>
       <param key="jbm.remoting.netty.port" value="${jbm.remoting.netty.port}" type="Integer"/>
       </connector>
      -
      - <!-- <connector name="netty-connector-ssl">
      - <factory-class>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</factory-class>
      - <param key="jbm.remoting.netty.host" value="${jboss.bind.address}" type="String"/>
      - <param key="jbm.remoting.netty.port" value="${jbm.remoting.netty.ssl.port}" type="Integer"/>
      - <param key="jbm.remoting.netty.sslenabled" value="true" type="Boolean"/>
      - </connector> -->
      
       <connector name="in-vm-connector">
       <factory-class>org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
      @@ -74,7 +19,7 @@
       <!-- Acceptors -->
       <acceptors>
       <!-- In VM acceptor -->
      - <acceptor name="in-vm-acceptor">
      + <acceptor name="in-vm-acceptor">
       <factory-class>org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
       <param key="jbm.remoting.invm.serverid" value="0" type="Integer"/>
       </acceptor>
      @@ -85,62 +30,30 @@
       <param key="jbm.remoting.netty.host" value="${jboss.bind.address}" type="String"/>
       <param key="jbm.remoting.netty.port" value="${jbm.remoting.netty.port}" type="Integer"/>
       </acceptor>
      -
      - <!-- Netty In VM Acceptor -->
      - <!--
      - <acceptor name="netty-invm">
      - <factory-class>org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory</factory-class>
      - <param key="jbm.remoting.netty.useinvm" value="true" type="Boolean"/>
      - <param key="jbm.remoting.netty.host" value="org.jboss.jbm" type="String"/>
      - </acceptor>
      - -->
      +
       </acceptors>
      -
      - <!-- Large Messages configuration -->
      -
      - <large-messages-directory>${jboss.server.data.dir}/messaging/largemessages</large-messages-directory>
      -
      - <!-- Paging configuration -->
      -
      - <paging-max-threads>10</paging-max-threads>
      -
      - <paging-directory>${jboss.server.data.dir}/messaging/paging</paging-directory>
      -
      - <paging-global-watermark-size>10485760</paging-global-watermark-size>
      -
      - <paging-max-global-size-bytes>104857600</paging-max-global-size-bytes>
      -
      - <!-- Storage configuration -->
      
      - <bindings-directory>${jboss.server.data.dir}/messaging/bindings</bindings-directory>
      + <security-settings>
      + <security-setting match="#">
      + <permission type="createTempQueue" roles="guest"/>
      + <permission type="deleteTempQueue" roles="guest"/>
      + <permission type="consume" roles="guest"/>
      + <permission type="send" roles="guest"/>
      + </security-setting>
      + </security-settings>
      
      - <create-bindings-dir>true</create-bindings-dir>
      + <address-settings>
      + <!--default for catch all-->
      + <address-setting match="#">
      + <clustered>false</clustered>
      + <dead-letter-address>jms.queue.DLQ</dead-letter-address>
      + <expiry-address>jms.queue.ExpiryQueue</expiry-address>
      + <redelivery-delay>0</redelivery-delay>
      + <max-size-bytes>-1</max-size-bytes>
      + <page-size-bytes>10485760</page-size-bytes>
      + <distribution-policy-class>org.jboss.messaging.core.server.impl.RoundRobinDistributor</distribution-policy-class>
      + <message-counter-history-day-limit>10</message-counter-history-day-limit>
      + </address-setting>
      + </address-settings>
      
      - <journal-directory>${jboss.server.data.dir}/messaging/journal</journal-directory>
      -
      - <create-journal-dir>true</create-journal-dir>
      -
      - <journal-type>ASYNCIO</journal-type>
      -
      - <!-- The journal will reuse any buffers where the size < journal-buffer-reuse-size on write operations
      - Set this to -1 to disable this feature -->
      - <journal-buffer-reuse-size>1536</journal-buffer-reuse-size>
      -
      - <!-- Does the journal sync to disk on each transaction commit, prepare or rollback? -->
      - <journal-sync-transactional>true</journal-sync-transactional>
      -
      - <!-- Does the journal sync to disk for every non transactional persistent operation? -->
      - <journal-sync-non-transactional>false</journal-sync-non-transactional>
      -
      - <!-- 10 MB journal file size -->
      - <journal-file-size>10485760</journal-file-size>
      -
      - <journal-min-files>15</journal-min-files>
      -
      - <!-- Maximum simultaneous asynchronous writes accepted by the native layer.
      - (parameter ignored on NIO)
      - You can verify the max AIO on the OS level at /proc/sys/fs/aio_max_nr. (aio-nr will give you the current max-aio being used)
      - -->
      - <journal-max-aio>10000</journal-max-aio>
      -
       </configuration>
      
      


      It's important that each config has its own journal otherwise you could have weird effects when more than one configs are used.