Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

question about cmr field & method-intf

 
Deep Chand
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The abstract getter/setter method for a CMR field should specify only the local interface for the related entity bean. But if it returns Collection, then is there a requirement that it should be a Collection/Set of local interfaces for the related entity bean?


can 'method-intf' be used while specifying tx attributes using 'container-managed' ?


Thanks
Deep
 
Ganeshji Marwaha
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Deep Chand:
The abstract getter/setter method for a CMR field should specify only the local interface for the related entity bean. But if it returns Collection, then is there a requirement that it should be a Collection/Set of local interfaces for the related entity bean?


can 'method-intf' be used while specifying tx attributes using 'container-managed' ?


Thanks
Deep


Yes, there is a requirement that it should be a Collection/Set of local interfaces. But, as we know, even if we make them return a collection of other object types, the error wont be caught until run-time.

Yes, the 'method-intf' can be used while specifying tx attributes also.
Based on the Spec and the DTD, there is only one definition for 'method' tag and it says that the tag can be used for all three given below.

container-transaction, exclude-list, method-permission
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!