• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about ejb relationship

 
Giju George
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can the bean provider manipulate ejb relationships at run time.. if so, how ??

And what does this really means !!!

Also, what does it mean by saying "CMR can only exists among entity beans with the same LOCAL RELATIONSHIP SCOPE "
[ August 05, 2004: Message edited by: Giju George ]
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can the bean provider manipulate ejb relationships at run time.. if so, how ??
Yes of course. As an example, let's say you have two entity beans, Customer and BankAccount which have the following relationship:

Customer 1 <-----------------> * BankAccount

One Customer can have 0 or many BankAccount for which he is the sole owner.
At some point the customer may decide to create a new bank account for some reason.

Basically, invoking customerBeanLocal.addBankAccount(someNewBankAccountLocal) would do the job.

Also, what does it mean by saying "CMR can only exists among entity beans with the same LOCAL RELATIONSHIP SCOPE "
It means that the entity beans that share relationships together must provide a local component interface and must have been deployed in the same EJB container on the same physical server.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic