Archive

Archive for October, 2006

Wicket 1.2.3 Released

October 30th, 2006

Congrats to the Wicket team for releasing 1.2.3! This release falls outside of the Apache incubator. The 1.2.3 release has the following new features:

  • Added method protected void onDisabled(final ComponentTag tag) to
    FormComponent, which is called during rendering when the component is
    disabled. By default, an disabled=”disabled” attribute is added, but
    clients may override this method.
  • Made synchronization timeout configurable on an application level.
    Later, we might add more fine grained control.
  • Implemented optional interface for initializers: IDestroyer that may
    be implemented by initializers to clear up stuff when the application
    is shut down. Wicket’s JMX code uses this to clean up the JMX beans it
    registered on application shutdown.
  • Wicket now has JMX support. For 1.2 as a separate project
    (wicket-jmx), for 2.0 as part of the core distribution.
  • The application’s configuration type is now kept in a member which
    can be read using Application#getConfigurationType.
  • Added AbortWithWebError abort exception.
  • Bookmarkable page links set the target attribute to the proper page
    map when a page map is set and when the tag has a target attribute.

Various bugs have also been fixed, including a few for the AJAX support. You can obtain the latest distribution from the usual locations.

nick Entry

New Digs

October 30th, 2006

After just over two years at my West Bucktown office, it was time to relocate to a slightly more hospitable location. I settled on an office in Chicago’s Lakeview neighborhood, in a newly renovated loft building. The location is ideal with easy access to the El and downtown only a short ride away, with the nearest Starbucks right across the street.

I’m excited about this new location. With the amount of work I’ve sold for the foreseeable future, having a good office will be essential.

Speaking of work, I’m currently looking for part-time contractors or employees in the Chicagoland area to help with some of the projects I’m working on. I’m primarily looking for junior programmers interested in learning more about Java web application development. If you’re interested in learning more, please fill out the contact form on the left.

nick Entry

Follow-up on Hibernate 3.2.0 and Count(*)

October 25th, 2006

I got an email from Max regarding my eariler post about Hibernate 3.2.0 and count(*) queries. Apparently I missed this, and that it was documented in the changelog:

* [HHH-1538] - aggregations functions in EJBQL queries
   does not return the appropriate types

Hope this clears things up.

nick Entry

Hibernate 3.2.0 Breaks Count(*)

October 24th, 2006

Sometime between Hibernate’s 3.2 CR1 and GA, the following change was made:

STANDARD_AGGREGATE_FUNCTIONS.put( "count",
    new StandardSQLFunction("count") {
  public Type getReturnType(Type columnType, Mapping mapping) {
    return Hibernate.INTEGER;
  }
} );  

STANDARD_AGGREGATE_FUNCTIONS.put( "count",
    new StandardSQLFunction("count") {
  public Type getReturnType(Type columnType, Mapping mapping) {
    return Hibernate.LONG;
  }
} );

This effectively breaks all of the “count(*)” queries out there. There isn’t a note about this in the changelog that shipped with the 3.2.0GA release. Any ideas as to why this was changed?

It’s easily managed by creating a custom dialect, but should that really be necessary?

nick Entry

Another Wicket project in the books

October 22nd, 2006

I was able to turn around a project with some fairly complex forms and email functionality in just under a week using Wicket, Spring and Hibernate. For email I used Jakarta’s Commons-Email package.

Mosiac

A number of the forms had similar fields or groups of fields, so it was rather easy to implement using Wicket’s markup inheritance.

nick Entry

TestNG Hanging on Suites

October 22nd, 2006

Lately, my TestNG suites have been either hanging or running out of memory when running them from the command-line or within IDEA. Fixing the out of memory exception was more complicated than simply allocating more memory to the JVM. I’m using testng-spring to get Spring-injected beans into the test classes, and it seemed that Spring’s context file was getting reloaded for each test class. Normally, this might not be a problem but when you add in the Hibernate and Velocity initialization, it’s easy to see why I was running out of memory. A simple fix to my project’s base test class fixed it:

@Override
protected ConfigurableApplicationContext loadContext(Object key) {
    return new ClassPathXmlApplicationContext((String)key);
}

Thanks to Justin for figuring this out. Once the OOME was fixed, the tests just started hanging. This fix turned out to be another change to the base test class:

@AfterTest
protected void closeSession() {
    sessionFactory.getCurrentSession().close();
}

With the Hibernate sessions getting closed after each test, my tests no longer hang.

nick Entry

MySQL Tools Annoyances

October 16th, 2006

Last week I ran into somebody from MySQL at an event and asked about the MySQL tools. In the past they’ve been fairly crashy on OSX and I was curious about any updates.

After learning that new versions were available and all tools were now available as a single download, I upgraded and started using the new tools. While most of the crash problems have been fixed, the Query Browser still needs a lot of work:

  • I was unable to run a script on a remote database. The (useless) error message I got was: “Error: Commands out of sync; you can’t run this command now.” Well, why can’t I? The script runs just fine from the command line. I’d be fine getting this error when using the console, but I expect GUI applications to be a little more forthcoming with information.
  • I started my MySQL tool session with the MySQL Administrator, then needed to open the Query Browser separately. If the tools are going to be a single download, they should at least be slightly integrated so that I can, for instance, launch Query Browser from Administrator.
  • The text area in the Query Browser still can’t be resized, at least on OSX.

I really like the MySQL Tools suite, but I’m hoping they’ll put more polish on it, and soon.

Ah, one last thing. Prior to the new bundle download, it was easy to figure out how to actually download the tools. Now you have to hunt around for quite a while to find the download link.

nick Entry