javaee / ejb-spec

See javax.ejb project for API. Contains legacy issues only.
https://github.com/javaee/javax.ejb
6 stars 1 forks source link

Resource and Transaction Handling in the Code Examples #52

Closed glassfishrobot closed 12 years ago

glassfishrobot commented 12 years ago

The resource and transaction handling in the code examples is wrong. That should be fixed IMHO. See http://jandiandme.blogspot.com/2012/02/dangerous-code-example-in-ejb-31-spec.html .

glassfishrobot commented 12 years ago

Reported by ewolff

glassfishrobot commented 12 years ago

mvatkina said: The example will be even more complicated than that in the link - ut.commit() won't be reached if any of the java.sql.Statement calls throw SQLException. I'll try to keep it readable and right. May be will just say that statements and connections are to be closed...

glassfishrobot commented 12 years ago

mvatkina said: I updated the examples to show that they are not complete and that the resources are to be closed

glassfishrobot commented 12 years ago

Was assigned to mvatkina

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA EJB_SPEC-52

glassfishrobot commented 12 years ago

Marked as fixed on Wednesday, May 2nd 2012, 5:16:36 pm