I'm currently running OpenMRS 1.7, and I'm seeing an intermittent issue across 
Hibernate sessions in our CHICA code:


1.       Session one inserts a new PatientState (CHICA specific table/object).

2.       A new thread is created to do some processing on the PatientState.  
The patient state ID is passed to the thread.

3.       Session two is created in the new thread and tries to get a 
PatientState object based on the patient state ID.

4.       The PatientState object is coming back null.

It seems as though session one has not committed the new patient state and 
session two is trying to access it.  What is the best Hibernate mechanism to 
use to ensure the patient state is committed to the database before session two 
tries to access it?  Keep in mind the PatientState object is being accessed 
outside the DAO layer.

Thanks,
Steve


_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-devel-l" in the  body (not 
the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

Reply via email to