This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes OutDated Entity Bean Attribute Values!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "OutDated Entity Bean Attribute Values!!!" Watch "OutDated Entity Bean Attribute Values!!!" New topic
Author

OutDated Entity Bean Attribute Values!!!

1cuervo
Greenhorn

Joined: Aug 17, 2001
Posts: 1
Something weird is happening to the entity beans in my database. I have a MBean which scans through all the rows in my database and makes changes under certain conditions (i won't bore you with them). e.g. Changing status="processing" to status="ready".
The changes are certainly visible when I look at the entity bean attribute values with simple SQL queries, but when I get a simple client to return the value with an entity bean getXXX() method, it retruns the OLD value, no matter how long I wait.
When I restart the server, I finally get the correct, updated value.
Could somebody please tell me how I can get the updated value without having to restart the server?
It seems that the beans get activated at server startup and never refresh their up-to-date attribute values before being passivated at server shutdown.
is there some ejb-jar.xml attribute i can modify so that entity beans refresh their attribute values constantly?
Thanks very much for your help!!!
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, which you agreed to when you registered, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.

I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: OutDated Entity Bean Attribute Values!!!
 
Similar Threads
how to change values in servlet context
Extremely strange behaviour in my entity beans create method, please help!!
Changes made in Database not Reflected in Entity
JPA update not available to some successive queries
My SCEA Part 1Study Notes