• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

CMR and local interface question

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
I'm still in control here. LOOK at this tiny ad!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic