I posted on the forum to Persistence & CMP/JBoss under  JBoss User at
11:20.. I see my post on the forum but nothing comes out on this list. This
is the second time I've tried this. What is the problem? Anyway here is my
post:

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? 




-------------------------------------------------------
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