• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can we use only one Entity bean to access different tables

 
Sriram T
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
Can we use only one entity bean to access different tables in a data base....if yes do we need to establish connection to the data base each and every time..........
Which sort of Entity bean can we use....CMP or BMP............
Some one Please clarify this
 
james edwin
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I think no in EJB1.1
In ejb2.0 u can use one enitiy bean to get data from two/three tables (table like UserInfo and Address -two tables),You can use one bean to access data from these two tables.But this is different than what u r asking ..
 
Douglas Kent
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can get some good insights by reading the design discussion in the Petstore application at:
http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/sample-app/sample-app1.3.1a3.html. Basically, do you need transactions? Is the nature of the data access read-only?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!