I always find checking my code many times is no assurance that I haven't put in lots of defects ;-)
What delete statements are being executed? what is happening when they are being executed? (look hard at the log).
I have sometimes resorted to filtering the log through awk and sorting the results by thread to figure out what is going on. (see the log4j conf. file for a helpful log format).
Another possible way of investigating is to put something like this in JDBCDeleteCommand (I think that's the one)
log.warn("Delete called: ", new Exception("here's the stack trace"));
can you come up with a small self contained example?
It took some time to fix it, of course it was an error in the code :-)).
Modelling the one-to-many relationship between a customer and its contact we used a hashtable in each customer bean to save the references to its contact. This hashtable has to be cleared during ejbPassivate to ensure that a bean reused from the instance pool dont references contacts from its "previous" life, this was the problem.
The error was so hard to reproduce because an entity bean used in one special test has to be reused in annother special test.
I hope i did not cause you too much work, if so sorry.
I dont know if my previous post is lost, so to be sure i post it again.
The error was in the code, a hashtable with references to entity beans has not been cleared during ejbPassivate.
Thanks for your help