October 12, 2005

Changing spaces

Today is my last day at Company M. I am taking a week or so off to relax, knit and work on the 3 opensource projects I am committed to. Sometimes I wonder how I managed to persuade myself that I could actually work on 3 projects in my copious spare time. Especially seeing that my pair programmer for the big one just moved across the country from me. But, that isn't what I am blogging about.

What I am blogging about is Maven2. I am one of those fanatic maven haters. It bit me in the ass when I first started here, and I (with company blessing) took all the code OUT of maven. Actually, there are pieces of maven I like, mostly the war and jar plugins. But, they aren't worth the maven workaround.

I am a software nazi. I believe in a standard build structure. Unfortunately, my standard build structure is not the same as maven2's standard build structure. m2 has a tree that starts as src/target (fine so far). But src then splits into main and test. Then both of these break into java and resources. It just lost me there. I think that the use of main adds complexity. Mine starts as src/test. They both then split into java and config. I could rename config, but I think that it is actually more descriptive than resources, which has a very specific meaning in java. Both are perfectly acceptable build structures, but I don't want to user the main style build. I could (and might) change my build to mirror the m2 build, but I am still not sure how well it would work.

I am also still working on adding a ruby on rails project inside a project.


What I loved maven for was the ability to pull jars/poms from ibiblio. I am going to look at ivy next week and see if it will work to pull my dependency tree instead. If it does as good a job (or better) than m2, I will stop thinking about m2.

BTW, one of the things I HATE about m2 is that it STOPS pulling all the dependencies and chokes the minute it needs to use a sun library.

Posted by liz at 11:29 AM | Comments (0) | TrackBack

October 07, 2005

New Company

I just signed an offer letter from another consulting company. I know some of the people in the new team, but I really have no idea what sort of project I will be on. I do know that the new company has redesigned their teams around Agile processes.

This happens at just the right time. My main quickstart is well tested, I start the administration piece of the authorization software today. The company I am working for has no projects that fit me well. I am not sure if they have ever bought into OO, much the less java, .NET or agile processes. My beloved manager has moved to a new job in a big (non-consulting) company that will be perfect for him.

Bill (the manager) and I will continue working on the quickstarts, and the business objects that started this whole mess. They will be opensource. First release (probably just the quickstarts, the common jar and the authorization code should be ready to roll by November.

Posted by liz at 09:28 AM | Comments (0) | TrackBack

September 29, 2005

Embedded Firebird and the new Spring testing classes

I have moved all of my Spring Dao tests from a roll your own test framework to one that is based on spring's
AbstractTransactionalDataSourceSpringContextTests
(a classname that is just too damn long and I will never remember). These tests (and some others) are in the spring-mocks package. Really nice except for a few issues I am learning to deal with (mostly the fact that transactions are never committed unless you force the issue). No problem with the sanity tests, so I decided to try the authorizationDao from some classes that are getting major refactoring).

This dao needs a lot of data to be in the database (this is the project that is going to use ruby on rails to fill the database). I (like most people) have used dbunit to put this data in. Part of setup. Well, setup and onSetup are final for this test - so I moved the dbunit setup (which had been in a static initializer) to onSetUpBeforeTransaction. All of a sudden my tests were not failing - they were going into some weird state and I had to kill eclipse in order to close the database. But, as soon as I moved the database to local (from embedded) everything went just fine.

I think that we had deadlock on the embedded firebird. My cure for this now (other than giving up on the spring class and rolling my own which would happily use dbunit) is to stop using embedded firebird and call through local. I still might roll my own, but it depends a lot on what else has to be done in the next two weeks.

Posted by liz at 01:36 PM | Comments (0) | TrackBack

September 23, 2005

Firebird and spring jdbc

If you want to do anything real with firebird and spring jdbc you need to know your id. There are incrementer classes in the spring framework for a few databases, but none for firebird.

Here is one for firebird. Thanks to Roman who seems to be in charge of firebird-java for giving me the sql.


import javax.sql.DataSource;
import org.springframework.jdbc.support.incrementer.OracleSequenceMaxValueIncrementer;

public class FirebirdSequenceMaxValueIncrementer extends
OracleSequenceMaxValueIncrementer
{
/**
*
*/
public FirebirdSequenceMaxValueIncrementer()
{
super();

}

/**
* Convenience constructor.
* @param ds the DataSource to use
* @param incrementerName the name of the sequence to use
*/
public FirebirdSequenceMaxValueIncrementer(DataSource ds, String incrementerName) {
super(ds,incrementerName);
}

public FirebirdSequenceMaxValueIncrementer(String incrementerName)
{
super();
setIncrementerName(incrementerName);
}

protected String getSequenceQuery()
{
return "SELECT gen_id(" + getIncrementerName() + ",1) FROM rdb$database";
}

}

Posted by liz at 09:13 AM | Comments (0) | TrackBack

September 22, 2005

Sample program

I got my sample build working the way I want to (actually this is the build for the common libraries - but it works well as a teaching device). I have examples (in the sanity tests) for simple tables and parent/child tables using Spring/hibernate. I am now working on building the same samples (same tests) using spring/jdbc. I am not even considering having people not use spring. While I don't think it solves all problems, it solves enough to keep me happy.

After I finish the jdbc examples I have to decide whether to do the same for jdo and ibatis.

Honestly, I don't think anybody in the company will ever use these, but it doesn't hurt and keeps me busy. As long as I look busy, I will probably keep this job.

Still not sure about jdo and ibatis though. This is turning into an awful lot of work.

Posted by liz at 12:27 PM | Comments (0) | TrackBack

September 17, 2005

database or no database?

I just finished the no database build environment. mg asked me why anybody would ever want to use it? I am now wondering this myself. I am not sure that any build environment should not include a test database (preferably embedded).

Any opinions on this?

Posted by liz at 04:06 PM | Comments (0) | TrackBack

September 14, 2005

Ant

I hate ant, I hate it with a passion, but I still like it more than I like maven. At least is ant is stable for some version of stable. Maven will have major changes while I am still trying to get a project out the door.

Right now I am trying to get ant and hibernate playing together. I am a newcomer to hibernate 3 (I hated hibernate 2 and used it daily). I think I am a reasonably intelligent person. So, tell me, why can't I get the reverse engineering task working in less than an hour? I not only need to get it working, I then need to document how/why/when on it. Let me tell you, the information on the web is very sparse for hibernate 3 tools. And, of course, nobody has come out with a decent book on hibernate 3. I have no idea if any are even planned.

Makes me think more and more of just going with straight spring/jdbc. Wouldn't have to teach one more framework. Wouldn't have to tear my hair out. Wouldn't have to document the how and why of hibernate tools.

Of course, I have also realized that I need to write a short, humorous, and factual manual on how to use ant. And why it will make your life easier and keep your manager from strangling you. I don't want to go into the api, I don't want to teach people how to write tasks. I just want to explain how to get hibernate working and how to build/deploy a war file.

Damn, I wish there was a decent book on hibernate 3. Or even on ant.

Posted by liz at 01:27 PM | Comments (0) | TrackBack

September 13, 2005

Breathless anticipation

I have decided to pull the mckoi stuff out of my standard build.

Why you ask?


  1. Mckoi doesn't have triggers.
  2. Mckoi doesn't have anything like isql.
  3. Mckoi doesn't have (ugh) stored procedures.
  4. The firebird driver for 1.4 is satisfactory.
  5. The sql problem is an ant problem, and if mckoi DID have triggers and stored procedures, I wouldn't be able to deal with them due to 2.
  6. As far as I can tell, all development on mckoi has stopped, while firebird has a decent user community.
  7. Embedded firebird is NOT single user.

Eventually, I will have to put an oracle build in, but that will wait until I have a decent oracle to connect to (I am doing most of my development at work - and - believe it or not, I am not on the company network).

Posted by liz at 09:45 AM | Comments (0) | TrackBack

September 12, 2005

The ant task is finished

The ant sql is just too stupid to build triggers (in either firebird or oracle). One of these days I will look at the code and play with it - but not this week.

I am now creating my schema with isql, but loading my data with sql. Sloppy but works.

Next thing on my plate is talking to the firebird-rails person about using a hibernate sequence instead of a seperate sequence for each table.

Posted by liz at 03:50 PM | Comments (0) | TrackBack