Hi Guido, > Hello, > > I'm running OJB RC4 inside of JBoss 3.2.2RC3. > I always use ODMG interface. > > I've got a scenario where I insert data with and select them within the > same transaction context again. > OJB does not find the inserted data, because the inserts are done when > the complete transaction is > committed. I thought to solve the problem by putting all OJB stuff into > a new stateless session bean > and set the transaction context to requires new. I created one call for > inserting and another for selecting > the data and set the the trans-attribute at the assembly -descriptor to > requires new for each call. > So a new transaction should be created and my inserts should be > performed after leaving (and so committing) > the insert method of the OJB EJB. > This didn't work. The insert statements are still done after the commit > of the first initial transaction context commit > and not at the second internal transaction of the OJB EJB. > Is it a JBoss problem or does OJB get the wrong transaction at the > getCurrentTransaction call? >
hmm, if second bean run within the same thread then 'getCurrentTransaction' is the problem. If you set logging level to 'debug' for OJBJ2EE_2.java you should get a message like "obtain new intern odmg-transaction" when your second bean was called. regards, Armin > best regards, > > Guido > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
