I was hopping someone could maybe help me solve a problem with regards to JBossapplication server.Here it goes...

I'm using JBoss 3.2.1 at this stage and am trying to make use of the JBossTXfor handling managed transactions.

Scenario:

I have deployed a Stateless Session Bean (using CMT with */Required) thathas a method named createPerson(...).This method manipulates a DTO and passes it on to my underlying persistencemanager that stores the person's info into the underlying datastore. Mydatastore is a MySQL 3.x DB and I'm using a MySQL Connector/J 3.0.7 Stabledriver.

Now as you can see above, I throw an Exception that rethrows a system-levelexception named EJBException.In this case, Container should automatically rollback the runningtransaction.However my database shows that INSERT statement has been committed as itreflects the inserted change.

Alternatively, I have tried to set the ROLLBACK-ONLY using the sessioncontext'ssetRollbackOnly method and then throw an application-level exception.Unfortunately this didn't work either.

My transaction-service.xml is running with default settings.And I'm running a service for MySQL datasource using thelocal-tx-datasource:

Any suggestions or ideas that I can try to help me find the solution to myproblem, much appreciated.Maybe a way in which I can monitor the JBossTX invoking the begins, commitsand rollbacks on my methods?

i check the connnection in the hibernate session by session.connection().getAutoCommit(). the result was true. so i set it to false. then in case of exception no statement was commited but there was a blocking prozess on the database-server.