Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How does a remote client get a CMR reference

 
Jingyi Wang
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • 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
 
Jason Hunt
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • 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.
 
Alex Sharkoff
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thank you both very much. I got it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic