Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

CMR getter and setter  RSS feed

 
KM Chen
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have some question about CMR. If Order and OrderLineItem has 1 to many bi-direction relationship. Do I need to declare CMR getter and setter methods in both Local Object?

In page 284 of "Teach yourself EJB in 21 days",it declared getOrder and setOrder in OrderLineItemLocal class. But it did not declare CMR getter and setter methods (like getLineItems() and and setLineItems(Collection ..) in OrderLocal class? It only declared them in OrderEJB.

Can some one have better idea?

Thanks in advanced.
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do I need to declare CMR getter and setter methods in both Local Object?
Yes, you need to as explained in section 10.3.13 of the EJB 2.0 specification. That's what the book wanted to teach you on the 22nd day
[ December 10, 2004: Message edited by: Valentin Crettaz ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!