Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Al Hobbs
  • salvin francis

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

Ranch Hand
Posts: 109
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic