Monday September 15, 2003

Nice day for a ride. Matt Good, my old boss from eDeploy.com, is on the left.
Posted in General
at Sep 15 2003, 09:33:48 PM MDT
Add a Comment
New Powerbooks Will Steve announce new PowerBooks tomorrow? I hope so!
Apple CEO Steve Jobs is scheduled to give a keynote presentation tomorrow at 9 a.m. GMT to start off the Apple Expo in Paris, amidst rumors that he may introduce new PowerBook models.
Posted in Mac OS X at Sep 15 2003, 09:17:43 PM MDT Add a Comment
Spelling Aoccdrnig to a rscheearch at an Elingsh uinervtisy, it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is that frist and lsat ltteer is at the rghit pclae. The rset can be a toatl mses and you can sitll raed it wouthit porbelm. Tihs is bcuseae we do not raed ervey lteter by it slef but the wrod as a wlohe. Aoccdrnig to a rscheearch at an Elingsh uinervtisy. Posted in General at Sep 15 2003, 03:06:50 PM MDT 10 Comments
SSL switching with web.xml Craig McClanahan explains how to force SSL using settings in your web.xml. Pretty cool stuff, I guess I didn't realize that you could have a <security-constraint> without having an <auth-constraint>. This sure seems a lot more straight forward than using SSLExt or a custom tag library. Posted in Java at Sep 15 2003, 11:58:55 AM MDT 2 Comments
Hypersonic PC Sucks! Hypersonic PC Sucks - they charged me $165 for returning the POS Aviator ZX7. I returned it because the following items did not work: power cord, bluetooth card, wireless card. Otherwise, it was a nice machine. Hypersonic PC Sucks because they didn't refund my money until I filed an investigation with my credit card. And then they claimed there was a $100 charge for scratches on the box, and the shipping costs are non-refundable ($65). After this, they warned me:
We also reserve the right to charge a restocking fee of 15%.
Maybe this post will cause them to up-the-ante. In the meantime, I hope Amex gets me a full refund. Posted in General at Sep 15 2003, 09:02:42 AM MDT 6 Comments
Persistence Options with existing SQL At my new gig, it's not an option to use Hibernate. Their data model is too complex, and they've already written a bunch of code and it's corresponding SQL to get the information they need (think lots of inner joins, stored procedures and selects in where clauses). It was my task last week to port all the JDBC from one project to a more general framework to be used by all the websites we're building. The existing code is in the following form:
PreparedStatement pstmt =
conn.prepareStatement("select * from table where id=?");
pstmt.setInt(1, id);
ResultSet rs = pstmt.executeQuery();
MyBean bean = new MyBean();
if (rs.next) {
bean.set(...);
...
bean.set(...);
}
After doing all my persistence with Hibernate for the last year, it made me cringe to have to resort to this archaic (though tried and true) way of populating my objects. So I pinged the struts-user mailing list and asked what my options where for populating an object from a ResultSet. Basically, I was looking for a 1-2 line solution that didn't affect performance too much. After jossling back and forth for a while, I came up with 2 options:
- Use a ResultSetUtils utility class, such as the one from Ted Husted.
- Use iBATIS.
I did some performance testing and the ResultSetUtils class had the same performance numbers as rs.next() { set, set, set }, so it was definitely a viable solution. The downside? You have to name your resultset columns the same as your object's properties - and it's case sensitive. iBATIS was also a slick solution - as soon as I added <settings useBeansMetaClasses="false"/> to my sql-map-config.xml file, the performance was comparable to the ResultSet options (I turn it on when deploying, off for unit tests).
My Point: We're using iBATIS for our Persistence framework, and I dig it. It allows us to keep the complex SQL (externalized in XML files) that has already been written and it took me about a 1/2 hour to setup. I'd recommend Hibernate if you're starting a DB from scratch, but iBATIS seems to be a great solution when the SQL is already in place.
Will I add an iBATIS option to any of projects? Naahhh, then I'd have to work with Hibernate to export the SQL for each call, and I'd have to update my XML file's SQL everytime I change something in the DDL (currenly Hibernate and XDoclet perform this magic).
Posted in Java
at Sep 15 2003, 07:17:30 AM MDT
1 Comment
Search This Site
Recent Entries
- Jack's Mohawk
- LinkedIn Cuts 10% (a.k.a. The Journey is Over)
- Happy Birthday Abbie!
- Moving from Spring's XML to Annotations in AppFuse
- Free Maven Training in New Orleans on Election Day
- AppFuse Light ยป AppFuse, Maven Archetypes and Shared Web Assets
- Great Weekend in Montana
- Colorado Software Summit 2008 Wrapup
- RESTful Web Applications with Subbu Allamaraju
- Core Animation with Bill Dudney