Jun 10 30

On Windows machines I’m used to using FinePrint to pre-process every document before it’s actually sent to the printer (2 on 1 page, 4 on 1, booklet, watermark, template, etc). From that suite of features what I miss the most on OS X is the ability to print booklets. Turns out there are at least two tools for OS X that provide that:

  1. Create Booklet
  2. CocoaBooklet

I tried Create Booklet and was quite impressed – it does what it says it does and it does that well. The documentation, however, is quite poor. In fact there’s none at all one the developer’s site. The DMG file contains a Quick Introduction.pdf that serves as a good documentation – if you don’t overlook it. The developer should have put the document’s content online. Then people could get a glimpse of what the tool does before they download (and install) it.

Jun 10 15

The Economist, May 1st issue, page 71, “America’s labour market, Something’s not working”:

“A quarter of mortgage borrowers owe more than their houses are worth.”

<swallowing hard>..my dear…

Jun 10 10

If you’re faced with the challenging task of exporting a mailman subscribers list through the mailman web interface (e.g. because you don’t have SSH access to the server) look no further, there’s a nice Python-based solution for this.

Download http://msapiro.net/mailman-subscribers.py onto your Python-enabled system and run:

./mailman-subscribers.py -f <host_URL_without_http://> <listname> <password>
May 10 15

Google PageSpeed reported that the JPEG images of a web project I recently worked on should be optimized i.e. compressed. So, I used jpegoptim in batch mode on OS X for the job. You need to build the jpegoptim binary for OS X yourself. Short manual:

  1. Download jpegoptim sources from developer’s website
  2. Unpack the TAR ball
  3. Navigate to the unpacked sources in a shell
  4. chmod a+x configure
  5. ./configure
  6. make install

In my case the libjpeg library was missing. I had to download and build libjpeg as part of the official IJG JPEG 8 code. Once everything was in place I simply ran jpegoptim from the command line for all JPEG files in a folder.

jpegoptim -o --dest=./compressed --strip-all *.jpg

This optimizes all .jpg files in the current folder with maximum compression (–strip-all) and saves the compressed files in the ‘compressed’ sub folder (had to be created first).

May 10 11

When you start the Dalvik Debug Monitor Server (DDMS) in your Android development environment you might notice its mysterious logo:

I asked my myself: where the heck is this place? What’s the story behind that? My first guess was northern Scandinavia. Turns out I wasn’t quite right but not very wrong either.

I compared it with various coastlines on Google Maps and found a matching spot in northern Iceland. I zoomed closer and bingo! in the center of the logo is a town called Dalvik. Now it all makes sense. There’s even a few words about the link between the town Dalvik and Android on Wikipedia.

May 10 10

If you use ServletFilters that are mapped to URLs/resources that don’t physically exist (e.g. such as Paul Tuckey’s UrlRewriteFilter) IBM WebSphere 6.1 will answer such requests with “Error 404: SRVE0190E”. If WebSphere runs in trace mode you’ll see a FileNotFoundException in the log file.

This is yet another idiotic WebSphere behavior that you need to work around. Set

com.ibm.ws.webcontainer.invokefilterscompatibility=true

in Servers -> Server -> Web Container Settings -> Web Container -> Custom Properties.

IBM has more information in their custom properties documentation (search for “Invoking the filter capability”) and on the respective support document (for fix pack 6.1.07). Since the URLs to those documents might become invalid in the future I persisted the latter in a PDF.

Apr 10 21

I was recently invited by Apple to take part in one of their customer support surveys. Besides the somewhat strange URL I noticed an all too familiar favicon: yes, Apple runs JBoss (Web).

Of course I played around with the URL a little…here comes the confirmation, it’s JBoss Web 2.2.1:

Apr 10 20

Java allows to use a custom VM-wide SSLSocketFactory implementation like so: HttpsURLConnection.setDefaultSSLSocketFactory(SSLSocketFactory). Thus, you can either implement your own SSLSocketFactory or you can configure a regular instance according to your needs/environment. You have to understand that there a probably very few use cases where this method actually really helps. Setting a static default SSLSocketFactory influences all components that require a SSL connection of some sort. The same socket factory instance will be used!

Apache CXF has long had very good SSL support built right in. The documentation is pretty clear about how configure the SSL connection(s). Up to version 2.2.7, however, CXF ignored any custom SSLSocketFactory set as described above. CXF’s HttpsURLConnectionFactory.decorateWithTLS(HttpURLConnection) simply wasn’t prepared for that.

CXF now 2.2.7 supports this through a simple configuration parameter. The feature proposal in the CXF JIRA describes the change: https://issues.apache.org/jira/browse/CXF-2693. I only had to add a few lines to the Spring application context:

  <http-conf:conduit name="*.http-conduit">
    <http-conf:tlsClientParameters useHttpsURLConnectionDefaultSslSocketFactory="true" />
  </http-conf:conduit>
  <!--
    Due to a XML parsing issue mentioned here http://www.mail-archive.com/users@cxf.apache.org/msg13711.html it's
    necessary to import the CXF XMLs explicitly.
  -->
  <import resource="classpath:META-INF/cxf/cxf.xml" />
  <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
  <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
Apr 10 16

WTFs/m

Apr 10 14

Help Me Support This CauseHelp Me Support This CauseHelp Me Support This Cause