Skip to main content
View by: Most Recent | Topic | Community | Webloggers   
Monthly Archives:    

Blogs by topic Blogs and user mkarg

• Accessibility • Ajax • Blogging • Business • Community 
• Databases • Deployment • Distributed • Eclipse • Education 
• EJB • Extreme Programming • Games • GlassFish • Grid 
• GUI • IDE • Instant Messaging • J2EE • J2ME 
• J2SE • Jakarta • JavaFX • JavaOne • Jini 
• JSP • JSR • JXTA • LDAP • Linux 
• Mobility • NetBeans • Open Source • OpenSolaris • OSGi 
• P2P • Patterns • Performance • Porting • Programming 
• Research • RMI • RSS Feeds • Search • Security 
• Servlets • Struts • Swing • Testing • Tools 
• Virtual Machine • Web Applications • Web Design • Web Development Tools • Web Services and XML 


Programming

One day I found myself in the situation that I had to write a unit test which checks whether my code is annotated in a particular way. I wondered how one could do that without doing an integration test that actually processes that annotations. My first idea was to use the Reflection API, which in fact worked, but was not looking smart. In fact, I wanted to have a Hamcrest matcher instead, since...
on Dec 27, 2013
As this JavaRanch article by Mark Spritzler proofs, there seem to be some people that like to have a generic visitor pattern, so I decided to open source mine (LGPL), which lies around here on my disk for some time. Have fun using it, it is as simple as linking to: <dependency>    <groupId>eu.headcrashing.treasure-chest</groupId> ...
on Oct 3, 2012
I hate adding lots of huge multi-JAR all-purpose common libraries to rather small projects! Huge footprint just for a single class is a side effect of many popular frameworks, unfortunately, due to rather coarse-grained modularity. So I started to publish some of my commons (LPGL'ed) code as single-class self-contained artifacts on The Maven Central Repository. You simple need a Range<T>...
on Sep 7, 2012
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: import javax.xml...
on Jan 14, 2012
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? As three corner...
on Jul 24, 2011
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. developers) had hard work to do using simple command lines tools like vi etc., but meanwhile there are great, even free,...
on Dec 29, 2010
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. The trick is so simple that I actually do not understand why the JRE installer isn't applying it automatically...
on Dec 29, 2010
Update (2012-09-24): Maven users, you can directly link this class (LGPL), as I have uploaded it into Maven Central. Simply add a dependency to: &lt;dependency&gt;    &lt;groupId&gt;eu.headcrashing.treasure-chest&lt;/groupId&gt;    &lt;artifactId&gt;EnumerationsClass&lt;/artifactId&gt;    &lt;version&gt;...
on Jul 4, 2010
There are times when things hurt so much that you feel urged to blog about them once solved. This is one of them. Our company is using XSL heavily for reporting (generating vector charts in PDFs on the fly from data analyzed by GlassFish), so it is not very amazing that we found some bugs in the XSL transformer (a.k.a "JAXP Implementation") contained in GlassFish. As we're not so fast...
on Mar 16, 2010

Community

Some time ago, I had the impression that everywhere I stepped in the endless Java universe, I came across rather outdated technology. Things that were hyped years back, but for some reason had been left behind by mankind in the course of time. Disenchantedly roaming that programming desert I almost went depressive looking at all the rusty wrecks of former featured APIs laying around all along....
on Jan 1, 2013
It eventually happened that I had to ensure that a class of mine is annotated in a particular way (I didn't want to bind the whole framework that uses the annotation just to ensure this single issue, as this was a unit test but not an integration test). So I wrote my own Hamcrest matcher with few pieces of reflection inside. Short time later I noticed that Hamcrest co-owner Nat PRYCE already did...
on Sep 1, 2012
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). A bit of excitement I noticed seeing my first reader's comment printed in iX. And I was really excited about receiving my first printed articles in...
on Nov 13, 2010
For meanwhile more than 25 years I am writing computer programs. More than a decade I spent with programs accessing databases, virtually always relational ones. I soon learned that this is rather hard work. Not only that you need to know about the theory behind RDBMS iself, but also you need to know the technical APIs (like ODBC, ADO, RDO, JDBC, JDO, JPA, CMP, ...), the structure of...
on Feb 28, 2010

GUI

Swing is not dead, still. While a whole lot of evangelists try to talk it dead, it is still part of the JRE. While SWT is not, still. And while JavaFX is not, still. Dispite all hypes and rumors. It is not even declared to be deprecated or obsolete. So in fact, there is no other real alternative to Swing as long as the GUI must work solely with JRE means (I won't say AWT is an alternative). And...
on Sep 7, 2012
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? Let's start with...
on Apr 24, 2011

Education

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. Unfortunately often such patterns are publicly known but do not exist as ready to...
on Jan 1, 2011

Mobility

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. Lately I read in the news that Apple change the licence terms, and found a promising statement on Apple's web site, so now...
on Sep 10, 2010

Databases

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. So call me biased in that...
on Jul 3, 2010
If you wonder whether the style of use with JDBC API has an impact of performance, you might like to read my latest blog entry on Head Crashing Informatics. While the entry mostly is about tuning SQL Anywhere's BLOB handling performance, it contains an interesting aspect: There are three ways to deal with BLOBs in JDBC, and the performance difference is tremendous. While obvious for the JDBC...
on Apr 10, 2010

Research

When I attended college decades back in the early 1990ies, for students of information technology the future looked bright and safe. The cold war was over, the web was growing fastly, and thanks to the pill's baby bust it was clear that everybody able to program computers would have a safe job for livetime. While I had some experience with modems and fido net before, it actually was in...
on May 16, 2010