Is Sun's implementation of cacheRowSet Serializable?

  • Thread starter comp.lang.java.programmer
  • Start date
C

comp.lang.java.programmer

Hello All,
I am using Sun's cacheRowSetImpl. When I try to serialize it, it
tells me that ResultSet is no serializable. I am using
populate(ResultSet, int) method to populate it.

The ResultSet is not stored as transient var, that is probably the
cause of not able to serialize the cachedRowSet. Please correct me if I
am wrong, and please let me know if there is any method to serialize
it.

Thanks,
Manish
 
A

Andrew Thompson

comp.lang.java.programmer wrote:

*comp.lang.java.programmer*?!

Huhh? Why choose such an idiotic and confusing
posting name? Do you wish for people to mistake
you for a usenet newsgroup?

Andrew T.
 
C

comp.lang.java.programmer

I am looking for answer of my question, not your irritating comments...
Manish
 
G

Gordon Beaton

Andrew said:
Huhh? Why choose such an idiotic and confusing
posting name? Do you wish for people to mistake
you for a usenet newsgroup?

comp.lang.java.programmer said:
I am looking for answer of my question, not your irritating
comments... Manish

I'm inclined to agree with the sentiments of the OP here.

Andrew, it seems that the majority of your many posts to the various
Java newsgroups these days serve only to complain about the poster or
the posting style. Here you even complain about the *nickname* chosen
by the poster.

Why don't you give it a rest. Ignore the posts you don't like, or at
least save your deriding comments for the times you choose to add some
content.

/gordon
 
C

ck

Gordon said:
Andrew Thompson wrote:
Andrew, it seems that the majority of your many posts to the various
Java newsgroups these days serve only to complain about the poster or
the posting style. Here you even complain about the *nickname* chosen
by the poster.

I don't mean to offend anyone but IMHO I think if people have the
freedom to show their smart actions through stupid gimmick then Andrew
has all rights to express what irritates him.
Why don't you give it a rest. Ignore the posts you don't like, or at
least save your deriding comments for the times you choose to add some
content.

Thats always an option.

Cheers,
Ck
http://www.gfour.net
 
L

Lew

I don't mean to offend anyone but IMHO I think if people have the
freedom to show their smart actions through stupid gimmick then Andrew
has all rights to express what irritates him.

It is possible that on occasion Andrew is arguably too zealous, but at least
he helps keep some order and sensibility to the group. If there were no
enforcement of netiquette the group would likely decay to yet another forum to
advertise "Sexy Vidz" and the like. His vigilance/teism serves my interest, at
least.

Besides, every suggestion he makes, once you factor out the calumny, actually
contributes to a poster's effectiveness, assuming a serious commitment to
improving one's Java programming skills.

- Lew
 
C

comp.lang.java.programmer

Guys,
At the cost of displeasure of some members here, I am really sorry
to say that a lot of time and energy is wasted on criticizing totally
unrelated thing (which was my ignorange while registering, I thought I
was being asked the group name not the nick name), because someone did
not like it.

Never had expected such response...

Thanks anyways..
Manish
 
A

Andrew Thompson

comp.lang.java.programmer said:
Guys,
At the cost of displeasure of some members here, I am really sorry
to say that a lot of time and energy is wasted

It might have ended on the post after you explained
that, instead you insisted on expressing how
irritated you were.
...on criticizing totally unrelated thing

Unrelated to your immediate interest, sure. I don't care.

Another mistake you have made is to assume that your
post was 'all about you'. It is not, this is a community
of people (some more 'nice' than others) and any post
to this (or any other group) not only affects, but is effectively
*owned* by everybody that comments on it, reads it, or even
downloads it.
Never had expected such response...

You must have led a sheltered life.
'Welcome to usenet'

To the point that you made a mistake when registering.

I am pretty sure you can change that later (like e.g.
before your next post). I feel you will get better responses
if the name at the top, matches the name at the bottom
of a post, and those names seem like a real name.

No offence intended to people who choose to post
under a false name, but while I understand there might
be valid reasons, I will give a 'real name' person help,
before someone that I do not even know whether they
are a person struggling with english, or simply yet
another lazy teenager that speaks english (badly)
at home.

Also, since it is closely related.

Excepting obvious abbreviations, I can see no logical
reason why posting name and sig. should not be pretty
much the same. When it is not, it suggests to me that
the poster has "snuck onto a friend's PC - and is
sending messages in their name".

Andrew T.
 
C

comp.lang.java.programmer

"You must have led a sheltered life..."

Dont waste your time preaching others, people will stop reading you...
Manish
 
A

Andrew Thompson

Gordon said:
What grade are you in?

I'll take that as 'no', but to be honest, I thought
it might have simply been a typo. that the original
sentence had no '?'.

Andrew T.
 
C

ck

comp.lang.java.programmer said:
"You must have led a sheltered life..."

Dont waste your time preaching others, people will stop reading you...
Manish

I vote against that. In fact I find Andrews' point valid. In
contradiction, I feel that you have nothing interesting to say. You
have been trying to defend your useless point(though IMO you never had
any point to defend). Instead you could have simply agreed to follow
what Andrew suggested.

BTW I would like to know why particularly you chose the nick
comp.lang.java.programmer ?

Cheers,
Ck
http://www.gfour.net
 
L

Lew

ck said:
BTW I would like to know why particularly you chose the nick
comp.lang.java.programmer ?

He explained that as an anomaly of his newsgroup signup process.

- Lew
 
C

comp.lang.java.programmer

ck said:
I vote against that. In fact I find Andrews' point valid. In
contradiction, I feel that you have nothing interesting to say. You
have been trying to defend your useless point(though IMO you never had
any point to defend). Instead you could have simply agreed to follow
what Andrew suggested.

I really dont care if my statements dont interest you....
Manish
 
C

Chris Uppal

Manish said:
I am using Sun's cacheRowSetImpl. When I try to serialize it, it
tells me that ResultSet is no serializable. I am using
populate(ResultSet, int) method to populate it.

It might help (and help get this thread back on track) if you told us more
about what goes wrong. Is the compiler complaining, or does it fail at runtime
? Class com.sun.rowset.CachedRowSetImpl implements Serializable (as does its
superclass) so it /should/ serialize OK (and indeed is explicitly documented to
do so).

-- chris
 
C

comp.lang.java.programmer

Thanks Chris,

The compiler does not crib. It is at the runtime, I get ResultSet
not Serializable exception at the following code snippet:

ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(bos);
out.writeObject(cachedRS); --> Exception

Where cachedRS is an object of cachedRowSetImpl type.
The cachedRS is populated using

cachedRS.populate(rs, startLineNum)

Where rs is ResultSet and startLineNum is the line number to start in
rs (I am caching 500 records in one go).

Please let me know if this info is not suffice for analysis.

Thanks,
Manish
 
M

manish

Chris said:
It might help (and help get this thread back on track) if you told us more
about what goes wrong. Is the compiler complaining, or does it fail at runtime
? Class com.sun.rowset.CachedRowSetImpl implements Serializable (as does its
superclass) so it /should/ serialize OK (and indeed is explicitly documented to
do so).

-- chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,818
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top