Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI Problem

 
Donald Wedding
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.
Don
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac 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.
Mark
 
Donald Wedding
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • 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 !!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic