• Post Reply Bookmark Topic Watch Topic
  • New Topic

can we map multiple tables in one entitybean(BMP)  RSS feed

 
senthil loganathan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it it possible to write an entity bean BMP which can handle more than one tables?
i can just write method for updating,loading creating for multiple tables?
is it right way to do or there is some other way?
if possible then how?
------------------
Senthil.L
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure - no problem. Anything you can code in JDBC/SQL is legal in a BMP bean. EJB's are not simple mindless castings to Java of database tables, they're logical entities in their own right.
In fact, the EJB spec itself doesn't demand that persistence even be done to a database - you could use flat files, network devices, etc. DBMS's just happen to be one of the more convenient ways of doing it (and, of course in CMP, the one the container normally supports).
 
Emmanuel Bellas
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you do the same thing using CMP?
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would depend on how the container is implemented by your EJB server.
 
Neelu Mehta
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I'm mapping an Entity Bean BMP with two tables then how Ill write XML files for that
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The same way as for one table. The database stuff is all inside the BMP Java code you write.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!