How do I Pass a result set from bean to client

Discussions

EJB design: How do I Pass a result set from bean to client


  1.  I would like to pass java.sql.ResultSet from EJB bean to the client.Since java.sql.ResultSet is not serializale
    object i couldn't pass it back to the client.So now I am passing vectors of vectors back to the client.But this
    affects the performance issue.So can please tell me a better solution for this.I'm using Weblogic 5.1 Application server.

    Thanks in advance,

    With Regards,
    Vinoth.C
    cvinoth@chn.cts-corp.com
  2. Try to use CachedRowSet, It like ResultSet but It is serialized, so you can pass it from Bean to Client.

    regard
  3. where should i get CachedRowset[ Go to top ]

    I have searched in java.sql.* of jdk1.2 but i couldn't able to find it.Will u help in this regard.

    With Regard,
    Vinoth
  4. Hi, i am using the CachedRowSet API with amazing success.
    It's not included in the core JAVA.
    You can download it from the http://java.sun.com/jdbc section of the SUN web site.
    It's a disconnected+scrollable+serializable ResultSet with many usefull methods like next(), previous() absolute(), size() etc. which you cannot find in the typical ResultSet unless your DB supports JDBC2.0
    Alex.
  5. While I am calling getTableName(1)of ResultSetMetaData Object inside Stateless Session Bean I am getting
    error like this

    Error java.sql.SQLException: ZZ00A: The method getTableName has not been completed and should not be called.

    I am using Weblogic 5.1.0 with jconnect5.2 driver for
    Sybase SQLServer.

    Will anybody help in this regard.

    Thanks in advance,
    With Regards,
    Vinoth.C