Serialização de ResultSet

6 respostas
C

Dae Pessoas,
Tem como eu serializar um ResultSet??? (Tentei o ObjectOutputStream, mas nao rola! Pois tem q ser um objeto com interface serializable) (Eu sei q o ResultSet é uma interface!)
Eu to usando jdbc da micosoft!
Ou alguma alternativa para eu obter os resultados de uma maneira “legal” pra eu manipular na otra ponta!???

Valeu!!!

6 Respostas

C

Sorry for answering in english, I can read a little portugues, but I can’t write it.

Here you will find two technical articles about serializing disconnected recordsets using HTTP and the Hessian web services protocol (a lightweight ws protocol).

http://www.martincordova.com/docs/dinamica-hessian.pdf

http://www.martincordova.com/docs/dinamica-http.pdf

It is not exactly what you asked for, but since resultsets can’t be serialized (Cached Rowset can), you may want to look for alternatives.

Best regards,
Martin Cordova

Dinamica - Open source J2EE framework
Free, easy and powerful

M

usuários estrangeiros? Portal Java em nível internacional? 8O beeeeeeeeeiiiiiiiiiiiiiii!!! hj o mundo, amanhã o universo!

C

“Cordova”:
Sorry for answering in english, I can read a little portugues, but I can’t write it.

Here you will find two technical articles about serializing disconnected recordsets using HTTP and the Hessian web services protocol (a lightweight ws protocol).

http://www.martincordova.com/docs/dinamica-hessian.pdf

http://www.martincordova.com/docs/dinamica-http.pdf

It is not exactly what you asked for, but since resultsets can’t be serialized (Cached Rowset can), you may want to look for alternatives.

Best regards,
Martin Cordova

Dinamica - Open source J2EE framework
Free, easy and powerful
http://www.martincordova.com

Thanks Cordova,
I’ll study this article and try to adapt for my need!!

See ya!!

PS.: E ainda aceito mais sugestões!

C

Hi Cordova,
I was trying to use your library and i got some problem,
Im using it on a non-J2EE application.
I want just make a SELECT on a table and send it to an applet, so i make a Recordset from my ResultSet with the query results. Then, on the other node(applet), when readObject() as a HashMap,

ObjectInputStream in = new ObjectInputStream( new BufferedInputStream(con.getInputStream(), con.getContentLength()) ); HashMap map = (HashMap)in.readObject();
i got an ClassNotFoundException saying “dinamica.RecordsetField”, just that!! Ive imported dinamica.*;

Thats a part of the server node:

this.rec=new Recordset(rs); rs.close(); //retrieve hashmap containing all published recordsets HashMap obj = rec.getFields();
Where rs is a ResultSet!

How can i make an application like that?? It’s possible?!?
How can i solve this problem?

Thanks in advance!

S

Cordova…

How did you know about us (Portal Java) ??

Thanks…

J

Hi, oi, salut… :grin:

Uma ClassNotFoundException ocorre, claro, em tempo de execução e não de compilação. Tente coloca-la no seu classpath ou entre as libs do seu projeto, se estiver usando uma IDE que deve funcionar.

valeuz…

Criado 21 de julho de 2004
Ultima resposta 5 de ago. de 2004
Respostas 6
Participantes 5