portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject cvs commit: jakarta-jetspeed-2/components/persistence/src/java/org/apache/jetspeed/components/persistence/store/impl DefaultPersistenceStoreContainer.java
Date Tue, 09 Mar 2004 16:14:31 GMT
weaver      2004/03/09 08:14:31

  Modified:    components/persistence/src/java/org/apache/jetspeed/components/persistence/store/impl
                        DefaultPersistenceStoreContainer.java
  Log:
  added started flag to avoid IllegalStateException from Pico
  
  Revision  Changes    Path
  1.6       +22 -13    jakarta-jetspeed-2/components/persistence/src/java/org/apache/jetspeed/components/persistence/store/impl/DefaultPersistenceStoreContainer.java
  
  Index: DefaultPersistenceStoreContainer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/persistence/src/java/org/apache/jetspeed/components/persistence/store/impl/DefaultPersistenceStoreContainer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultPersistenceStoreContainer.java	8 Mar 2004 00:46:35 -0000	1.5
  +++ DefaultPersistenceStoreContainer.java	9 Mar 2004 16:14:31 -0000	1.6
  @@ -53,6 +53,8 @@
       private int storeTTL;
       
       private int checkInterval;
  +    
  +    private boolean started=false;
   
       private static final Log log = LogFactory.getLog(DefaultPersistenceStoreContainer.class);
   
  @@ -394,19 +396,26 @@
        */
       public void start()
       {
  -        super.start();
  -        
  -        storeLastUsed = new HashMap();
  -        //		default to 15 seconds of inactivity, after which the broker is recalimed to
the pool
  -        
  -        log.info("PersistenceStore Time To Live set to " + storeTTL);
  -                log.info("PersistenceStore will be checked for inactivity every " + (checkInterval
/ 1000) + " seconds.");
  -
  -        InactivityMonitor monitor = new InactivityMonitor(storeTTL, checkInterval);
  -        monitor.setDaemon(true);
  -        monitor.setPriority(Thread.MIN_PRIORITY);
  -       // monitor.setContextClassLoader(Thread.currentThread().getContextClassLoader());
  -        monitor.start();
  +        if (!started)
  +        {
  +            super.start();
  +
  +            storeLastUsed = new HashMap();
  +            //		default to 15 seconds of inactivity, after which the broker is
  +            // recalimed to the pool
  +
  +            log.info("PersistenceStore Time To Live set to " + storeTTL);
  +            log.info("PersistenceStore will be checked for inactivity every "
  +                    + (checkInterval / 1000) + " seconds.");
  +
  +            InactivityMonitor monitor = new InactivityMonitor(storeTTL,
  +                    checkInterval);
  +            monitor.setDaemon(true);
  +            monitor.setPriority(Thread.MIN_PRIORITY);
  +            // monitor.setContextClassLoader(Thread.currentThread().getContextClassLoader());
  +            monitor.start();
  +            started=true;
  +        }
       }
   
   	/**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message