• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Question for use of EntityBean and SessionBean  RSS feed

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Either EntityBean or SessionBean(SLSB or SFSB) can both access database,so what difference when they access database?
Which type of EJB should i use when access database?
regards
 
Ranch Hand
Posts: 8934
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use either to access database.
 
feng changli
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply
Actually,i want to konw the more difference when they access database?
regards
[ December 11, 2003: Message edited by: feng changli ]
 
Pradeep bhatt
Ranch Hand
Posts: 8934
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suggest you search the forum for session vs Entity.
 
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Reading the Sun J2EE Tutorial would probably be a good idea as well.
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my department, entity beans are banned.
I like to see session beans do DB access using the Data Access Object pattern. On the project I am working on, we have this:
bean --> DAO object --> DB broker --> DB
The DB Broker is a singleton which actually handles DB access. Also, we use prepared statements stored in external files and cached in a HashMap on startup. It all works quite well.
 
feng changli
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks the both answers of you!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!