posted 18 years ago
A CachedRowSet is usually serializable, so it can certainly be passed to a remote client. But bear in mind that it is a ResultSet object (disconnected of course), so do you want your client to know that it dealing with a relational DB? This is why the use of a transfer object (new term for value object) is often advocated. My own preference is to always shield the client from implementation details, so I would use a transfer object.
Don't worry too much about performance, it's rare to find transfer objects a problem.
SCJP 1.4, SCWCD 1.3, SCBCD 1.3