[jboss-cvs] JBossAS SVN: r105309 - in projects/jboss-jsf-int/trunk/jsf-deployer/src/main: resources/META-INF and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu May 27 14:37:01 EDT 2010
Author: stan.silvert at jboss.com
Date: 2010-05-27 14:37:00 -0400 (Thu, 27 May 2010)
New Revision: 105309
Modified:
projects/jboss-jsf-int/trunk/jsf-deployer/src/main/java/org/jboss/jsf/deployer/JSFImplManagementDeployer.java
projects/jboss-jsf-int/trunk/jsf-deployer/src/main/java/org/jboss/jsf/deployer/JSFUrlIntegrationDeployer.java
projects/jboss-jsf-int/trunk/jsf-deployer/src/main/resources/META-INF/jsf-integration-deployer-jboss-beans.xml
Log:
JBAS-6638 Better cleanup on undeploy. Change context param from JSF_PROFILE_NAME to JSF_CONFIG_NAME.
Modified: projects/jboss-jsf-int/trunk/jsf-deployer/src/main/java/org/jboss/jsf/deployer/JSFImplManagementDeployer.java
===================================================================
--- projects/jboss-jsf-int/trunk/jsf-deployer/src/main/java/org/jboss/jsf/deployer/JSFImplManagementDeployer.java 2010-05-27 17:36:35 UTC (rev 105308)
+++ projects/jboss-jsf-int/trunk/jsf-deployer/src/main/java/org/jboss/jsf/deployer/JSFImplManagementDeployer.java 2010-05-27 18:37:00 UTC (rev 105309)
@@ -50,12 +50,12 @@
public class JSFImplManagementDeployer extends AbstractSimpleVFSRealDeployer<WebMetaData>
{
- private static final String JSF_PROFILE_PARAM = "org.jboss.jbossfaces.JSF_PROFILE_NAME";
+ private static final String JSF_CONFIG_PARAM = "org.jboss.jbossfaces.JSF_CONFIG_NAME";
private static final String WAR_BUNDLES_JSF_PARAM = "org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL";
private Collection<String> facesServlets;
- private String defaultJSFImplementation;
+ private String defaultJSFConfiguration;
private Map<String,URL> jsfImplementations;
private Map<String, JSFImplMetaData> jsfImplMetatData = new HashMap<String, JSFImplMetaData>();
@@ -111,9 +111,9 @@
this.facesServlets = facesServlets;
}
- public void setDefaultJSFImplementation(String defaultJSFImplementation)
+ public void setDefaultJSFConfig(String defaultJSFConfig)
{
- this.defaultJSFImplementation = defaultJSFImplementation;
+ this.defaultJSFConfiguration = defaultJSFConfig;
}
public void setJsfImplementations(Map<String, String> jsfImpls) throws MalformedURLException
@@ -184,13 +184,13 @@
private JSFImplMetaData findWhichJSFImplToUse(WebMetaData metaData)
{
- String implToUse = getContextParam(JSF_PROFILE_PARAM, metaData);
+ String implToUse = getContextParam(JSF_CONFIG_PARAM, metaData);
if (implToUse != null)
{
return this.jsfImplMetatData.get(implToUse);
}
- return this.jsfImplMetatData.get(this.defaultJSFImplementation);
+ return this.jsfImplMetatData.get(this.defaultJSFConfiguration);
}
}
Modified: projects/jboss-jsf-int/trunk/jsf-deployer/src/main/java/org/jboss/jsf/deployer/JSFUrlIntegrationDeployer.java
===================================================================
--- projects/jboss-jsf-int/trunk/jsf-deployer/src/main/java/org/jboss/jsf/deployer/JSFUrlIntegrationDeployer.java 2010-05-27 17:36:35 UTC (rev 105308)
+++ projects/jboss-jsf-int/trunk/jsf-deployer/src/main/java/org/jboss/jsf/deployer/JSFUrlIntegrationDeployer.java 2010-05-27 18:37:00 UTC (rev 105309)
@@ -72,8 +72,7 @@
@Override
public void deploy(VFSDeploymentUnit unit, JSFImplMetaData jsfImpl) throws DeploymentException
{
- if (jsfImpl == null) return; // need this because it's a subclass of an OptionalDeployer
- if (!jsfImpl.getImplName().equals(this.jsfImplName)) return;
+ if (!isIntegrationDeployment(unit, jsfImpl)) return;
super.deploy(unit, jsfImpl);
@@ -85,16 +84,33 @@
}
}
- // If we got this far, we know that we need to return true
@Override
- protected boolean isIntegrationDeployment(VFSDeploymentUnit unit, JSFImplMetaData metaData)
+ public void undeploy(VFSDeploymentUnit unit, JSFImplMetaData jsfImpl)
{
- return true;
+ if (!isIntegrationDeployment(unit, jsfImpl)) return;
+
+ super.undeploy(unit, jsfImpl);
+
+ // Remove JSF from any ancestor deployments
+ while (!unit.isTopLevel())
+ {
+ unit = unit.getParent();
+ super.undeploy(unit, jsfImpl);
+ }
}
+
@Override
+ protected boolean isIntegrationDeployment(VFSDeploymentUnit unit, JSFImplMetaData jsfImpl)
+ {
+ if (jsfImpl == null) return false; // need this because it's a subclass of an OptionalDeployer
+ return jsfImpl.getImplName().equals(this.jsfImplName);
+ }
+
+ @Override
protected boolean isIntegrationDeployment(VFSDeploymentUnit unit)
{
+ // If we got this far, we know that we need to return true
return true;
}
}
\ No newline at end of file
Modified: projects/jboss-jsf-int/trunk/jsf-deployer/src/main/resources/META-INF/jsf-integration-deployer-jboss-beans.xml
===================================================================
--- projects/jboss-jsf-int/trunk/jsf-deployer/src/main/resources/META-INF/jsf-integration-deployer-jboss-beans.xml 2010-05-27 17:36:35 UTC (rev 105308)
+++ projects/jboss-jsf-int/trunk/jsf-deployer/src/main/resources/META-INF/jsf-integration-deployer-jboss-beans.xml 2010-05-27 18:37:00 UTC (rev 105309)
@@ -17,19 +17,19 @@
</property>
<!--
- * Specify the name of the default JSF profile.
+ * Specify the name of the default JSF configuration.
-->
- <property name="defaultJSFImplementation">
+ <property name="defaultJSFConfig">
<value>Mojarra-2.0</value>
</property>
<!--
* Define where to find JSF implementations. The key is the name
- * of the JSF profile. The value is a URL to the directory where
+ * of the JSF configuration. The value is a URL to the directory where
* the implementation resides. The implementation should include any
* jars that the implementation requires. It should also include a
* web.xml file in the root. Elements in the web.xml will be applied
- * to all web applications applications that use the profile.
+ * to all web applications applications that use the JSF configuration.
Example URLs:
${jboss.server.home.url}/deployers/jsf.deployer/Mojarra1.2
More information about the jboss-cvs-commits
mailing list