Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Question for use of EntityBean and SessionBean  RSS feed

 
feng changli
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
 
Pradeep bhatt
Ranch Hand
Posts: 8933
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: 8933
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.
 
Lasse Koskela
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.
 
Roger Chung-Wee
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!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!