• 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

RMI Problem

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am having a weird problem with RMI and cannot figure it out. Hope someone has had similar problems and fixed them.
Here's the symptom:
1.Start the SERVER (ip=localhost port=1099)
2.Start the Client which connects to the SERVER and everything is fine.
3.I exit my Client and my server is still running.
4.I start a *NEW* Client, which seems to connect to the Server just fine, however when I try to
make any queries to the database, I get an exception.
If I have more than one client connected to the server, and I stop one of them, none of the clients can do anything to the database such as make queries or reserve flights etc.
Any help would be greatly appreciated.
Don
 
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 know I had something like that happen to me, and for the life of me, I can't rememeber what it was. It could be you are calling close on the data class when the client ends, which will not allow access to anyone else after that. What is you cleanup code for your client when it quits.
I also had it when I modified the db.db file in client code, but that was because I was doing it wrong and corrupting the db.db file.
Mark
 
Donald Wedding
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mark!
You're *GREAT* !!!
That was exactly the problem.
When I was doing my cleanup method, I was closing the database! This is perfectly fine in Local mode, however in Server mode, this is not desireable !!!
Thanks a million! I think that this is something
I might have never noticed !!!
 
reply
    Bookmark Topic Watch Topic
  • New Topic