Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • 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
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

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.
 
a wee bit from the empire
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!