Bugs item #463320, was opened at 2001-09-20 13:09
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=463320&group_id=22866

Category: JBossCMP
Group: v2.4 (stable)
Status: Open
Resolution: None
Priority: 8
Submitted By: Tejaswi Kasturi (zedmanauk)
>Assigned to: Andreas Schaefer (schaefera)
Summary: Finders not seeing updates

Initial Comment:
I'm seeing this problem with JBoss 2.4.1 (and 2.4.1a
and 2.2.2). This problem does NOT occur in 2.4.0, which
leads me to believe it was fixed and then broke again:

(This is all with CMP)

(1) Start a TX
(2) Update data on a bean (call it A, class MyBean)
(for ex., set LinkID to 2 where it was 1 before)
(3) Run a finder to retrieve all the MyBeans which
match a certain criteria. (for ex., find all MyBeans
where LinkID = 1).

The finder shows the state of the beans before the
update (for ex. the retrieved list still includes A,
even though its LinkID has changed and is no longer
equal to 1), even though it is in the same TX as the
update. I should see the state of the table after the
update.

 JBoss 3.0.0alpha as of 9/20/2001 also has the correct
behavior, like 2.4.0. Here's a snippet of code that I'm
running in a transaction:


public void go(long ID, long linkID) {
try {
EJBTest ejbtest = getEJBTest(ID);
long origLinkID = ejbtest.getLinkID();
ejbtest.setLinkID(linkID);

Collection coll = getEJBTestByLinkID(origLinkID);
for (Iterator i = coll.iterator(); i.hasNext(); ) {
EJBTest test = (EJBTest) i.next();

System.out.println("ID: " + test.getID() + " linkID: "
+ test.getLinkID());
}
}
catch ...
}

getEJBTest and getEJBTestByLinkID just invoke the
appropriate finders.

Starting with two entries:
ID=1, LinkID=1
ID=2, LinkID=1

I run go in a tx with parameters (1, 2).
In JBoss 2.4.0 (and 3.0.0alpha), the println returns:
ID: 2 linkID: 1
as it should
In JBoss 2.4.1 (and 2.4.1a) it returns:
ID: 1 linkID: 2
ID: 2 linkID: 1

which means the finder is not working correctly.


I've attached my jar file with the beans and source.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=463320&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to