• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problems in Using EJB in our Project  RSS feed

 
Sriram T
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
There is some problem in selecting type of beans in our project....Our project is to allow customer to browse for the retailers and the products they are selling...and will be displaying the availability of products, and to allow user to book cinema ticket online......for this application we are planning to use Entity beans ..........but I think we dont need to go for Entity coz we are not performing any transactions........I am planning to change it to session beans.............can anybody suggest me which bean to use...............
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The simple rule is to use entity beans to represent persistent information (such as cinemas, films, etc) and use session beans to manage the entity beans and represent business processes (such as booking a seat, etc).
Hope that helps
Simon
 
Ashoke Bhowmick
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If most of the operations are read only , then going for SessionBean+JDBC is a good idea considering the overheads and performance issues associated with entity beans. There are plenty of resources available on the net discussing when to go for entity beans. Since you know your application better , you can make a choice after going through those documents.
Originally posted by HarishTellamsetty:
Hi,
There is some problem in selecting type of beans in our project....Our project is to allow customer to browse for the retailers and the products they are selling...and will be displaying the availability of products, and to allow user to book cinema ticket online......for this application we are planning to use Entity beans ..........but I think we dont need to go for Entity coz we are not performing any transactions........I am planning to change it to session beans.............can anybody suggest me which bean to use...............
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, even if the data's read only, there are times when an Entity bean may perform better than a Session bean using raw JDBC - if the same data is referenced frequently and there's not too much of it, it will remain in the EJB cache.
 
hanumanth reddy
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It all depends on what application server ur using
and how ur architecture is ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!