0 Replies Latest reply on Nov 4, 2009 11:24 AM by null null

    attach list to pojocache

    null null Newbie

      I am working with PojoCache version: JBossCache 'Cascabel' 3.1.0.GA
      on a WebLogic Server 10.0 server.
      I am using the JBossPojoCache for caching the results of SAP requests.
      When I get a result of a SAP request I put the result objects as a collection into a query object, which contains the query parameters and the result objects.

      1. Get the result objects from the query
      2. attach each result object to the cache and retrieve the aop wrapper object for it.
      3. set the list of aop wrapper objects to the query result list
      4. attach the query object to the cache

       String cacheKey = query.getCacheKey().toUpperCase();
       ArrayList<IVObject> resultList = new ArrayList<IValueObject>();
       ArrayList<IVObject> objects = query.getResult();
       query.setResult(new ArrayList<IValueObject>());
       for (IVObject resultListObject: objects) {
       pojoCache.attach(cacheKey, query); //this line causes my problem

      So far this works fine for low laod: the single result objects and the query are cached and can be retrieved from the cache on later requests.
      But under medium load it crashes.
      I receive a cache exception telling me:

      2009-10-29 14:39:25,169 WARN [org.jboss.cache.pojo.impl.PojoCacheImpl] ([ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)') Could not rollback transaction!
      java.lang.IllegalStateException: Cannot mark the transaction for rollback. xid=BEA1-2CA6163247748181CB68, status=Rolled back. [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out after 120 seconds

      This exception is thrown always at the same line of code
      pojoCache.attach(cacheKey, query);

      Any idea where I am going wrong?? Please advise.

      To complete matters, here is my cache configuration:

       <!-- Configure the TransactionManager -->
       <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
       <jmxStatistics enabled="false"/>
       wakeUpInterval: time interval (millis) when the eviction thread kicks in.
       <eviction wakeUpInterval="5000">
       Cache wide defaults
       default algorithmClass: if an algorithm class is not specified for a region, this one is used by default.
       default eventQueueSize if an event queue size is not specified for a region, this one is used by default.
       <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="2000000">
       <property name="maxNodes" value="8500000" />
       <property name="timeToLive" value="7200000" />
       <property name="maxAge" value="7200000" />
       <!-- configurations for various regions-->
       <region name="/_default_">
       <property name="maxNodes" value="8500000" />
       <property name="timeToLive" value="7200000" />
       <property name="maxAge" value="7200000" />