Hi,
I'm having a strange problem with some current code I'm working on and would be grateful if anyone can point me in the direction of what I'm missing.
I'm using the Spring jdbc support to issue some drop table and create table commands. This all works. I have a higher level method (service layer if you call it that) that combines multiple of these drop/create methods. These service level methods are transactioned using and transaction interceptors. I'm using this approach elsewhere with great results. The annotation on these methods:
@@DefaultTransactionAttribute(TransactionDefinitio n.PROPAGATION_REQUIRED)
Now, when I run the code with an error in one of my create table sql commands I get, in the logs, what I would expect:
- transaction created.
- drop
- drop
- create
- create
- create fails due to Sql error.
- transaction rollback invoked due to sql error.
But, the first two tables created with the successful create commands are still there after this. The rollback should take care of this, shouldn't it.
Oh, I've tryed it with both DBCP and C3PO database connection providers.
Any pointers?
thanks
Jonny


Reply With Quote