Forums Register Login

standalone with RMI

+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
Okay, thanks. I won't risk it.
+Pie Number of slices to send: Send
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 ...
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
 

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
+Pie Number of slices to send: Send
 

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!!!
Honk if you love justice! And honk twice for tiny ads!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1691 times.
Similar Threads
How to design the interface
Design decisions - Choose the layers and their role
NX SCJD: but passed with 155/155
Locking Question
Waiting for my exam...
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 14:15:55.