User: jules_gosnell
Date: 02/01/31 16:32:24
Modified: jetty/src/main/org/jboss/jetty
JBossWebApplicationContext.java Jetty.java
JettyService.java JettyServiceMBean.java
Log:
some way further to configurable snapshot strategies and intervals,
Revision Changes Path
1.18 +9 -3
contrib/jetty/src/main/org/jboss/jetty/JBossWebApplicationContext.java
Index: JBossWebApplicationContext.java
===================================================================
RCS file:
/cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/JBossWebApplicationContext.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- JBossWebApplicationContext.java 2002/01/22 21:03:03 1.17
+++ JBossWebApplicationContext.java 2002/02/01 00:32:24 1.18
@@ -5,7 +5,7 @@
* See terms of license at gnu.org.
*/
-// $Id: JBossWebApplicationContext.java,v 1.17 2002/01/22 21:03:03 jules_gosnell
Exp $
+// $Id: JBossWebApplicationContext.java,v 1.18 2002/02/01 00:32:24 jules_gosnell
Exp $
// A Jetty HttpServer with the interface expected by JBoss'
// J2EEDeployer...
@@ -52,7 +52,9 @@
String warUrl,
String webDefaults,
boolean unpackWars,
- String distributedStoreImpl)
+ String storageStrategy,
+ String snapshotFrequency,
+ String notificationPolicy)
throws java.io.IOException
{
super(httpServer, contextPathSpec, warUrl, webDefaults, unpackWars);
@@ -62,7 +64,11 @@
_webApp = webApp;
_parser = parser;
- getServletHandler().setSessionManager(new DistributedHttpSessionManager(this,
distributedStoreImpl));
+ getServletHandler().
+ setSessionManager(new DistributedHttpSessionManager(this,
+ storageStrategy,
+ snapshotFrequency,
+ notificationPolicy));
}
/* ------------------------------------------------------------ */
1.35 +46 -8 contrib/jetty/src/main/org/jboss/jetty/Jetty.java
Index: Jetty.java
===================================================================
RCS file: /cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/Jetty.java,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- Jetty.java 2002/01/22 21:03:03 1.34
+++ Jetty.java 2002/02/01 00:32:24 1.35
@@ -5,7 +5,7 @@
* See terms of license at gnu.org.
*/
-// $Id: Jetty.java,v 1.34 2002/01/22 21:03:03 jules_gosnell Exp $
+// $Id: Jetty.java,v 1.35 2002/02/01 00:32:24 jules_gosnell Exp $
// A Jetty HttpServer with the interface expected by JBoss'
// J2EEDeployer...
@@ -35,7 +35,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Julian Gosnell</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Andreas Schaefer</a>.
- * @version $Revision: 1.34 $
+ * @version $Revision: 1.35 $
*
* <p><b>Revisions:</b>
*
@@ -147,21 +147,57 @@
// distributedStore property
//----------------------------------------
- String _distributedStore;
+ String _storageStrategy;
public synchronized void
- setDistributedStore(String distributedStore)
+ setHttpSessionStorageStrategy(String storageStrategy)
{
- _distributedStore=distributedStore;
+ _storageStrategy=storageStrategy;
}
public synchronized String
- getDistributedStore()
+ getHttpSessionStorageStrategy()
{
- return _distributedStore;
+ return _storageStrategy;
}
//----------------------------------------
+ // snapshotFrequency property
+ //----------------------------------------
+
+ String _snapshotFrequency;
+
+ public synchronized void
+ setHttpSessionSnapshotFrequency(String snapshotFrequency)
+ {
+ _snapshotFrequency=snapshotFrequency;
+ }
+
+ public synchronized String
+ getHttpSessionSnapshotFrequency()
+ {
+ return _snapshotFrequency;
+ }
+
+ //----------------------------------------
+ // snapshotNotificationPolicy property
+ //----------------------------------------
+
+ String _snapshotNotificationPolicy;
+
+ public synchronized void
+ setHttpSessionSnapshotNotificationPolicy(String snapshotNotificationPolicy)
+ {
+ _snapshotNotificationPolicy=snapshotNotificationPolicy;
+ }
+
+ public synchronized String
+ getHttpSessionSnapshotNotificationPolicy()
+ {
+ return _snapshotNotificationPolicy;
+ }
+
+ //----------------------------------------
// configuration property
//----------------------------------------
@@ -221,7 +257,9 @@
WebApplicationContext app=
new JBossWebApplicationContext(this, contextPath, descriptorParser, wa,
_parser,
fixedWarUrl, getWebDefault(), getUnpackWars(),
- getDistributedStore());
+ getHttpSessionStorageStrategy(),
+ getHttpSessionSnapshotFrequency(),
+ getHttpSessionSnapshotNotificationPolicy());
String virtualHost=null;
addContext(virtualHost, app);
1.39 +65 -11 contrib/jetty/src/main/org/jboss/jetty/JettyService.java
Index: JettyService.java
===================================================================
RCS file: /cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/JettyService.java,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- JettyService.java 2002/01/22 21:03:03 1.38
+++ JettyService.java 2002/02/01 00:32:24 1.39
@@ -5,7 +5,7 @@
* See terms of license at gnu.org.
*/
-// $Id: JettyService.java,v 1.38 2002/01/22 21:03:03 jules_gosnell Exp $
+// $Id: JettyService.java,v 1.39 2002/02/01 00:32:24 jules_gosnell Exp $
//------------------------------------------------------------------------------
@@ -33,7 +33,7 @@
* A service to launch jetty from JMX.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Julian Gosnell</a>
- * @version $Revision: 1.38 $
+ * @version $Revision: 1.39 $
*/
// NOTES
@@ -137,7 +137,9 @@
tmp.setJettyHome(getJettyHome());
tmp.setWebDefault(getWebDefault());
tmp.setUnpackWars(getUnpackWars());
- tmp.setDistributedStore(getDistributedStore());
+ tmp.setHttpSessionStorageStrategy(getHttpSessionStorageStrategy());
+ tmp.setHttpSessionSnapshotFrequency(getHttpSessionSnapshotFrequency());
+
tmp.setHttpSessionSnapshotNotificationPolicy(getHttpSessionSnapshotNotificationPolicy());
_jetty=tmp; // now we are initialised.
@@ -380,28 +382,80 @@
//----------------------------------------------------------------------------
- protected String
_distributedStore="org.jboss.jetty.session.CoarseDistributedStore";
+ protected String
_storageStrategy="org.jboss.jetty.session.CoarseDistributedStore";
public String
- getDistributedStore()
+ getHttpSessionStorageStrategy()
{
if (isInitialised())
- return _jetty.getDistributedStore();
+ return _jetty.getHttpSessionStorageStrategy();
else
- return _distributedStore;
+ return _storageStrategy;
}
public void
- setDistributedStore(String distributedStore)
+ setHttpSessionStorageStrategy(String storageStrategy)
{
if (_log.isDebugEnabled()) {
- _log.debug("set DistributedStore to "+distributedStore);
+ _log.debug("set HttpSessionStorageStrategy to "+storageStrategy);
}
if (isInitialised())
- _jetty.setDistributedStore(distributedStore);
+ _jetty.setHttpSessionStorageStrategy(storageStrategy);
else
- _distributedStore=distributedStore;
+ _storageStrategy=storageStrategy;
+ }
+
+ //----------------------------------------------------------------------------
+
+ protected String _snapshotFrequency="none";
+
+ public String
+ getHttpSessionSnapshotFrequency()
+ {
+ if (isInitialised())
+ return _jetty.getHttpSessionSnapshotFrequency();
+ else
+ return _snapshotFrequency;
+ }
+
+ public void
+ setHttpSessionSnapshotFrequency(String snapshotFrequency)
+ {
+ if (_log.isDebugEnabled()) {
+ _log.debug("set HttpSessionSnapshotFrequency to "+snapshotFrequency);
+ }
+
+ if (isInitialised())
+ _jetty.setHttpSessionSnapshotFrequency(snapshotFrequency);
+ else
+ _snapshotFrequency=snapshotFrequency;
+ }
+
+ //----------------------------------------------------------------------------
+
+ protected String _snapshotNotificationPolicy="neither";
+
+ public String
+ getHttpSessionSnapshotNotificationPolicy()
+ {
+ if (isInitialised())
+ return _jetty.getHttpSessionSnapshotNotificationPolicy();
+ else
+ return _snapshotNotificationPolicy;
+ }
+
+ public void
+ setHttpSessionSnapshotNotificationPolicy(String snapshotNotificationPolicy)
+ {
+ if (_log.isDebugEnabled()) {
+ _log.debug("set HttpSessionSnapshotNotificationPolicy to
"+snapshotNotificationPolicy);
+ }
+
+ if (isInitialised())
+ _jetty.setHttpSessionSnapshotNotificationPolicy(snapshotNotificationPolicy);
+ else
+ _snapshotNotificationPolicy=snapshotNotificationPolicy;
}
//----------------------------------------------------------------------------
1.12 +9 -3 contrib/jetty/src/main/org/jboss/jetty/JettyServiceMBean.java
Index: JettyServiceMBean.java
===================================================================
RCS file:
/cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/JettyServiceMBean.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- JettyServiceMBean.java 2002/01/22 21:03:03 1.11
+++ JettyServiceMBean.java 2002/02/01 00:32:24 1.12
@@ -13,7 +13,7 @@
* ???
*
* @author <a href="mailto:[EMAIL PROTECTED]">Sebastien Alborini</a>
- * @version $Revision: 1.11 $
+ * @version $Revision: 1.12 $
*/
public interface JettyServiceMBean
extends org.jboss.web.AbstractWebContainerMBean
@@ -35,8 +35,14 @@
String getWebDefault();
void setWebDefault(String webDefault);
- String getDistributedStore();
- void setDistributedStore(String distributedStore);
+ String getHttpSessionStorageStrategy();
+ void setHttpSessionStorageStrategy(String storageStrategy);
+
+ String getHttpSessionSnapshotFrequency();
+ void setHttpSessionSnapshotFrequency(String snapshotFrequency);
+
+ String getHttpSessionSnapshotNotificationPolicy();
+ void setHttpSessionSnapshotNotificationPolicy(String snapshotNotificationPolicy);
void setJettyHome(String jettyHome);
String getJettyHome();
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development