Hi all,
I am using EHCache provider for hibernate caching.
My code is working very fine with cache.
Cache used for my application is read-write.
I am using load() statements to retrieve the data from oracle database.
But the problem is when i am trying to retrieve the data for second time, I am not able to get latest updated data from database. I am using session pool mechanism.Session can't retrive latest submission object from database for an application.
Could anyone please h\give me the soultion for this?
My sample class:
<class name="Application" table="APPLICATION" dynamic-
update="true">
<cache usage="read-write"/>
<id name="applicationID" type="string" unsaved-
value="null">
<column name="APPLICATION_ID" sql-type="varchar2
(32)" />
</id>
<property name="agencyNumber">
<column name="AGENCY_NUMBER" sql-type="varchar2
(64)" />
</property>
<property name="applicationTypeID">
<column name="TYPE_ID" sql-type="varchar2(32)" />
</property>
<set name="submissions" table="Submission" inverse="false"
cascade="all" lazy="false">
<cache usage="read-write"/>
<key column="APPLICATION_ID" />
<one-to-many class="com.dfi.eCTD.Submission" />
</set>
</class>
Thanks and regards,
Sreekanth
|