[jboss-cvs] JBossAS SVN: r69937 - trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Feb 19 11:10:48 EST 2008


Author: remy.maucherat at jboss.com
Date: 2008-02-19 11:10:48 -0500 (Tue, 19 Feb 2008)
New Revision: 69937

Modified:
   trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployer.java
Log:
- Allow setting deploymentClass.

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployer.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployer.java	2008-02-19 16:06:12 UTC (rev 69936)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployer.java	2008-02-19 16:10:48 UTC (rev 69937)
@@ -137,7 +137,7 @@
    /** The service used to flush authentication cache on session invalidation. */
    private JaasSecurityManagerServiceMBean secMgrService;
    /** The AbstractWarDeployment implementation class */
-   private Class deploymentClass = null; 
+   private String deploymentClass = null; 
    /** The classloader for the Tomcat SAR */
    private ClassLoader serviceClassLoader = null; 
    
@@ -329,11 +329,11 @@
       this.filteredPackages = pkgs;
    }
 
-   public Class getDeploymentClass()
+   public String getDeploymentClass()
    {
       return deploymentClass;
    }
-   public void setDeploymentClass(Class deploymentClass)
+   public void setDeploymentClass(String deploymentClass)
    {
       this.deploymentClass = deploymentClass;
    }   
@@ -471,9 +471,9 @@
    public AbstractWarDeployment getDeployment(VFSDeploymentUnit unit, JBossWebMetaData metaData)
       throws Exception
    {
+      String className = (deploymentClass == null) ? "org.jboss.web.tomcat.service.deployers.TomcatDeployment" : deploymentClass;
+      AbstractWarDeployment deployment = (AbstractWarDeployment) (getClass().getClassLoader().loadClass(className)).newInstance(); 
       
-      AbstractWarDeployment deployment = (AbstractWarDeployment) (getClass().getClassLoader().loadClass("org.jboss.web.tomcat.service.deployers.TomcatDeployment")).newInstance(); 
-      
       DeployerConfig config = new DeployerConfig();
       config.setDefaultSecurityDomain(this.defaultSecurityDomain);
       config.setSubjectAttributeName(this.subjectAttributeName);




More information about the jboss-cvs-commits mailing list