Skip to main content

Blog Archive for joconner during March 2007

I know it's Friday, quitting time even, but I have to share one more thing before the weekend. I've been researching the Java Persistence API (JPA) for an article next month. The persistence API is part of the EJB 3.0 spec. The JPA portion alone is over 250 pages of bone dry annotations, query language, and apis. But I got my very first example working today...saving several instances of a class...
The Java SE 6 release provides an interesting new class: java.net.IDN. It's small, simple...very focused on a single task. That task has two parts: to convert domain names from practically any Unicode character to an ASCII Compatible Encoding or ACE. to convert ACE names back into their full Unicode UTF-16 encoding To support these two operations, not surprisingly, the class has two static...
Storing localized resources for your Java applications usually means creating a .properties file or a ResourceBundle subclass. You don't usually have a lot of control over how the resources are cached or how they're stored. Here's an example. The enforced caching of resources was a common complaint for server applications. Can you imagine your app being up for 299 straight days without a hitch...
Java SE 6 provides new i18n support in 6 major areas. It's way too much for the standard blog entry, but you can read the full-length article International Enhancements in Java SE 6 to find out how you benefit from these: resource control and access -- you get more control over how resource bundles are loaded, their file formats, etc locale-sensitive services -- add your own locale info, or...
The 2007 JavaOne Conference is right around the corner, May 8 - 11. JavaOne is the largest Java technology conference of the year. Drop the excuses, you have to be there. Regular attendees know that you have to plan things in advance. The number of sessions, the huge crowd, and all the show floor distractions practically require you to plan ahead. So, I'm making a top 10 list of "Desktop" track...
US daylight saving time (DST) changes took effect this weekend. Were you ready? Did you know? If not, you may still need to read up on the problem. If you haven't updated your server software or the JRE in a while, you might consider that as well. For more information on the DST changes and how they affect your systems, check out this summary page: Effects of 2007 Daylight Saving Time Changes on...
Earlier I mentioned that many of the Date constructors and methods are deprecated. You shouldn't use them. Someone immediately wondered how they were supposed to find out what the date actually meant...what year is it? month? day? If you can't ask the date object directly, what should you do? The answer comes from the java.util.Calendar class. Use a Calendar to create a specific date from year,...
The java.util.Date represents a snapshot of time, independent of locale, timezones, etc. It does that pretty well. However, the little class got overworked early in its career. The ability to set years, dates, and months got tossed in, and formatting abilities, and...something that should have been really lightweight became overweight, or maybe we should just say big boned. Almost immediately,...
In general, calendars are not easy to understand, develop, or to use. They are complex, created out of the need to understand and put order into celestial movements, seasons, religious events, and political decisions. It's a wonder that we stay on schedule for anything, and yet we do, and the world moves on, and we still are able to use the Java platform's Calendar and Date classes to properly...