• 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 ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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
Oliver

 
It was the best of times. It was the worst of times. It was a tiny ad.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic