Archive

Archive for November, 2003

New Release - XDoclet Support for Struts DynaForms

November 20th, 2003

Update I failed to push the correct bundle up to the webserver. This has been corrected. Please download the distribution again. Sorry for the inconvenience.

I’ve just finished the second version of the XDoclet extension to support generating Struts DynaForm configs. The fully documented bundle can be found at:
http://www.systemmobile.com/code/xdoclet-apache-module-sm-1_2b4.zip

Changes since the last release:

  • The only thing needed to specify a form-property element is
    @struts.dynaform-field. Everything else can be determined from the
    getter method.

  • Superclasses are now checked for method-level tags. Handy for
    defining forms throughout an object hierarchy.

  • You can now have multiple @struts.dynaform-field tags per method.
    Useful if you need to have an object property presented as multiple
    fields in the form. (I use this for dates sometimes.)

  • The ’size’ attribute for form-property tags is now supported.
  • I think I fixed a bug with name collision when generating of forms
    from an object hierarchy.

nick Uncategorized

Struts Indexed Form Properties

November 20th, 2003

After beating my head against indexed form properties with Struts for a day and finding the fairly useless documentation, I stumbled across this article. It clearly explained how to make use of indexed form properties.

This underscores a continuing problem that I have with Struts documentation, in particular the validator - lack of examples. I would like to see a documentation system for Struts like that found at php.net, in which users can post comments on each section of documentation. Struts has a wiki, but it’s not heavily used, so it would be nice if the docs system crosslinked to it.

Maybe I’ll build it after I move. I’m really getting irritated by this.

nick Uncategorized

Querying on Collection Properties

November 17th, 2003

I didn’t realize until yesterday that the ‘elements()’ HQL function had been deprecated in the FROM clause in Hibernate 2.x. It’s been replaced with shorthand join notation like the following:

select s.id from Staff s join s.departments as depts where depts.id=? order by s.lastName

The above query will return all staff members for a given department. I’m currently doing research for an article on HQL, which is how I ran across this little nugget.

nick Uncategorized

My First Impression of Eclipse

November 16th, 2003

I have to admit that I don’t see what the fuss is over Eclipse. I’ve been using it for the past few weeks, and it’s simply not that good. After running it on Windows 2000, XP, and Linux, and dealing with frequent crashes and configuration problems, I gave up and went back to XEmacs and JDE.

Oh, and there’s the whole thing about not needing/wanting to run X just to do development. It’s kinda nice to be able to ssh into a box and have your full development environment available from a console.

IDEs aren’t for everyone, and I guess that I’m one of those people.

nick Uncategorized

The Moral Hazard At Gartner

November 10th, 2003

Last week, Information Week ran an article discussing the recent VC purchase of approximately 38% of Gartner Group’s outstanding shares. Ordinarily, this wouldn’t make news, except that the VC firm is a company called Silver Lake Partners, and has limited partners such as Bill Gates, Larry Ellison, and Michael Dell, among other technology leaders. What does this mean for Gartner and the research that they provide?

The analysis that Gartner provides is often looked upon as gospel, and the impartiality of their research is critical. Of course, Gartner claims that this acquisition will not cause them to fall victim to this clear moral hazard. Given the current climate of corporate mistrust, can Gartner really afford to make this gamble, even if they take every available precaution? Probably not. Even the possibility of potential corruption is looked upon as a conviction in the court of public opinion.

Gartner has not exactly been forthcoming, but they should be. Ignoring a moral hazard doesn’t make it go away.

nick Uncategorized

Selecting Objects By Class

November 4th, 2003

A problem that I ran into recently with HQL (Hibernate Query Language) is selecting only instances of a given superclass while omitting the subclasses. If you have a class called Employee with a subclass named Supervisor and you only want to select Employees while omitting instances of Supervisor, you need to use the ‘class’ attribute in the HQL string:

from Employee e where e.class = com.example.Employee

I suppose that it’s also possible to use the discriminator-value defined in the mapping file, but the above method works and I was able to determine it first. Do you know of any other methods to accomplish this with Hibernate?

nick Uncategorized

Disabling Tomcat Session Serialization

November 1st, 2003

Sometimes Tomcat can be rather annoying when it comes to serializing HttpSessions when the server is shutdown. These same sessions are then loaded when the server restarts. In some cases, this might be handy. In others, like development, it can be very frustrating. To disable it, you need to add some tags to the server.xml file for a given Context:

<Context path="/events" docBase="/home/nick/projects/events/events.war" debug="4" reloadable="true">
  <Manager className="org.apache.catalina.session.PersistentManager" saveOnRestart="false"/>
</Context>

And that’s it.

nick Uncategorized