This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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, -
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I mock the JBoss 7 JTA transaction manager in JUnit?
 
Similar Threads
JPA, Spring and hibernate.ejb.interceptor
JPA /springs ApplicationContext.xml
How to Configure SSL over Database in Spring?
Is it possible to set the transaction timeout at the application level
appContext.xml for transactionManager