AW: [OJB-developers] [long] OJB+JBoss Performance and Problems
Brought to you by:
thma
From: Mahler T. <tho...@it...> - 2002-03-07 10:10:55
|
Hi Armin, Thanks for you interesting report! > Hi all, > <snip> > ##################### Rollback Test ######################## > In the rollback testcase we send a list of objects to store > to the server. > After > storing the objects a hard coded exception is fired before > leaving method. > We encountered a problem: > Every call to a session bean method starts a container > managed transaction > (using declarative transaction with transaction attribute required). You are right there is currently no JTA integration ! > In our testmethod we want to simulate first storing data > objects and calling > futher (e.g. sending an email) functionality. > If something goes wrong after successfully storing the data, we want > rollback the > complete transaction. And this did not work out of the box, > cause the PB > commits > the database transaction (no rollback possible). > > public void performException(List offerings) > { > store(offerings); > throw new UnexpectedError("Performed test exception"); > } > > We use our own implementation of PersistenceBroker, which implements > javax.transaction.Synchronization. This allows us to defer > the committing of > the database > transaction, after successfully committing the container transaction. > The session bean registers each instance of PB with the > current transaction > (see below) > > Has anybody a different (better :-)) solution for this problem? > I'm quite intereted in your implementation! Would you share your code? This can be interesting for many users. We definitely want to have JTA and JCA integration for OJB. Thus we interested in all contributions in this direction. Thanks, Thomas <snip> > |