Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

question about relationship cache?

 
Robert Strong
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Paymon Asadinia
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
make sure you have all the service packs installed for weblogic 8.1
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!