I've been looking at integrating with Spring's PlatformTransactionManager (PTM) when embedded in Spring. Specifically, I'd like to use the PTM instead of a JTA TransactionManager in the EJB containers. After a lot of digging and hacking, I think we can abstract away direct JTA TransactionManager usage from the containers without out too much work. Currently, OpenEJB uses the TransactionPolicy abstraction to handle container and bean managed transactions. This abstraction is very similar to the Spring TransactionStatus abstraction, so I think I this will be the key place to slip-in Spring. My general idea is to expand the current TransactionPolicy interface to include a few extra methods that the container need (e.g., registerSynchronization, get/putResource) so they no longer use a JTA TransactionManager directly. Then I'll add a factory, so the TransactionPolicy can be replaced with a Spring based implementation. Well that's the plan at least, we'll see how it works out :)

-dain

Reply via email to