File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing ResultSet

 
Chandrakanth Belde
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to know whether it is possible to pass ResultSet from one EJB to another EJB through local EJB call only.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33694
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chandrakanth,
In theory, a ResultSet is just another object that can be passed anywhere. However, it is poor design to pass around a ResultSet as a parameter. It would be better to loop through the resultset, get the data and pass the data.
 
Sean Sullivan
Ranch Hand
Posts: 427
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read this article:

http://www.onjava.com/pub/a/onjava/2004/06/23/cachedrowset.html
 
Chandrakanth Belde
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky,

Thanks for your reply.I am doing porting work of our product onto WAS 6.0.0.1. In the code it is returning the resultset back and then in the rest of the code it is been used directly.

I have checked after you have suggested to use any util class to handle the resultset but after checking the rest of the logic I got to know that resultset is being used directly in the rest of the code. Now, i am scared of the regression issue to alter the data structure as it is working fine in the rest of the servers like SunOne App Server.

I request you to provide me any other alternative specific to websphere as it is concerned to websphere issue.

Thanks in advance..
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33694
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chandrakanth,
If the code is already written, it's ok to leave it. At least for now. Is there a problem passing the result set in WAS 6? As I said, it should work. At least in theory ...
 
Chandrakanth Belde
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky ,

It is not coming when it returned from the other EJB it is closed. Now I am trying with com.sun.rowset.CachedRowSetImpl class which is in J2SE 1.5

But I am thinking about regreesion issue as i have to change the code if Websphere is selected insisted of other AppServer.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic