I have 4 entities, several instances of which are inserted into an in-process Derby database (running in a Java SE environment), but the CRUD sys outs never get called. I do get 4 constructor sys outs, however.
Also, if I move the block of <entity-listener> XML into a section for any specific entity (under <entity class="...">), I do see all the CRUD sysouts for that entity.
I am thinking that the default entity listeners should be invoked on each and every entity registered into the persistence unit by default with the above XML and listener class. But I am new to JPA, so perhaps I have missed something here ?
Thanks for taking a look at this James. I have logged it as a bug, Bug 315154.
Am more than a little surprised that this bug exists as its reproducible with little more than 20 lines of code. I would have thought this might also be something that a lot of people would want to implement, (application wide logging and debugging listeners etc).
Its also drawn from code out of Antonio Goncalves book JavaEE6 with Glassfish (chap 05) which I am making my way through. I would have thought there'd be a lot of readers who'd also come across it because of this too.
Thanks for sharing this bug. I have also encountered exactly the same problem, and couldn't figure out what's wrong. its not that surprising by the way, I have encountered some more problems and compilation errors when trying to follow this Antonio Goncalves's book...