• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB Design Approach: Which is better?  RSS feed

 
SAFROLE YUTANI
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys, I am trying to decide between two design strategies and I'd like to get some feedback from you all.
I'm writing an e-comm system for an online DVD website. In my first EJB design I want to use non-transactional, read-only entity beans to represent the products (DVD's). I want to use transactional SS beans to perform order fulfillment and inventory updating. Essentially, when an order is submitted and the product inventory is updated in the database via direct JDBC, I want to manually invalidate the entity bean that corresponds to the product whose inventory was updated. Since the majority of requests from the website would be read-only, then it makes sense to have entity beans that are read-only.
My second design uses transactional entity beans in their traditional read/write form. This is a simpler design, but in this case even simple reads must wait in line to get the price of a DVD if someone else is submitting an order for that same DVD.
What do you guys think? I'm leaning toward the first approach.

SAF
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!