I have a table in mySQL which does auto_increment
I have a customer EJB which works with this: in the
ejbCreate() method I do not call setId(). The row is created, everything is fine.
However, in testing I have found that if I do not call setId() within the ejbCreate() method (not called because the id column is auto_increment), the following code:
CustomerRemote customer = (CustomerRemote)home.create();
customer.remove();
throws an error:
java.lang.IllegalArgumentException: Attempt to get lock ref with a null object
The error is thrown when remove() is called.
If the Bean is modified to take an Integer id and setId() called:
CustomerRemote customer = (CustomerRemote)home.create( new Integer(11) );
customer.remove();
then the code works?
This seems like a bug to me, but, being new to EJB's and JBoss this could be me - hence the subject line :-)
Any help appreciated.
Kind regards,
--
Marc