mkarg's blog
JAXB Singletons Made Easy
You want JAXB to unmarshal singletons? You already spent lots of time coding rather complex workarounds applying XmlAdapters and afterUnmarshal callbacks? The solution is astonishingly simple. Possibly so simple that nobody in the JAXB team ever thought it would be necessary to put the word "singleton" somewhere next to the JavaDocs for this... Anyways, here is the solution:
JAX-RS 2.0: A first interim report
JAX-RS 2.0: A first interim report
It's been a few months already that the expert group of JSR 339 started discussion about the details of JAX-RS 2.0. The target defined by spec lead Oracle are clear: Java EE 7 shall have a RESTful API that augments current JAX-RS 1.1 API by (among others) a Client API, HATEOAS support and asynchronous invocations. So what's the status with state?
Dead Technology Everywhere I Go
Sometimes I wonder why rather good technology suddenly dies. Does anybody remember InfoBus? JavaBeans? Swing? Java?
All of those had been brilliant technologies, enabling programmers doing things really easily. But at one day, news about those technologies just stopped. People tend to say that those technologies "died". Well, what does that mean, and is that true?
Generic Range Class
Often code has a bad smell, then it gets time to replace custom lines by common patterns. Sometimes it even makes sense to even replace a single line of code by a class just wrapping that single line (which actually increases code size), if that makes readers better understand what the code does.
Release late, release rarely
Meanwhile I am looking back to more than 25 years of programming, and more than a decade I spent in a very sensible area where quality (in the sense of zero failures) plays a big role. So call me "sensible" for quality. For long years "we" (i. e.
Making Windows find JARs like it finds EXEs and CMDs
After more than a decade in the Java universe, today I had just enough of remembering where my executable JARs are located and typing all the lengthy path names, so I finally taught Windows to deal with Java archives just the same way as it deals with it's native executables EXE and CMD.
Excited about cite
There are times in career when you get excited about having an experience for the first time. I well remember how I got excited about seeing my first self-coded shell node popping up in the Windows Explorer (a.k.a custom shell namespace).
Apple finally permits Java on the iPhone - When will Oracle deliver?
When the iPhone came to market, Sun Microsystems announced that there soon will be Java for the iPhone. They got stopped by Apple's licence terms, which ban both, interpreted languages and code written in other language than C, C++, Objective C and JavaScript.
Using Enumerations in for-each statements - five times faster than the JRE, without RAM limitations
I was such happy when years back the JRE was extended by the Collections Framework. It's just so intuitive to use it, and provides virtually anything the average programmer needs. Compared to the older Enumeration interface, this was really much better. And even better was the introduction of the for-each statement, so iterating over a Collection was a breeze.
JDBC batch mode support in SQL Anywhere 11.0.1: Better late than never!
In my opinion, SQL Anyhwere is the best RDBMS I can think of. I can remember when we started distributing it in Germany back in the early 1990ies, as one of the first early adopters in this country. Since then, we provided it to hundreds of enterprises, from single-person laptop-only ones to large ones spanning replicated installations crossing country borders.





