Result Set from stateless session bean ??


EJB programming & troubleshooting: Result Set from stateless session bean ??

  1. Result Set from stateless session bean ?? (1 messages)


    We need to Process the Resultset to display the report on the jsp Screen . The query is formed in the Stateless Session Bean ,a connection is obtained and the query is executed to obtain the resultset. We want to pass this Resultset to a javaBean. We tried this but we are getting null for the Result set at the jsp side. Resultset value is fine at the EJB layer.
    How do we over come this ..
    And also, is there any better option to display a huge resultset??

    Thanks and Regards,
  2. If you're using JDBC 2.0 you might want to use a RowSet (a CachedRowSet) for returning rows back to the client. Unlike ResultSet, you don't need a database connection open while using it. Another approach would be to use Value Objects, Vectors or Hashtables to return data back to the client.
    I personally like Value Objects because JSPs can treat them like regular Java Beans and not have to worry about column names or datatypes.