• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ejbHome method

 
Weerawit Maneepongsawat
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Can i use this method instead of ejbFind() for Remote and local ?

Thank you
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you can. But as a bean provider, we need to make sure that we are returning a collection of correct type of interfaces either remote or local.
finder methods can return a collection of remote or local objects based on the type of the home interface in which they are declared.This is not applicable for select methods as they are not declared in a home interface.
They have a special attribute(optional) in the DD called "result-type-mapping" which can hold either local or remote value.
You may find these posts also interesting, which makes me wonder if the Errata at OReilly site needs to be updated to include this also.(p:420) :roll:
http://www.coderanch.com/t/158964/java-EJB-SCBCD/certification/HF-EJB-abstract-schema-type
http://www.coderanch.com/t/158851/java-EJB-SCBCD/certification/SELECT-statement
 
Weerawit Maneepongsawat
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic