Archive for February, 2016

Timeouts for Oracle XA datasources in JBoss EAP 6

The documentation for configuring datasources in JBoss EAP 6 is somewhat lacking when it comes to timeouts. Normally this is fine, but what if there are network issues? With the wrong timeout settings the application can hang until it is killed and restarted. With proper timeouts it can handle an outage and recover.

Here is an example:

<xa-datasource jndi-name="java:/AppDS" pool-name="AppDS">
  <xa-datasource-property name="URL">
  <xa-datasource-property name="nativeXA">true</xa-datasource-property>
  <xa-datasource-property name="ConnectionProperties">
    <valid-connection-checker class-name=
    <stale-connection-checker class-name=
    <exception-sorter class-name=
  <recovery no-recovery="false">

The oracle.jdbc.ReadTimeout is essential. It sets the network timeout on the socket, making reads time out eventually in the face of a broken connection. The default TCP timeout for established connections is very long, so it is important to set a value. It should be larger than the transaction timeouts. The query timeout and tx-query-timeout both limit the time that individual statements can take. The query timeout is used when there is no transaction, otherwise the remaining time until transaction timeout is used.

Note that read timeout is in milliseconds, query timeout is in seconds.

Categories: Java, Networking, Oracle

Compression ratio and time for common tools

One application I’m working with produces horrendous amounts of log files. They are so large that the process of compressing them and moving them to another server actually has a performance impact on the system in spite of nice and ionice. I decided to compare the most common compression tools. At home I’m using bzip2, as I want the best possible compression ratio. Would that be a good idea?

Compression ratio and time

As the table shows bzip2 is frightfully expensive, but it does produce small files. In addition it makes a big difference if gzip is told to optimize for speed (1) or compression (9), or if it runs at the default level (6). Compress is basically an outdated tool and was included as it is sometimes quoted as being faster than gzip. Here that was not the case.

Categories: Linux

Disable bloatware on Xperia Z5 compact

I recently bought a new phone, the Xperia Z5 compact. It has its strengths and weaknesses. In particular, why do vendors insist on crippling their devices with irritating bloatware?

The Xperia comes with Movie Creator, an app that runs in the background to create meaningless movies from photos. It is about as irritating as Microsoft’s old Clippy. Fortunately it is possible to get rid of the app, even though it can’t be uninstalled. Go to Settings, Apps, All and select Movie Creator. Delete any data it has amassed and then click on disable. That prevents the app from starting. It also removes the icon.

The same procedure should work for other unwanted bundled apps.

Categories: Android