Currently, in AbstractEntityManagerImpl.find(), if a runtime exception is caught, a javax.persistence.PersistenceException is thrown. Should we continue to throw an exception or should we instead just return null?
The following call stack shows where we throw the exception from:
{quote} at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1761)[javatest.batch] 07:35:50,888 INFO [stdout] (Thread-182) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1692)[javatest.batch] 07:35:50,889 INFO [stdout] (Thread-182) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:1144)[javatest.batch] 07:35:50,889 INFO [stdout] (Thread-182) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:1077)[javatest.batch] 07:35:50,889 INFO [stdout] (Thread-182) at com.sun.ts.tests.jpa.core.callback.common.EntityCallbackClientBase.txShouldRollback(EntityCallbackClientBase.java:46)[javatest.batch] 07:35:50,890 INFO [stdout] (Thread-182) {quote}
|