• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to write a single Entity bean for two tables+BMP

 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
Can anyone help me in writing a single Entity Bean using BMP for two tables.
Generally we will write seperate entity bean for seperate table.But if tables are large then maintenance of Entity beans will become clumsy and very hard to write.Can anyone suggest some other way for implementing this in EJB 2.0.
Thanks in advance
With kind Regards
Satheesh.K
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Can anyone help me in writing a single Entity Bean using BMP for two tables.


You can use CMR (Container Managed Relationship) to link tables together via Entity Bean, however, as you expected, this will lead to poor performance if the table size is too large.


But if tables are large then maintenance of Entity beans will become clumsy and very hard to write.Can anyone suggest some other way for implementing this in EJB 2.0.


In such case, I will seperate the data access into 2 parts. For tables with less data, I will use Entity Bean. But for tables with huge data, I will use plain JDBC via a DAO service.

Nick
 
Arch enemy? I mean, I don't like you, but I don't think you qualify as "arch enemy". Here, try this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic