• 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 ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Socket Stream Question

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a strange bug (Microsoft feature) that is driving me crazy

My application works fine in single user mode, however...

In network mode, I'm using a multi-threaded socket server.

The client portion is a new thread spawned from the GUI, this client thread waits until an object is received from the GUI, wakes up, sends this serialized object to the server via
objectOutputStream.writeObject(message);
objectOutputStream.flush();

The server is waiting (objectInputStream) to read an incomming
message

When the server receives the message from the client, it figures out what type of message (object) this is and calls the corresponding remote data access wrapper method (with said message), which in turn calls the appropriate local data access method, the results from the local data access method are then attached to the message via setters, this message is then sent back to the client.

The issue is this, in the FindRemote class I have a String array inside the class that is initialized when the class in instantiated (from search criteria from the search screen), this FindRemote instance is then sent to the server via the client, (the criteria can be pretty complex), no matter how complex the search criteria, the correct records come back (the first try), on the second and subsequent attempts though, the same records that match the original criteria come back, I attempted to debug by printing out the search criteria before just sending the message to the server (Client objectOutputStream(message) and it is what is expected, on the server side the first time thru right after the objectInputStream the criteria matches what was sent from the client, however and subsequent tries, the client prints out the original search criteria.

I can even go and delete records, and then go back an search again, however the original search criteria still comes up.

I'm going nuts, can anyone out there help?


 
If you settle for what they are giving you, you deserve what you get. Fight for this tiny ad!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic