Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

RMI Problem

Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • 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.
Posts: 17346
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • 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.
Donald Wedding
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 !!!
I am displeased. You are no longer allowed to read this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic