Greg Charles wrote:You forgot to include what you meant by "this doesn't work". Is there an exception? Does the flow not work as expected? What did you expect, and what happened?
A couple things I see seem funny. In reConnectWS() you don't try to reconnect unless webshot_status is true, so one failure to connect would mean no reconnecting ever. You also protect reconnecting with WSIsConnected, and I don't see where that's set.
Now, if I could get pedantic for a moment: please learn Java naming conventions. Maybe it's just me getting old and inflexible, but this code makes my eyes hurt.
Yeah, sorry. I know I get loose with naming conventions at times. Never took a formal course, but WSIsConnected() is a method.
I was getting a 500 error in response to my http request and nothing at all in the responseText so I haven't seen an error message telling me what's happening in the code.
What I want is a data base connection.
So long as I've initialized the connection by starting the webshop, the functions I was testing today (A guest book.) work fine.
The circumstances of the failure were that the guest book was asking for a connection when one had never been created before.
So it was using the code above absolutely fresh ... and I'm starting to think that maybe I shouldn't be using the isValid(0) method on a Connection object (webshop_con) that's set to null.