Discussions

EJB programming & troubleshooting: RowSet as the return Type for EJB methods

  1. RowSet as the return Type for EJB methods (1 messages)

    Dear All

    Some of my SessionBean methods which quries the database,
    i am directly returing the rowset created by the method.

    e.g

    public RowSet A()throws SQLException,Exception
    {

    RowSet rows = st.executeQuery("some query");

    return rows

    }





    So my JSP will use the RowSet to display the records.
    Is this statergy is correct.

    with rgds
    shiva
  2. Yes, your strategy is fine. You can read more about in EJB Design Patterns (Floyd marinescu). The chapter two talks about inter-tier data transfer.

    good luck!