This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
1. In my EJB method, I simply delete a record from the Oracle database using sql query.Which transaction attribute would be appropriate in this case? I guess 'NotSupported' is appropriate as I don't have multiple sql queries to delete.
2. Also, in the same page, when I call a single select sql query from my EJB method, I can use 'NotSupported'. 3.When I have a simple insert / update sql query(only insert/update in one table), I can use 'NotSupported'.
4.When I have to insert / update multiple sql queries in my EJB method,other transaction attributes would be appropriate.
Please let me know whether the above are correct. Thanks in advance,
As a rule of thumb NotSupported should be used when an enterprise bean accesses a resource manager that doesn�t support transactions. Don�t use NotSupported for any other reason, since the result might be unpredictable. Any database update/delete/insert operation needs to run within a transaction that commits at the end, in order to update the database. Don�t believe that transactions are needed only when two or more operations must execute as a unit (which is the meaning of transactions). This is an EJB container which was entirely architected and designed to perform any work within a transactional context. Finally I would say that you should rather use the required attribute (which for many application could be considered the default). Regards.
I think, therefore I exist -- Rene Descartes
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com