-
1. Re: approaches to disabling tx commits (for testing, including in the real container)
gonorrhea May 16, 2009 5:58 AM (in response to jeanluc)I haven't heard of such a thing in the
Seam space
, however, have you considered using H2 or HSQLDB for testing? Then you don't need to worry about blocking the tx commits if your db is in-process and not persisted to disk... The Seam example apps are all designed/implemented this way. -
2. Re: approaches to disabling tx commits (for testing, including in the real container)
jeanluc May 16, 2009 6:25 AM (in response to jeanluc)I know but I'd like to use the real database for a number of reasons (level of trust in a successful test, ability to use it with a realistic amount of data, such as millions of rows or more and so on). For instance, if the tests don't commit anything, I can start the tests on a preloaded database with a known state.
I think it boils down to being able to intercept the tx calls made by JBossTransactionManager when the app is deployed normally in JBoss. I'm not yet sure if the right place to do that is somewhere in the Hibernate land (perhaps an interceptor would work) or higher in the call chain, at the level of the container or container-managed tx manager.
Perhaps it's not that much of a Seam issue per-se, as all transactions still go through JTA...
-
3. Re: approaches to disabling tx commits (for testing, including in the real container)
gonorrhea May 16, 2009 4:55 PM (in response to jeanluc)
Jean Luc wrote on May 16, 2009 06:25:
Perhaps it's not that much of a Seam issue per-se, as all transactions still go through JTA...This is an advanced topic and perhaps you should post this in the EJB3 and/or transactions forum of jBoss.org forums. Mark Little may be the guy to help you (he is apparently the CTO of JBoss according to his blog site below, but responds to the tx forums)...
http://markclittle.blogspot.com/
http://www.jboss.org/index.html?module=bb&op=viewforum&f=240&topicDays=0&start=0
Otherwise, post in Hibernate forum.
This is one of the problems with the Seam/JBoss stack, where do you even start to look for answers? (which forum!)
-
4. Re: approaches to disabling tx commits (for testing, including in the real container)
gonorrhea May 16, 2009 4:59 PM (in response to jeanluc)Mark Little is co-author of this book:
I have it and it's a pretty decent book. Not sure if it has your answer but check it out, good reviews. Mark was chief architect of Arjuna Technologies that I believe JBoss purchased and uses for their JTA implementation technology.
I believe Sacha LaBourey is now JBoss CTO.
-
5. Re: approaches to disabling tx commits (for testing, including in the real container)
gonorrhea May 16, 2009 5:04 PM (in response to jeanluc)Actually, perhaps you can achieve your objective by using BMP instead of CMP. Programmatically beginning and (not) committing your tx's instead of declaratively
guiding
the EJB container to do it for you via CMP.However, CMP is typically recommended over BMP and is less coding as well.
You need to read JSR220-core to see if the spec even handles this and offers a solution, unless Hibernate offers a solution. Typically with JEE apps and Seam, we use JTA (esp. if 2PC/XA is required) and CMP. I know that Hibernate offers tx management as well but I'm not sure how popular that is with Seam JEE apps...
This is a very interesting problem you have brought up. Plz post any solution you may find!
-
6. Re: approaches to disabling tx commits (for testing, including in the real container)
gonorrhea May 16, 2009 9:25 PM (in response to jeanluc)
Arbi Sookazian wrote on May 16, 2009 16:59:
I believe Sacha LaBourey is now JBoss CTO.Whoops! LaBourey is out! Mark Little is taking over as CTO. Pretty recent news I was unaware of:
http://triangle.bizjournals.com/triangle/stories/2009/03/30/daily12.html
Marc Fleury (creater and ex-CTO of JBoss) left JBoss on 9 February 2007.
Hmmmmm. What's going on in here???