@scott wrote:
It’s automatic. All SQL calls made by the DAO will become part of the J2EE container’s current transaction automatically, provided there is one.
Ok thanks. I was a bit afraid. I read an article about DAO implementation at IBM. The article stated out, there are two ways for transaction handling, use JTA or SQL. Seams I missinterpreted them. They are only referring to web-components like servlets and only the programatic transactional aproach is demonstrated. So it seams that I mixed it up a bit. 🙂
(article link: http://www-106.ibm.com/developerworks/java/library/j-dao/)
@scott wrote:
You can learn much more about how all of this works by referencing the appropriate EJB specification document for your server’s specification level.
I read some books about it and got some curses on my university. But the fun is, noone stated out (as far as I remember), that a database source is using the containers transaction level, when the bean optains it by looking up for it. I also reread the transaction chapter of the J2EE book of O’Reilly. No mention of it. Thats why I’ve asked. 😉
It’s also a bit wired though. Doing an lookup request and geting a ready to use setted up database source. I am simply not used to such easyness. 😉
Thanks for your help Scott!
Martin