Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

problem in Returning ResultSet in a EJB  RSS feed

 
Mahendran Aiyappan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose I have written a Business Method which is processing a simple query and returning a resultset. Now the problem for me is in JSP i am getting that resultSet and their is no entries present in that resultset but in ejb results are there.

What went wrong. Please give the reasons and other possible solutions. I need urgently. Please reply me sir.

Thanks
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
NEVER return any JDBC entities.
They have no meaning at all except in the context they're retrieved in.
It's also a sure recipe for connection starvation on your database.

Rather parse the results into a Collection of DTOs in the EJB and return that.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!