Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Stateless Session Beans and Databse[Oracle 8i]  RSS feed

 
Maz Shaikh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
I am working on a Complex Banking Application.
And we are only using Stateless Session Beans for any database Updations or Insertions.All the business logic resides in the Stateless beans.In most of the Beans method we have queries which has multiple joins.
My question is...Is it wise to use Session Beans in such mission critical banking applications.What are the Pros and Cons of using Stateless Session Beans in Banking Applications when consistent data is the concern?
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stateless session beans will ensure the business logic it( or they ) embody can be used by multiple clients. It is still important to isolate the persistence logic from business logic. Having queries in the stateless session bean is not a good idea and certainly not a clean design. I suggest that you consider creating DAOs to encapsulate all the DB specific queries.
Using session beans with DAOs instead of entity beans is not an uncommon design practice. However, use of entity beans would have given you the option of controling how concurrent reads and writes should be handled to ensure data consistency ie., whether reads should block until writes commit, or whether uncommitted reads are acceptable and so on. Since you are using direct JDBC( or equivalent ) from session beans, you are responsible for handling any stale data.
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may want to look at this post that talks about record locking issues.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!