• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

can we map multiple tables in one entitybean(BMP)

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 28420
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you do the same thing using CMP?
 
Tim Holloway
Saloon Keeper
Posts: 28420
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It would depend on how the container is implemented by your EJB server.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Saloon Keeper
Posts: 28420
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The same way as for one table. The database stuff is all inside the BMP Java code you write.
 
Opportunity is missed by most people because it is dressed in overalls and looks like work - Edison. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic