• 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
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

How does a remote client get a CMR reference

 
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
 
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.
 
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.
 
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic