• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
satheesh krishnaswamy
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • 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
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • 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
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!