• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

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
 
Power corrupts. Absolute power xxxxxxxxxxxxxxxx is kinda neat.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic