• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

How does a remote client get a CMR reference

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Suppose I have two beans: Movie and Director
In bean Movie, I have virtual CMRs:

public abstract Director getDirector ();
public abstract void setDirector ( Director d );

I also need a business method getMovieDirector () to get
a given movie's director, IMPORTANT HERE, the client is a remote client, how can I deal with it. In P386, there is a method like

public Director getMovieDirector () {
return getDirector ();
}

but the Director has to reference a local reference. I need a method like:

DirectorRemote getMovieDirector ();
How can I deal with that, or I am in total wrong way here.

Thanks
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can not get the cmr field through the remote interface, but you can define a value bean and create a method to retrieve the cmr-field and populate the value bean with cmr-field's value, then return the value bean.
 
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just another flavour to Jason's comment...

In movie's remote interface declare a method


In movie bean implement this method:



 
Jingyi Wang
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you both very much. I got it.
 
He puts the "turd" in "saturday". Speaking of which, have you smelled this tiny ad?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic