• 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

Where does the LockManager class lie ? db.jar or Server.jar ?

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the LockManager class should stay in db.jar ,but some one advise me to place it in the server.jar . Whitch is right ?
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Zhou, how many jars do you have? You should only have 2 one for the client and one for the server. So in many cases the db and the server are the same jar. if you called you server.jar, db.jar.
Mark
 
Zhou Can
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the db.jar should be in two jar files , one is the server.jar and the other is the client.jar . Am i right ?
 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the same problem about db classes available to the client in standalone mode.
In RMI server mode the client does not need the db classes, but in standalone mode the client accesses the server db classes. Is this right or not. For that I put the server.jar in the classpath of the client. Thanks for your advices.
Charles
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You will put some of the db package classes in your client.jar.
You will need them for Local mode. You will also hav ethe _stubs from the server also in your client.jar
Zhou - Yes there are only two jars client.jar and server.jar, there is no db.jar unless you want to call your server.jar db.jar, which I think is a misnomer.
Mark
[ December 10, 2002: Message edited by: Mark Spritzler ]
 
Charles Dupin
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mark,
As you say we need the stub implementation in the client jar, otherwwise it does not work, the RMI connection sends a Remote Exception. But how comes the stub must be in the client jar. Why isn't there a complete separation possible between client and server in remote mode? (interface in the client and implementation of the stub in the server). Sorry if this question looks stupid but I need an explanation here.
Thanks,
Charles.
 
Zhou Can
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Finally I put it in server.jar.
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Charles, the reason is simple. In this assignment we are not using Dynamic Downloading of stub classes. In order to do that you would need a web server. Which of course most people don't keep in their back pockets.
So then the class would need to be accessible to the client, and the client.jar is the best place for this.
Mark
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
BTW, I personally submitted three jars: a client, a server, and a shared jar with all the shared classes needed by both client and server. The Class-Path manifest attribute will glue the jars together.
- Peter
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic