GeeCON Prague 2014*
The moose likes Websphere and the fly likes Passing ResultSet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Websphere
Bookmark "Passing ResultSet " Watch "Passing ResultSet " New topic
Author

Passing ResultSet

Chandrakanth Belde
Greenhorn

Joined: Dec 01, 2004
Posts: 15
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

Joined: May 26, 2003
Posts: 30596
    
154

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Sean Sullivan
Ranch Hand

Joined: Sep 09, 2001
Posts: 427
Read this article:

http://www.onjava.com/pub/a/onjava/2004/06/23/cachedrowset.html
Chandrakanth Belde
Greenhorn

Joined: Dec 01, 2004
Posts: 15
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

Joined: May 26, 2003
Posts: 30596
    
154

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

Joined: Dec 01, 2004
Posts: 15
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.
 
 
subject: Passing ResultSet