• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Passing ResultSet

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 427
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic