3 Replies Latest reply on Dec 9, 2012 9:05 AM by bondchan921

    what's the defination of inactivity (timeout from inactivity to removal SFSB by container)

    bondchan921

      Hi All,

       

       

      I'm wondring to know what event is call inactivity? out of a transaction or last invocation been made, in my following test, throw NoSuchObjectException. So the event of inactiveity should be last invocation been made ?

      can someone confirm this ?

       

       

      my test:

       

       

      FinancialInstrumentLoaderRemote -> it's a SFSB interface, this SFSB's container have been configed as follow:

       

      <container-cache-conf>

              <cache-policy>org.jboss.ejb.plugins.LRUStatefulContextCachePolicy</cache-policy>

              <cache-policy-conf>

                <min-capacity>100</min-capacity>

                <max-capacity>10000</max-capacity>

                <remover-period>1</remover-period>

                <max-bean-life>70</max-bean-life>

                <overager-period>1</overager-period>

                <max-bean-age>60</max-bean-age>

                <resizer-period>1</resizer-period>

                <max-cache-miss-period>1</max-cache-miss-period>

                <min-cache-miss-period>1</min-cache-miss-period>

                <cache-load-factor>0.75</cache-load-factor>

              </cache-policy-conf>

            </container-cache-conf>

       

       

       

      From my test,

       

       

       

      void test(){

       

        .....

        FinancialInstrumentLoaderRemote loader = getLoader(fid.getType()); /// the SFSB, created from Home interface

       

      //sleep 2 minutes to make sure the max-bean-age time have been passed

          try {

              Thread.sleep(2 *60 * 1000);

          } catch (InterruptedException e) {

       

         }

       

         FinancialInstrument result = loader.getFinancialInstrument(new HistoryKey(fid.getFinancialInstrumentId(), fid.getTimeStamp(), fid.getHistoryId()), fid.getName(), baseDateForEffectiveDate, baseDateForEffectiveDate, atTimeStamp);  //// throw NoSuchObjectException here, but my concern is the loader is still inside a transaction, why been deleted ?

       

       

      }