• Post Reply Bookmark Topic Watch Topic
  • New Topic

CMR and local interface question

 
a malycky
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

am studying for the BCD exam (using head first EJB) and have a question on CMR and local interface specification.

If you must specify the beans local component interface as the return type for the virtual persistent getter, does this mean that you can NOT use CMR if you are deploying ejb's that are typically going to be accessed remotely (and therfore you have coded the remote component interface and deployed as such)?

wouldn't a requirement to use local interface with CMR mean you would always have to code the local component interface and always deploy a bean as local??? (I haven't read chapter 12 yet on the details of the DD)

thansk!
 
T Rob Darrough
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am also still learning, so I don't want to say too much, but I can tell you that you can have both a local and a remote interface for the same bean. I don't think you specify anywhere in the deployment descriptor whether the bean is local or remote.
 
Leandro Melo
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

If you must specify the beans local component interface as the return type for the virtual persistent getter, does this mean that you can NOT use CMR if you are deploying ejb's that are typically going to be accessed remotely...


Don't know if i understood your quesition well, but...
If you're accessing CMR fields, you're doing it from a Entity CMP, then, what would be your necessity of returning a remote interface from a CMR field? All your CMPs are running on the same JVM.

Beyond that, you'll usually access Entity beans using a Session bean as a fa´┐Żade, so, you won't actually need (even if you could) a remote interface there.
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi amalycky


this mean that you can NOT use CMR if you are deploying ejb's that are typically going to be accessed remotely (and therfore you have coded the remote component interface and deployed as such)?


If I understood your question correctly, my answer would be-
Yes. You can't use CMR if you ONLY have REMOTE intefaces to the beans. For CMR to work you must have LOCAL interfaces.

Thanks
Maulin
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!