Forums Register Login

question about relationship cache?

+Pie Number of slices to send: Send
hi, I'm using BEA weblogic8.1 for my enterprise application, which include a web module and an EJB module(using Local interface).

for CMP entity bean, optimistic concurrency control, application-level combined cache is used, finders-load-bean is set true and relationship cache is used.

my problem is that for relationship cache, I cannot prefetch multiple relationships together. my configuration is like below:

in weblogic-ejb-jar.xml

<entity-cache-ref>
<entity-cache-name>BigCache</entity-cache-name>
<concurrency-strategy>Optimistic</concurrency-strategy>
</entity-cache-ref>

in weblogic-cmp-dbms-jar.xml

<relationship-caching>
<caching-name>withreservation</caching-name>
<caching-element>
<cmr-field>reservationCMPList</cmr-field>
</caching-element>
<caching-element>
<cmr-field>guestprofileCMP</cmr-field>
</caching-element>
</relationship-caching>
<weblogic-query>
<query-method>
<method-name>findReservationsByRoomtype</method-name>
<method-params>
<method-param>int</method-param>
</method-params>
</query-method>
<caching-name>withreservation</caching-name>
</weblogic-query>

when I call finder method:findReservationsByRoomtype, I'd receive the following error:

javax.ejb.TransactionRolledbackLocalException: EJB Exception:: weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Assertion violated ]
at weblogic.utils.Debug.assertion(Debug.java:47)
at com.bigrez.ejb.entity.GuestprofileCMP_xjug9c__WebLogic_CMP_RDBMS_reservationCMPList_Set.doAddToCache(GuestprofileCMP_xjug9c__WebLogic_CMP_RDBMS_reservationCMPList_Set.java:241)
at com.bigrez.ejb.entity.GuestprofileCMP_xjug9c__WebLogic_CMP_RDBMS.__WL_add__WL_reservationCMPList_field_(GuestprofileCMP_xjug9c__WebLogic_CMP_RDBMS.java:1003)
at com.bigrez.ejb.entity.ReservationCMP_j83y9w__WebLogic_CMP_RDBMS.ejbFindReservationsByRoomtype(ReservationCMP_j83y9w__WebLogic_CMP_RDBMS.java:1683)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.collectionFinder(RDBMSPersistenceManager.java:378)
at weblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityManager.java:1787)
at weblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityManager.java:1759)
at weblogic.ejb20.internal.EntityEJBLocalHome.finder(EntityEJBLocalHome.java:466)
at com.bigrez.ejb.entity.ReservationCMP_j83y9w_LocalHomeImpl.findReservationsByRoomtype(ReservationCMP_j83y9w_LocalHomeImpl.java:186)


if I change the configuration to prefetch only 1 relationship like below, it'd work fine
<relationship-caching>
<caching-name>withreservation</caching-name>
<caching-element>
<cmr-field>reservationCMPList</cmr-field>
</caching-element>
</relationship-caching>

any one here could help me out?
+Pie Number of slices to send: Send
make sure you have all the service packs installed for weblogic 8.1
It's feeding time! Give me the food you were going to give to this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 712 times.
Similar Threads
A Simple CMP Bean deployment problem in Bea WebLogic 8.0
A Simple CMP Bean deployment problem in Bea WebLogic 8.0
Urgent: Problem with JNDI and data source
Need help with understanding the link between jndi and data source
Problem with jndi and data source
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 10:02:07.