Thanks for your responses.

I am currently not interacting with DB. Will ofcourse be soon.

But as I mentioned earliar I am creating an object which I am planning to instanciate for each row of data. When I told about this to my team they were concerned about the objects being in memory and advised to use the resultset directly. In the sessionbean probably we can create these rowobjects before it's sent to the webserver.

from your advise using resultset is not a good idea. I was looking for these kind of answers.

Thanks again.


From: Dave Newton <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
To: Struts Users Mailing List <user@struts.apache.org>
Subject: [OT] Re: design question
Date: Mon, 30 Jan 2006 11:42:10 -0500

fea jabi wrote:
> can anyone help me understand this?
Don't know.
>> I am creating instances of this Object and making a List which is
>> getting displayed in the JSP.
>>
>> I was told that instead of creating Object and creating instances,
>> one can directly use the result set got from the DB and iterate thru
>> it to fill the tables.
>>
>> Which one is more efficient way to do? Is the second approach better?
>> if so why?
Efficiency-wise? Depends on where you want your efficiency. You can use
a ResultSet directly, but you must keep the statement (and connection?)
open while using it, which might lead to number-of-connection issues.

In general, I have pretty strong feelings against using "raw" ResultSets
despite the overhead of copying data... anything other than raw JDBC
will see the same behavior whether it's a full ORM or something as
simple as a RowSetDynaClass (from Jakarta BeanUtils).

Of course, I have no idea how you're currently interacting with the DB,
so it's hard to say.

Dave



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee® Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to