ClickAider
You are currently browsing the Bogle’s Blog weblog archives for the day Thursday, August 18th, 2005.

O’Reilly’s Blackberry Hacks, coming this October

O’Reilly has announced a new book entitled BlackBerry Hacks, to be published in October.

Blackberry Hacks includes information of special interest to Blackberry power users and Blackberry developers. I’m looking forward to getting some good inside tips from other developers!

I have contributed two articles that will be published in Blackberry Hacks, one on power user features of Berry 411 and the other on some of techniques used to build the application.

Hibernate formula properties bug and a workaround

Formulas are a useful feature of the Hibernate Object-Relational mapping layer; they allow you to specify “raw” SQL to compute the value of a property in a mapping file.

For example, a sample formula property might look like this:

< property name=”autoRating” formula=”(select apr.rating from view_auto_prospect_ratings apr where apr.job_id = job_id and apr.user_id=user_id)”> … </property &gt’

Unfortunately, there is a significant bug/misfeature in formulas; I note it here to share the workaround I found.

The bug is that anything that looks a column reference without an explicit table name is prepended with the alias of the main object table. In the example above, this would be the right thing to do for job_id, but the wrong thing to do for rating, which belongs to another table. The workaround is to qualify explicitly qualify columns with a table name whenever possible, as I did here with “apr.rating”.

TheServerSide.com - Under the Hood of J2EE Clustering

Wang Yu has a good overview article on J2EE clustering entitled Under the Hood of J2EE Clustering.

Even if you’re not a believer in Enterprise Java Beans, the discussion of how different containers handle HTTPSession failover is interesting.