Results 1 to 5 of 5
- 03-07-2011, 05:45 PM #1
Senior Member
- Join Date
- Feb 2010
- Posts
- 128
- Rep Power
- 0
ResultSet through ObjectOutputStream
Hi Java Gurus,
I'll start with a sequence diagram first:
1. Client app sends a string to server ---> 2. Server calls MySQL procedure ---> 3. MySQL DB builds table---> 4. Server runs a query on MySQL and gets a ResultSet.
Now, the idea is to return the ResultSet (or data inside the result set) back to the Client app. I know the ResultSet isn't serialized which when I run the program throws java.io.NotSerialisableException.
I'd like some guidance as to how I could make the result set serialisable or if there are any other ways/techniques to return the data back to the Client app.
P.S. Is it SerialiZable or SerialiSable. :confused:
Thanks in advanceMeasuring programming progress by lines of code is like measuring aircraft building progress by weight.
- 03-07-2011, 06:46 PM #2
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 7
See this thread.
P.S. if you Google there are RMI JDBC Driver examples.
- 03-07-2011, 07:03 PM #3
Senior Member
- Join Date
- Feb 2010
- Posts
- 128
- Rep Power
- 0
Thanks masijade :)
Sounds pretty simple :) Surprised I did not think of that myself :confused: :DMeasuring programming progress by lines of code is like measuring aircraft building progress by weight.
- 03-07-2011, 07:04 PM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,413
- Blog Entries
- 7
- Rep Power
- 17
Your server has to fetch the data from each row of the result set and store it in a Vector or a List. After the Vector or List (or whatever) is populated the result set can be closed and the list has to be send to the client. Of course all data in the list has to be Serializable. The British should've written it as serialisable but of course the tribes on the wrong side of the pond spell it as serializable, bloody bastards! ;-)
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 03-07-2011, 07:16 PM #5
Senior Member
- Join Date
- Feb 2010
- Posts
- 128
- Rep Power
- 0
Similar Threads
-
Socket/ObjectOutputStream/Very Simple Object serialization error
By L337CodeMonkey in forum NetworkingReplies: 3Last Post: 02-08-2011, 07:45 PM -
How does ObjectOutputStream access private writeObject(ObjectOutputStream) methods?
By kreyszig in forum Advanced JavaReplies: 17Last Post: 10-14-2010, 10:26 PM -
problem using ObjectOutputStream in multithreading
By sanjeevbindroo in forum NetworkingReplies: 3Last Post: 10-15-2009, 08:00 AM -
ObjectOutputStream Example
By Java Tip in forum Java TipReplies: 0Last Post: 03-20-2008, 09:21 AM -
question on ObjectOutputStream
By money123 in forum New To JavaReplies: 5Last Post: 07-27-2007, 10:31 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks