This is the second time I've posted this message on this forum. The first time it 
disappeared.

A simple transaction rollback was working with hypersonic, but seems not to be working 
when we switch to mysql. 

Running mysql-connector-java-3.0.11 and mysql 4.0.18-0 (client and server) with JBoss 
3.2.3 java 1.4.2_04 on both linux and windows.

We have 2 stateless session beans FooService (remote) and BarService (local). 
FooService has a createFoo() method which, after creating an Foo entity bean (local 
with CMP & CMR data), calls validate() on BarService. Validate() does some data 
validation and if invalid data, throws a RemoteException which is caught in 
createFoo() and transformed into another remote exception to be sent back to the 
client (in this case a junit test). Both FooService and BarService are declared to 
have container managed transactions, and both createFoo() and validate() have the 
required transaction attribute. There is no client transaction. 


createFoo( ) {
    try {
      fooHome.create(); //create entity bean
      bar.validate();      // get a RemoteException
    catch (Exception e) {
       throw RemoteException; //entity bean creation should rollback
}

This code works with hypersonic but not with mysql.  I do see the 
TransactionRollbackException on the jboss console, and a remote exception is thrown 
back to the client, but the Foo entity bean is in the database. Is there a 
configuration of msql that is causing this?








View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3831587#3831587

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3831587


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to