On line 5 in your code you have the TransactionAttributeType as REQUIRE
D_NEW, I think the value your looking for is REQUIRE
S_NEW. I'm not sure if that would mess with the compilation of your code or not, but if it's running, your transaction could be defaulting to REQUIRED if the dodgy annotation is ignored (I'm not 100% sure what happens in that scenario).
If that's the case, and your doStuff() method is called from an existing transaction (e.g. called from another
EJB bean), then is it possible your entity won't be persisted until the enclosing transaction commits?
That sound logical to anyone?