aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark ""Overall Architecture"" Watch ""Overall Architecture"" New topic
Author

"Overall Architecture"

Lina Mahl
Greenhorn

Joined: Jul 02, 2002
Posts: 13
I have suddenly realised that I dont understand how I am suposed to do the following
"Additionally, the program must be able to work in a non-networked mode. In this mode, the database and user interface run in the same VM and no networking is performed, and no sockets should be created. The user must be able to select the operating mode, although it is acceptable that the program stay in one mode once it has started up.
"
I have been working on making two jar files, one client and one server but that wont work for me in a "no network mode". How should I think?
/Lina
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
Hi,
In a non-networked mode you still need the client and the server but the client won't be invoking remote calls on the server.
You should still use the same GUI and database that the networked mode uses. In a sense the Data class is the server in non-networked or local mode as you should be bypassing all networking code i.e. serialising objects.
In non-networked mode the client and server are on the same JVM so no networking is required.
Hope this helps.
regards
[ June 10, 2003: Message edited by: HS Thomas ]
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11481
    
  94

Hi Lina
I have been working on making two jar files, one client and one server but that wont work for me in a "no network mode". How should I think?

I divided my application into several packages:
  • suncertify.db
  • suncertify.help
  • suncertify.test
  • suncertify.util
  • suncertify.connectivity
  • suncertify.client
  • suncertify.server

  • (Yes, I did go overboard )
    Some of these packages were in both client.jar and server.jar:
    client.jar:
  • suncertify.db
  • suncertify.help
  • suncertify.util
  • suncertify.connectivity
  • suncertify.client
  • suncertify.server (stub files)


  • server.jar:
  • suncertify.db
  • suncertify.util
  • suncertify.server


  • As you can see, suncertify.db was in both. In standalone mode the GUI used it's local copy of the classes in suncertify.db. In networked mode, it ignored the local classes.
    Alternatively, if you are willing to set a classpath, you could just call the classes in the db package in the server jar file directly.
    Regards, Andrew


    The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
     
     
    subject: "Overall Architecture"