Update: I tried running the application on JBoss 3.2.6, but the same problem persists.
What have you changed in the container/bean configurations?
The problem ended up being my own fault (of course), as it usually does :)
The problem was that we had created our MSSQLServer tables manually, as our application is already deployed to multiple clients and we can't depend on the container to re-create tables from scratch every time.
Our entity primary keys are all character string based, usually 32 characters. In this one instance we had manually inserted a row into the database with primary key 'ROOT'. However, we had defined the column as char(32), which mean that SQLServer padded the rest of that particular record with whitespace.
That whitespace was what ultimately was causing our problems. The strange thing is that
xHome.findByPrimaryKey("ROOT") found the entity successfully when actually its primary key was "ROOT (+ 28 space characters)".
Is that part of the specification that I had not understood previously? I would think that it should throw a FinderException in this case.
That's a feature of the database/driver. You can try it yourself with JDBC.
You're right alex. Thanks.