• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

standalone with RMI

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,

I've read some threads recently about creating Service interfaces that can be used in networked and standalone modes.

My GUI controller will have a reference to a Service object that could be a remote stub or a local object. Does it violate spec to use the same class for both modes? I would like to use the Remote object in standalone mode. I would not use any networking but the object I create would be a Remote (object instanceof Remote). Since my assignment says that none of the network server code may be used in standalone mode I'm worried that this might be against the spec.

The alternative I've been reading about is to create a separate RemoteService interface that extends Service. So Service would not be a Remote but its methods would throw RemoteException. Can anyone help me understand why I can't just use the one Remote object in both modes?
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mike,

I implemented the alternative, because my approach needed 2 different implementations: the method implementations are different in local and rmi mode.

According to my instructions:

Keep in mind that networking must be entirely bypassed in the non-networked mode.

The ultimate question: what is meant by the word "entirely"? No use of Remote interface or just no network traffic?
As far as I know I don't know of someone using your described approach, so following this approach might be risking automatic failure.

Kind regards,
Roel
 
Mike Hays
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay, thanks. I won't risk it.
 
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello,

I implemented an old version of B&S in 2004, and I got away with it:


Still no guarantee that your spec is phrased differently or simply judged differently ...
 
Ranch Hand
Posts: 59
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Roel,

i think Mike's second alternative would look like Roberto explained here. So, following Roberto's approach is valid and not against the specs i think. It has to be valid, because i changed my client implementation from thick to thin and did it in a very similar way to Roberto...

Regards
Bernd
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bernd Wollny wrote:It has to be valid, because i changed my client implementation from thick to thin and did it in a very similar way to Roberto...

Where did I state the alternative would be invalid? I even said I implemented the alternative

Kind regards,
Roel
 
Bernd Wollny
Ranch Hand
Posts: 59
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Roel De Nijs wrote:Where did I state the alternative would be invalid? I even said I implemented the alternative


Ohhh, to claim that was not the intention of my post. I just wanted to write down that the second approach is a valid one like you mentioned!!!
reply
    Bookmark Topic Watch Topic
  • New Topic