[jboss-user] [JBoss Seam] - Entity Property Not Up-To-Date

xtia004 do-not-reply at jboss.com
Sun Apr 1 06:41:05 EDT 2007


It looks like a hibernate related topic, but I encountered it when developing using Seam and easy to describe with it. So I'd like to put it on here first.

I have two SFSB, say A and B, both have an extended EntityManager em. A retrieves a list of entity Invoice. B retrieve a list of entity InvoiceMail. InvoiceMail has a property invoice that can navigate to Invoice by many-to-one.

First a list of invoice is retrieved. If any invoices are in "To Post" status, then the list of InvoiceMail is retrieved. There is a button say "Already Sent" beside an InvoiceMail, for any invoices have already been posted, click the button and navigate to the invoice and update its status to "Sent" with a method at SFSB B.

The problem is that when the query to retrieve Invoice at SFSB A is executed again, the invoices are still in "To Post" status. Now we temporary solve it by using em.clear() at SFSB A before executing the query. It seems that the Invoices were cached but not updated accordingly within the same session. We hope the invoices either cached and updated to the latest status or not cached at all. How to work around this? We are on jboss-4.0.5.GA and jboss-sean-1.1.0.GA.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033514#4033514

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033514



More information about the jboss-user mailing list