• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Oliver Rensen
Ranch Hand
Posts: 109
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic