26 June 2014

Eclipse Luna bug in Preferences for XML Editor

Bambitroll @ 09:59

If you are using the first release version of Eclipse 4.4 Luna, there is a bug in Windows->Preferences->XML->XML Files->Editor.

You can not change the settings for indentation size when using spaces. It is impossible to write a new number in the field and the -/+ buttons are disabled. The default value is 1! :(

The work around I found is to edit the following file in your workspace:
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.xml.core.prefs

And add the following line (if you want 4 char for your indentation):
indentationSize=4


17 June 2014

ActiveMQ: memory management for queues

Bambitroll @ 11:05
With JMS persistent messages, all the message are persisted to the storage device by default, but also kept in memory. When a queue can potentially contain many messages, it is then necessary to set a max memory allowed, like this:
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="/var/activemq/data">
    <destinationPolicy>
        <policyMap>
            <policyEntries>
                <policyEntry queue=">" producerFlowControl="false" memoryLimit="100mb" queuePrefetch=”1” maxPageSize=”10” lazyDispatch=”true” />
            </policyEntries>
        </policyMap>
    </destinationPolicy>
</broker>