• 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
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question about RMI and Non-network mode

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

In the assignment requirement:


The program must be able to work in a non-networked mode. In this mode, the database and GUI must run in the same VM and must perform no networking, must not use loopback networking, and must not involve the serialization of any objects when communicating between the GUI and database elements.
The operating mode is selected using the single command line argument that is permitted. Architecturally, this mode must use the database and GUI from the networked form, but must not use the network server code at all.



I have finish the network mode part using RMI, here is my system architecture

Data
|
BusinessModel(extends UnicastRemoteObject implements Remote)
|
| (communication over network)
|
client code

I am now implement the non-network mode, but if I try to create a new
instance of BusinessModel without create BusinessModel_Stub and BusinessModel_Skel, a big-fat StubNotFoundException will be thrown.
If my system running in non-network mode but must rely on the existence
of BusinessModel_Stub, am I violate the requirement?
(In non-network, I'm not using any code about binding port or using rmiregstry)


Thanks a lot for answering and happy weekend,
Ching-Tien Chang
 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a good reason to think out your architecture first.

What about this instead? This isn't quite right, but it might get you thinking...

Data
|
Business Functions
______________|____________
/ \
BusinessModel Non-NetworkedModel
| |
Network Direct Interface
\_________________________/
|
client code

ARG: I can't display this on this bulletin board. Lemme try now:

[ July 23, 2004: Message edited by: Robert Konigsberg ]
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I really did not understand what Robert Konigsberg means, but isn't it the case where you could do:

interface DataBase extends Remote
class LocalDataBase implements DataBase
and have a local Data base and when you whant a remote database, you do:

Remote sever = new LocalDataBase()
UnicastRemoteObject.exportObject(server, 0)

???
Itapaj� takeguma
SCJP 1.4 (91%)
 
Ching-Tien Chang
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for Robert Konigsberg and Itapaj� Takeguma's reply and sorry for reply so lately.

I will think about both of your suggestions and post new question here if I still have any question about this.

Sincerely,
Chhing-Tien Chang
 
Be reasonable. You can't destroy everything. Where would you sit? How would you read a tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic