RE: Partial collection problem

2003-07-09 Thread McCaffrey, John G.
Rob,
I have had this problem to, and posted all the info that I could to try to
diagnose the issue, to no avail. I ended up just coding a work around to get
what I needed.
I noticed that when I ran a query to get the count of expected objects, the
count I got back was right, but the collection was always n+1 (just as you
described). 
For the workaround I first get an enumeration of primary keys (because that
works as expected), then go through each of the referenced tables, and build
a hashmap of the rest of the objects that I need. Then I piece them together
at the end, and return a collection of 'Whole' objects. I think its actually
faster than the OJB code would have been, because its fewer trips to the DB.

I had to do this workaround, even though it is a little clunky, because we
are going to production soon, and I wasn't able to solve the original
Collection problem. I only have one class with a collection, so I only had
to do the workaround once. I am hoping that the issue gets resolved, because
I don't want to have to code any more OJB workarounds, and I don't want to
abandon OJB when we move to the next project.

Are you able to determine what the issue is?
Previous postings pointed to JBoss issues, but I have websphere and DB2 (my
issue could be my JDBC driver, I haven't tried any others).

It seemed to me that a resultSet was being closed early.

please post if you resolve the issue 

-John

-Original Message-
From: Rob Kischuk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 7:09 AM
To: 'OJB Users List'
Subject: RE: Partial collection problem


Thanks for the suggestion.  I built from the latest code in CVS last night,
and still had the same problem.

-Rob

-Original Message-
From: Armin Waibel [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 07, 2003 7:23 PM
To: OJB Users List
Subject: Re: Partial collection problem

Hi Rob,

I think this is an known issue, please try
latest CVS.

regards,
Armin

- Original Message -
From: Rob Kischuk [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 07, 2003 3:31 PM
Subject: RE: Partial collection problem


 This is a big problem - we have a collection of 200 items that we are
 retrieving, and the first query only retrieves a single item, with
each
 subsequent query retrieving one more item (e.g. - the fifth query
result has
 5 items).

 This seems to be either a very nasty error on my part, or a major bug.
Can
 anyone shed some additional light on this?  Is it a bug?  Is there a
 workaround?  This is a major showstopper for OJB on an application
we're
 working on, and could require some major rework.

 -Rob

 -Original Message-
 From: Rob Kischuk
 Sent: Thursday, July 03, 2003 9:43 AM
 To: '[EMAIL PROTECTED]'
 Subject: Partial collection problem

 I saw a discussion cross this list a while back regarding this same
problem,
 but with no solution.  The problem is this:  when I run a query to
load a
 collection of objects that contain other objects, the first call
retrieves
 only the first item in the collection.  The second call retrieves a
total of
 2 items, the third, a total of 3 items, and so on.  Obviously, the
correct
 functionality would be to have all of the items in the collection
retrieved
 on the first call.



 I described the issue in great detail as a part of Defect OJB172:

http://scarab.werken.com/issues/curmodule/120/tqk/0/template/ViewIssue.v
m/id
 /OJB172/issuelist/-1/issuelist/1/issuelist/OJB172

http://scarab.werken.com/issues/curmodule/120/tqk/0/template/ViewIssue.
vm/i
 d/OJB172/issuelist/-1/issuelist/1/issuelist/OJB172



 But it appears that the defect hasn't been touched since I entered it.
Is
 there a known fix or workaround for it?



 Thanks!

 Rob


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






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

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

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



Re: Partial collection problem

2003-07-09 Thread Jin Bal
I've had this problem too.

The issue is that the result set is being closed prematurely because the
eager-release attribute in the connection descriptor was set to true;

if you can try setting this to false.  I was able to do this without any
probs because I'nm using tomcat, the problem appeared because i tried to
port to jboss and changed the eager release setting.

cheers

Jin
- Original Message -
From: McCaffrey, John G. [EMAIL PROTECTED]
To: 'OJB Users List' [EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 3:46 PM
Subject: RE: Partial collection problem


 Rob,
 I have had this problem to, and posted all the info that I could to try to
 diagnose the issue, to no avail. I ended up just coding a work around to
get
 what I needed.
 I noticed that when I ran a query to get the count of expected objects,
the
 count I got back was right, but the collection was always n+1 (just as you
 described).
 For the workaround I first get an enumeration of primary keys (because
that
 works as expected), then go through each of the referenced tables, and
build
 a hashmap of the rest of the objects that I need. Then I piece them
together
 at the end, and return a collection of 'Whole' objects. I think its
actually
 faster than the OJB code would have been, because its fewer trips to the
DB.

 I had to do this workaround, even though it is a little clunky, because we
 are going to production soon, and I wasn't able to solve the original
 Collection problem. I only have one class with a collection, so I only had
 to do the workaround once. I am hoping that the issue gets resolved,
because
 I don't want to have to code any more OJB workarounds, and I don't want to
 abandon OJB when we move to the next project.

 Are you able to determine what the issue is?
 Previous postings pointed to JBoss issues, but I have websphere and DB2
(my
 issue could be my JDBC driver, I haven't tried any others).

 It seemed to me that a resultSet was being closed early.

 please post if you resolve the issue

 -John

 -Original Message-
 From: Rob Kischuk [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 09, 2003 7:09 AM
 To: 'OJB Users List'
 Subject: RE: Partial collection problem


 Thanks for the suggestion.  I built from the latest code in CVS last
night,
 and still had the same problem.

 -Rob

 -Original Message-
 From: Armin Waibel [mailto:[EMAIL PROTECTED]
 Sent: Monday, July 07, 2003 7:23 PM
 To: OJB Users List
 Subject: Re: Partial collection problem

 Hi Rob,

 I think this is an known issue, please try
 latest CVS.

 regards,
 Armin

 - Original Message -
 From: Rob Kischuk [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, July 07, 2003 3:31 PM
 Subject: RE: Partial collection problem


  This is a big problem - we have a collection of 200 items that we are
  retrieving, and the first query only retrieves a single item, with
 each
  subsequent query retrieving one more item (e.g. - the fifth query
 result has
  5 items).
 
  This seems to be either a very nasty error on my part, or a major bug.
 Can
  anyone shed some additional light on this?  Is it a bug?  Is there a
  workaround?  This is a major showstopper for OJB on an application
 we're
  working on, and could require some major rework.
 
  -Rob
 
  -Original Message-
  From: Rob Kischuk
  Sent: Thursday, July 03, 2003 9:43 AM
  To: '[EMAIL PROTECTED]'
  Subject: Partial collection problem
 
  I saw a discussion cross this list a while back regarding this same
 problem,
  but with no solution.  The problem is this:  when I run a query to
 load a
  collection of objects that contain other objects, the first call
 retrieves
  only the first item in the collection.  The second call retrieves a
 total of
  2 items, the third, a total of 3 items, and so on.  Obviously, the
 correct
  functionality would be to have all of the items in the collection
 retrieved
  on the first call.
 
 
 
  I described the issue in great detail as a part of Defect OJB172:
 
 http://scarab.werken.com/issues/curmodule/120/tqk/0/template/ViewIssue.v
 m/id
  /OJB172/issuelist/-1/issuelist/1/issuelist/OJB172
 
 http://scarab.werken.com/issues/curmodule/120/tqk/0/template/ViewIssue.
 vm/i
  d/OJB172/issuelist/-1/issuelist/1/issuelist/OJB172
 
 
 
  But it appears that the defect hasn't been touched since I entered it.
 Is
  there a known fix or workaround for it?
 
 
 
  Thanks!
 
  Rob
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 



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

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

Re: Partial collection problem

2003-07-07 Thread Armin Waibel
Hi Rob,

I think this is an known issue, please try
latest CVS.

regards,
Armin

- Original Message -
From: Rob Kischuk [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 07, 2003 3:31 PM
Subject: RE: Partial collection problem


 This is a big problem - we have a collection of 200 items that we are
 retrieving, and the first query only retrieves a single item, with
each
 subsequent query retrieving one more item (e.g. - the fifth query
result has
 5 items).

 This seems to be either a very nasty error on my part, or a major bug.
Can
 anyone shed some additional light on this?  Is it a bug?  Is there a
 workaround?  This is a major showstopper for OJB on an application
we're
 working on, and could require some major rework.

 -Rob

 -Original Message-
 From: Rob Kischuk
 Sent: Thursday, July 03, 2003 9:43 AM
 To: '[EMAIL PROTECTED]'
 Subject: Partial collection problem

 I saw a discussion cross this list a while back regarding this same
problem,
 but with no solution.  The problem is this:  when I run a query to
load a
 collection of objects that contain other objects, the first call
retrieves
 only the first item in the collection.  The second call retrieves a
total of
 2 items, the third, a total of 3 items, and so on.  Obviously, the
correct
 functionality would be to have all of the items in the collection
retrieved
 on the first call.



 I described the issue in great detail as a part of Defect OJB172:

http://scarab.werken.com/issues/curmodule/120/tqk/0/template/ViewIssue.v
m/id
 /OJB172/issuelist/-1/issuelist/1/issuelist/OJB172

http://scarab.werken.com/issues/curmodule/120/tqk/0/template/ViewIssue.
vm/i
 d/OJB172/issuelist/-1/issuelist/1/issuelist/OJB172



 But it appears that the defect hasn't been touched since I entered it.
Is
 there a known fix or workaround for it?



 Thanks!

 Rob


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






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