This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes How do I mock the JBoss 7 JTA transaction manager in JUnit? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "How do I mock the JBoss 7 JTA transaction manager in JUnit?" Watch "How do I mock the JBoss 7 JTA transaction manager in JUnit?" New topic
Author

How do I mock the JBoss 7 JTA transaction manager in JUnit?

Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
Hi,

I'm building a WAR using Spring 3.1.1.RELEASE, Hibernate 4.1.0.Final, JPA 2.0, and deploying to JBoss 7.1.1.Final. I'm noticing some errors that occur in my JBoss environment that don't occur in my unit tests and I want to eliminate a couple of factors. Is there a way to mock the JBoss transaction manager when running Spring JUnit tests? I use this application context when I deploy my application:



but in my JUnit environment, I use a different context:



I would like my tests to mirror as closely as possible what will happen when I deploy. Thanks, -
 
Have you checked out Aspose?
 
subject: How do I mock the JBoss 7 JTA transaction manager in JUnit?
 
jQuery in Action, 3rd edition