Why should the entity bean send its data to the database before the end of the transaction? It shouldn't, unless the cmp framework can detect that it might try to reread that changed data. Any time you want to look at the data in the entity bean, use that entity bean.
Otherwise you need to find a way to flush ALL the changed data in the transaction to the db before you make your jdbc calls. Calling a finder does this, so does removing an entity. There's something called GlobalTxEntityMap that basically manages this. If you __really__ need to be able to have this functionality from your application you could make it into an mbean and call it through the jmx layer. david jencks On 2002.09.02 20:40:53 -0400 Saroj Kumar wrote: > Hi, > > I am puzzled by this sequence of events. Any hint?? > > I am having a session bean which is running under transaction. It calls > a > JAVA Class. This java class makes 1st call to a Session Bean. This > session > bean B invokes method on a Entity Bean. Then it invokes another Session > > Bean C which makes Direct JDBC calls to DB for the data updated by > Session B > using Entity Bean. All this happens in one method which by the virtue of > being > Invoked by a Session bean which is under a transaction also participates > in TX. > > PROBLEM: JDBC calls show that there is no data INSERTED in earlier call > to Session > Bean B. SELECT for the inserted data does not return any row. It is as > if no insert is > Working. > > Scenario is : > > Session Bean A ---> Java Class -- Session Bean B --- Entity Bean EB1 , > EB2 > +-- Session Bean C --- jdbc > call > > PUZZLE: > I added some EJB finders on my CMP using ejb-ql and get the > correct data in the same > Method. Once this finder is called then all JDBC calls show correct > result. > > Please note that Session Bean c gets its own SQLConnection from > javax.sql.DataSource. > > Why is it so? I think that even if Session Bean C gets its own > connection, it should be > Part of TX started in Session Bean A and should return correct result > for all the updates/INSERT > By Session Bean B. > > Please help. > > TIA, > Saroj > > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
