Actually, it is not a bug. The CMP 2.0 spec only requires that a CMP entity bean only support Required, Requires New and Mandatory. It really suggests that the others not be supported, although it allows for it.
The problem is a relationships require the coordination of two distinct containers, and you can really perform this coordination without a transaction. The newest code does work without a transaction, but I do not suggest or support such a configuration. CMR collections are useless without a transaction because the EJB spec requires that a CMR collection is only valid within the transaction context in which it was originally materialized. This means that you can get a CMR collection but you can't use it, because you have not transaction. I have been slowly adding more support for running without a transaction, but it is a very low priority. The overhead of a transaction in JBoss is very small. The cost people usually associate with a transaction is the cost of locking which is independent of transactions. -dain marc fleury wrote: > I'll second that, it is a bug... > > marcf > > >>-----Original Message----- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED]] On >>Behalf Of [EMAIL PROTECTED] >>Sent: Tuesday, July 09, 2002 12:19 PM >>To: [EMAIL PROTECTED] >>Subject: [JBoss-dev] [ jboss-Bugs-568439 ] Cannot access >>entity outside of tx >> >> >>Bugs item #568439, was opened at 2002-06-13 02:24 >>You can respond by visiting: >>https://sourceforge.net/tracker/?func=detail&atid=376685&aid=5 >>68439&group_id=22866 >> >>Category: JBossCMP >>Group: v3.0 Rabbit Hole >>Status: Closed >>Resolution: Invalid >>Priority: 5 >>Submitted By: Jeff Schnitzer (lhoriman) >>Assigned to: Dain Sundstrom (dsundstrom) >>Summary: Cannot access entity outside of tx >> >>Initial Comment: >>It appears that any access of a standard CMP entity bean outside of >>a transaction results in an exception. >> >>My specific example >>is a trivial entity bean with local interfaces and the "Supports" >>transaction attrbibute. When I try to call a simple getter, >>I get "Error >>getting application tx data map" because of this >>exception: >> >>2002-06-13 02:19:08,973 ERROR >>[org.jboss.ejb.plugins.LogInterceptor] >>TransactionRolledbackException, >>causedBy: >>java.lang.NullPointerException >> at >>org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.getApplication >>TxDataMap(JDBCStoreManager.java:215) >> at >>org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.getApplication >>TxData(JDBCStoreManager.java:243) >> at >>org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.getEntityTxDat >>aMap(JDBCStoreManager.java:271) >> at >>org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.getEntityTxDat >>a(JDBCStoreManager.java:282) >> at >>org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.getPreloadDataMa >>p(ReadAheadCache.java:399) >> at >>org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.load(ReadAheadCa >>che.java:220) >> at >>org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(J >>DBCLoadEntityCommand.java:76) >> at >>org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(J >>DBCLoadEntityCommand.java:62) >> at >>org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDB >>CStoreManager.java:495) >> at >>org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPers >>istenceManager.java:410) >> at >>org.jboss.resource.connectionmanager.CachedConnectionIntercept >>or.loadEntity(CachedConnectionInterceptor.java:353) >> at >>org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke( > > EntitySynchronizationInterceptor.java:310) > >> at >>org.jboss.resource.connectionmanager.CachedConnectionIntercept >>or.invoke(CachedConnectionInterceptor.java:186) >> at >>org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityI >>nstanceInterceptor.java:193) >> at >>org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockI >>nterceptor.java:107) >> at >>org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityC >>reationInterceptor.java:69) >> at >>org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(Abstrac >>tTxInterceptor.java:96) >> at >>org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxI >>nterceptorCMT.java:219) >> at >>org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT >>.java:61) >> at >>org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInter >>ceptor.java:129) >> at >>org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166) >> at >>org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:493) >> at >>org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(B > > aseLocalContainerInvoker.java:296) > >> at >>org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38) >> at >>$Proxy36.getFoo(Unknown Source) >> >> >>I can provide a >>test case, but it apperars that *any* access to an entity bean >>outside of a transaction causes this problem. >> >>---------------------------------------------------------------------- >> >>Comment By: Nobody/Anonymous (nobody) >>Date: 2002-07-09 09:18 >> >>Message: >>Logged In: NO >> >>So this is NOT a bug ? This means that "NEVER" transaction >>policy will not work in Jboss ? >> >>---------------------------------------------------------------------- >> >>Comment By: Dain Sundstrom (dsundstrom) >>Date: 2002-06-13 14:01 >> >>Message: >>Logged In: YES >>user_id=251431 >> >>The EJB specification does not require that a persistence >>engine support access to CMP 2.0 entities without a >>transaction. >> >>---------------------------------------------------------------------- >> >>You can respond by visiting: >>https://sourceforge.net/tracker/?func=detail&atid=376685&aid=5 > > 68439&group_id=22866 > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Stuff, things, and much much more. > http://thinkgeek.com/sf _______________________________________________ > Jboss-development mailing list [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-development -- xxxxxxxxxxxxxxxxxxxxxxxx Dain Sundstrom Chief Architect JBossCMP JBoss Group, LLC xxxxxxxxxxxxxxxxxxxxxxxx ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Stuff, things, and much much more. http://thinkgeek.com/sf _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
