Hello,
Anthony IVETAC wrote:
> Something weird is happening to the entity beans in my database. I have a Java
> Management Bean 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".
1) Do you mean that this application updating the database is running outside the
EJB server, i.e. the "Bean" you mention is not an EJB ? right ?
>
>
> 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.
2) What do you mean by "look at the entity bean attribute values with simple SQL
queries" ? Is it still accessing the database outside the EJB server ?
If answers to 1) and 2) are "yes", we come back to a discussion between Philippe
and Markus on this list, about accessing the database both from the EJB server and
from an external application. However in your case the solution seems simple, i.e.
if you perform your getXXX() method on your entity bean within a transaction
(starting after the one performed by your "management bean" for updating the
database), the data should be read from the database and you should get the
up-to-date values ... for example try to set the transactional attributes of your
getXXX methods to "requires_new" in the deployment descriptors ...
Best regards,
Fran�ois
>
>
> 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!!!!
>
> ----
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body of the message "unsubscribe jonas-users".
> For general help, send email to [EMAIL PROTECTED] and
> include in the body of the message "help".
--
==================================================================
Fran�ois EXERTIER Evidian (Groupe Bull)
1, rue de Provence, BP 208, 38432 Echirolles cedex, FRANCE
mailto:[EMAIL PROTECTED]
http://www.evidian.com/jonas http://www.objectweb.org/jonas
Tel: +33 (0)4 76 29 71 51 - Fax: +33 (0)4 76 29 77 30
==================================================================
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".