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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]