Tuesday, January 30, 2007

terrible bug

well this bug at work is totally getting to me. I have been hammering on it for days and it seems to keep popping back up. it is really demoralizing because I thought I had it, and then I did an update and it f'n came back.

basically I am inventing a new way to do transactions because the original implementation put data in multiple databases. this model requires multiple session factories to be concurrently managed. not an easy task. not to mention I havent ebven started to figure out resource management.

so to make this possible i have to create my own transaction manager that intercepts the datasource id to do a lookup of the appropriate session factory to use.

I am really at wits end. I think I can figure it out, it just is so painful to hammer my head against the wall day after day.

command line mysql with sql logging

mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server 4.1\my.ini" --log="myhost.log"

The little detail is that the log command must be after the defaults file.

dont ever use classpath application context in a web application

the architect before made a pretty big mistake by using the class path application context for spring. it caused tons of problems. He created a static bean factory so anyone could just get any old bean anywhere in the code. Not only is this a problem from a cross context point of view but developers also starting making direct factory calls in the code, totally bypassing the whole dependency injection model.

generally I would recommend only using class path application context for unit tests or stand alone applications.

Saturday, January 27, 2007

The best article on integrating Spring and Struts

This article is awesome, it is probably the best article on integrating Spring and Struts I have found. Specifically i recommend recipe3.

Get a better handle on Spring