This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transactions testing with maven and jetty

 
Trilochan Bharadwaj
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am currently working on a Spring MVC, Spring Web Flow / Dojo client / Restful Resource on JAX RS (using Jersey JAX) <--> Spring <--> Hibernate <--> DB based web application; and we use maven with jetty for running some of our stuff for testing. I wanted to test some of my Business tier elements (Service Tier annotated with @Transactional annotations for Spring); On presentation tier I have restful resource using Jersey JAX RS that calls Spring based POJO service that calls DAO to get the results. The service methods are annotated with @Transactional (spring) annotations and I wanted to test out my flow; Our service xml for Spring beans/context configuration looks like this:

**************************************************************

***************************************************************
I have configured Jetty plugin as follows: (in POM.xml)
***************************************************************

*********************************************************************************************************************************
For jetty config I am using Jetty plus xml as supplied with jetty server download. I have added following lines to it:
**********************************************************************************************************************************




But when I do a mvn clean compile test install jetty:run ... It compiles fine and test cases run, but Jetty maven plugin cannot find UserTransactionImp; I checked ... its there on the classpath and I checked the jar in .m2 repo ... its present where it should be ...

2010-02-09 23:07:34.657:INFO::Logging to StdErrLog:: DEBUG=false via org.eclipse.jetty.util.log.StdErrLog
2010-02-09 23:07:34.689:WARN::Config error at <New id="userTxImpl" class="com.atomikos.icatch.jta.UserTransactionImp"/> java.lang.ClassNotFoundException: com.atomikos.icatch.jta.UserTransactionImp

^^ those are the two lines I get and server exits ...

Any help or suggestions would appreciated ... NOTE: I don't need Atomikos ... I couldn't find any other transaction implementation that I could use with Jetty ... I just need to test my code's flow with Transaction management (Integration testing 101).

Thanks in advance!
Rick
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like a Jetty issue and not a Spring issue. Moving this thread to the more appropriate forum.

Thanks

Mark
 
Trilochan Bharadwaj
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark,

If you read what I said in the end you'd know that I do NOT intend to use only transaction manager with JETTY or that JETTY alone; I asked I just want to test out my transactions in Spring; which means I need pointers on how to do that in Spring ... so it really is a concern of Spring.


Rick
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic