Re: [Jetty-support] jetty transactions using maven for spring based web app

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [Jetty-support] jetty transactions using maven for spring based web app

Stephen Davidson-3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Rick.

This list is no longer monitored.  Instead, check out
[hidden email].

Regards,
Steve

Ricky wrote:

> 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:
>
> **************************************************************
> <!-- All Blah blah namespace declarations go here -->
> <tx:annotation-driven />
> <tx:annotation-driven transaction-manager="transactionManager" />
>
> ***************************************************************
> I have configured Jetty plugin as follows: (in POM.xml)
> ***************************************************************
> <plugin>
> <groupId>org.mortbay.jetty</groupId>
> <artifactId>jetty-maven-plugin</artifactId>
> <version>7.0.1.v20091125</version>
> <configuration>
>        <jettyConfig>${jetty.config}</jettyConfig>
>        <!-- <jettyEnvXml>${jetty.env.xml}</jettyEnvXml>-->
>         configuration>
> </plugin>
>
> *********************************************************************************************************************************
> For jetty config I am using Jetty plus xml as supplied with jetty server
> download. I have added following lines to it:
> **********************************************************************************************************************************
> <New id="userTxImpl" class="com.atomikos.icatch.jta.UserTransactionImpl" />
> <New id="tx" class="org.mortbay.jetty.plus.naming.Transaction">
>         <Arg>
>                 <Ref id="userTxImpl" />
>         </Arg>
> </New>
>
>
> For getting Atomikos, I have declared following my POM file for Atomikos:
> <dependency>
> <groupId>javax.transaction</groupId>
> <artifactId>jta</artifactId>
> <version>1.1</version>
> <type>jar</type>
> <scope>runtime</scope>
> </dependency>
> <dependency>
> <groupId>javax.transaction</groupId>
> <artifactId>jta</artifactId>
> <version>1.1</version>
> <type>jar</type>
> <classifier>sources</classifier>
> <scope>runtime</scope>
> </dependency>
> <dependency>
> <groupId>com.atomikos</groupId>
> <artifactId>transactions-jta</artifactId>
> <version>3.2.3</version>
> <type>jar</type>
> <scope>runtime</scope>
> </dependency>
> </dependencies>
>
>
> 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
>
>
> _______________________________________________
> Jetty-support mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jetty-support

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iEYEARECAAYFAktzHfgACgkQSphIUSiVzgYVawCfY0a6uKVbe9i82LpSC5a8Xz8B
azUAoNjmBLPv8HXoLuWen0uzSD8RJwA4
=tSIA
-----END PGP SIGNATURE-----


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support