Does anybody know if the 2 phase commit is mandatory in EJB 2.0?...thanks
It is not mandatory at all...
i definetly support Tyler, some more information :
Currently J2EE only supports flat transactions, a flat transaction cannot have child transaction nested in it.
Two-phase commit protocol, currently J2EE only supports access to a single JDBC database in a transaction, but the implementation vendors can include extra transactional capabilities, example: J2EE SDK supports access to multiple databases in a single transaction using a two phase commit protocol.
So for your transaction to be purely J2EE standard based, its always better to go for a one-phase commit( so that u dont restrict the application to a single application server with extra transactional capabilities, there by restricting the portability)
Hope this helps :)
The new specs explicitely state that only flat transaction model will be supported in the future...The nested transactions will be not supported...The 2PC though is not a nested transaction...am I correct?
Yes u r...:)