• Post Reply Bookmark Topic Watch Topic
  • New Topic

Entity or Session Bean

 
Herbert Maosa
Ranch Hand
Posts: 289
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my application, all I want is run various queries on a database, without actually inserting any new records on the database itself. Do I need to use session or entity beans for this?
Herbert.
 
Kishore Dandu
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If what ever you explained(just search query) is the case, I would go with a session bean(like a facade) and hit the DAO java files. That would be much cleaner and will not involved any unnecessary complexities(in your case) that come with entity beans.
 
Giridhar Gangadhara
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stateless Session beans are the best thing to go for. Thumb rule: Use entity beans only for updates, inserts. If your updates are for rows > 100 use another DAO layer to do the job for you with a session bean. Entity beans are performance over heads with lots of records.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!