From: <no...@so...> - 2002-02-20 23:41:01
|
Bugs item #520655, was opened at 2002-02-20 13:27 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=520655&group_id=22866 Category: JBossCMP Group: v3.0 Rabbit Hole Status: Closed Resolution: Invalid Priority: 5 Submitted By: Jason Robertson (jrslim) Assigned to: Andreas Schaefer (schaefera) Summary: Trans-Attrib 'Supports' Fails in Entity Initial Comment: I have an entity bean that I labeled with: <trans-attribute>Supports</trans-attribute> When I access the bean from a test case (and thus there is no transaction), I get a NullPointerException in JDBCStoreManager.getApplicationTxDataMap(). This is happening because the first thing that happens in this function is this call: Transaction tx = tm.getTransaction() which returns null. A moment later, because there is no existing map, this line is executed: tx.registerSynchronization(synch); and that's all she wrote. I'd submit a patch, but I don't have any clue how anything outside this method works! :) Changing the trans-attribute to Requires is a work around. ---------------------------------------------------------------------- >Comment By: Jason Robertson (jrslim) Date: 2002-02-20 15:40 Message: Logged In: YES user_id=464997 Point taken, I did actually come across this information in searching for a resolution. My comment about setting it to Requires being a "workaround" was forgetful on my part. But, a NullPointerException is still being thrown. Perhaps the EJB verifier should catch this and not allow the bean to deploy, but trapping this error would certainly be an improvement. ---------------------------------------------------------------------- Comment By: Andreas Schaefer (schaefera) Date: 2002-02-20 15:33 Message: Logged In: YES user_id=70434 Please read the EJB-2.0 spec. on chapter 17.4.1 stating that a Entity Bean using EJB 2.0 Container-Managed Peristance that "Supports", "NotSupported" and "Never" is not allowed ! Andy ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=520655&group_id=22866 |