wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Does the TransactionAttributeType Required has an impact on JDBC-calls? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Does the TransactionAttributeType Required has an impact on JDBC-calls?" Watch "Does the TransactionAttributeType Required has an impact on JDBC-calls?" New topic
Author

Does the TransactionAttributeType Required has an impact on JDBC-calls?

Oliver Rensen
Ranch Hand

Joined: Jul 23, 2004
Posts: 109

Hi ranchers,

I have a question regarding transactions in Session-Beans.

There is the following method in a Stateless Session-Bean:



The class DataAccessObject is a POJO.

The method bookProdOrders() uses JDBC for the database-access:



In the first SQL-statement I read all records where the booked-field is not set.

Then I do some business-logic.

At the end I make an SQL-update on the same table and set a value into the booked-field, so that this records will not be booked twice.

Is this approach transaction-safe?

What would happen when two or more users call the SLSB-method bookProdOrders() on the same time?
Would the two or more SLSB-method-calls on bookProdOrders() be handled sequentially from JBoss?

Does the TransactionAttributeType Required has an impact on the JDBC-calls?

Kind regards
Oliver

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Does the TransactionAttributeType Required has an impact on JDBC-calls?