[jboss-cvs] JBossAS SVN: r91235 - branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jul 14 13:24:26 EDT 2009
Author: bstansberry at jboss.com
Date: 2009-07-14 13:24:26 -0400 (Tue, 14 Jul 2009)
New Revision: 91235
Modified:
branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers/DeployerConfig.java
branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployer.java
branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java
Log:
[JBAS-7054] Allow configuring of Manager for distributable webapps via context.xml
Modified: branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers/DeployerConfig.java
===================================================================
--- branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers/DeployerConfig.java 2009-07-14 16:51:49 UTC (rev 91234)
+++ branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers/DeployerConfig.java 2009-07-14 17:24:26 UTC (rev 91235)
@@ -119,6 +119,8 @@
/** FQN of the SecurityContext Class */
private String securityContextClassName;
+
+ private boolean overrideDistributableManager = true;
public ClassLoader getServiceClassLoader()
{
@@ -311,4 +313,40 @@
{
this.sharedMetaData = sharedMetaData;
}
+
+ /**
+ * Gets whether the session <code>Manager</code> implementation for
+ * distributable webapps should be overridden with an instance of
+ * {@link #getManagerClass()}.
+ * <p>
+ * Setting this to <code>false</code> allows custom configuration of
+ * a manager via a <code>context.xml</code>. Default is <code>true</code>.
+ * </p>
+ *
+ * @return <code>true</code> if the manager should be overridden,
+ * <code>false</code> if the existing manager should be retained.
+ */
+ public boolean getOverrideDistributableManager()
+ {
+ return overrideDistributableManager;
+ }
+
+ /**
+ * Sets whether the session <code>Manager</code> implementation for
+ * distributable webapps should be overridden with an instance of
+ * {@link #getManagerClass()}.
+ * <p>
+ * Setting this to <code>false</code> allows custom configuration of
+ * a manager via a <code>context.xml</code>. Default is <code>true</code>.
+ * </p>
+ *
+ * @param override <code>true</code> if the manager should be overridden,
+ * <code>false</code> if the existing manager should be retained.
+ */
+ public void setOverrideDistributableManager(boolean override)
+ {
+ this.overrideDistributableManager = override;
+ }
+
+
}
Modified: branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployer.java
===================================================================
--- branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployer.java 2009-07-14 16:51:49 UTC (rev 91234)
+++ branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployer.java 2009-07-14 17:24:26 UTC (rev 91235)
@@ -90,6 +90,9 @@
* to true.
*/
protected String managerClass = "org.jboss.web.tomcat.service.session.JBossCacheManager";
+
+ /** Whether to override the Manager impl for distributable webapps */
+ private boolean overrideDistributableManager = true;
/**
* A flag indicating if the JBoss Loader should be used
@@ -169,6 +172,40 @@
this.managerClass = managerClass;
}
+ /**
+ * Gets whether the session <code>Manager</code> implementation for
+ * distributable webapps should be overridden with an instance of
+ * {@link #getManagerClass()}.
+ * <p>
+ * Setting this to <code>false</code> allows custom configuration of
+ * a manager via a <code>context.xml</code>. Default is <code>true</code>.
+ * </p>
+ *
+ * @return <code>true</code> if the manager should be overridden,
+ * <code>false</code> if the existing manager should be retained.
+ */
+ public boolean getOverrideDistributableManager()
+ {
+ return this.overrideDistributableManager;
+ }
+
+ /**
+ * Sets whether the session <code>Manager</code> implementation for
+ * distributable webapps should be overridden with an instance of
+ * {@link #getManagerClass()}.
+ * <p>
+ * Setting this to <code>false</code> allows custom configuration of
+ * a manager via a <code>context.xml</code>. Default is <code>true</code>.
+ * </p>
+ *
+ * @param override <code>true</code> if the manager should be overridden,
+ * <code>false</code> if the existing manager should be retained.
+ */
+ public void setOverrideDistributableManager(boolean override)
+ {
+ this.overrideDistributableManager = override;
+ }
+
public ClassLoader getServiceClassLoader()
{
return serviceClassLoader;
@@ -427,6 +464,7 @@
? getClass().getClassLoader()
: getServiceClassLoader());
config.setManagerClass(managerClass);
+ config.setOverrideDistributableManager(overrideDistributableManager);
config.setJava2ClassLoadingCompliance(java2ClassLoadingCompliance);
config.setUnpackWars(unpackWars);
config.setLenientEjbLink(this.lenientEjbLink);
Modified: branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java
===================================================================
--- branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java 2009-07-14 16:51:49 UTC (rev 91234)
+++ branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java 2009-07-14 17:24:26 UTC (rev 91235)
@@ -332,7 +332,7 @@
}
// Clustering
- if (metaData.getDistributable() != null)
+ if (config.getOverrideDistributableManager() && metaData.getDistributable() != null)
{
// Try to initate clustering, fallback to standard if no clustering is
// available
More information about the jboss-cvs-commits
mailing list