[jboss-cvs] JBossAS SVN: r57676 - in trunk: server/src/main/org/jboss/web/deployers tomcat/src/main/org/jboss/web/tomcat/tc6/deployers

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Oct 14 20:36:27 EDT 2006


Author: scott.stark at jboss.org
Date: 2006-10-14 20:36:23 -0400 (Sat, 14 Oct 2006)
New Revision: 57676

Modified:
   trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployment.java
   trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/TomcatDeployment.java
Log:
Javadoc and make the performDeploy/performUndeploy signature order consistent

Modified: trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployment.java
===================================================================
--- trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployment.java	2006-10-15 00:28:45 UTC (rev 57675)
+++ trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployment.java	2006-10-15 00:36:23 UTC (rev 57676)
@@ -58,31 +58,30 @@
 import org.jboss.security.authorization.PolicyRegistration;
 import org.jboss.web.WebApplication;
 import org.jboss.web.WebPermissionMapping;
-import org.jboss.web.AbstractWebContainer.WebDescriptorParser;
 import org.omg.CORBA.ORB;
 
-/** 
+/**
+An abstract web app deployment bean. Subclasses implement:
+
+- init(Object) to initialize from the deployment configuration java bean passed
+in from the AbstractWarDeployer instance.
+- performDeploy(WebApplication webApp, String warUrl) to translate the
+WebApplication data into a running web application. This is called when the
+AbstractWarDeployment is started.
+- performUndeploy(WebApplication webApp, String warUrl) to remove the application
+corresponding to the WebApplication data. This is called when the
+AbstractWarDeployment is stopped.
+ 
 The one thing to be aware of is the relationship between the thread context
 class loader and the JNDI ENC context. Any method that attempts to access
 the JNDI ENC context must have the ClassLoader in the WebApplication returned
 from the {@link #performDeploy(WebApplication, String, WebDescriptorParser) performDeploy} as its thread
 context ClassLoader or else the lookup for java:comp/env will fail with a
 name not found exception, or worse, it will receive some other web application
-ENC context. If your adapting a web container that is trying be compatible with
-both 1.1 and 1.2 Java VMs this is something you need to pay special attention
-to. For example, I have seen problems a request interceptor that was handling
-the authentication/authorization callouts in tomcat3.2.1 not having the same
-thread context ClassLoader as was used to dispatch the http service request.
+ENC context.
+TODO: the enc should be managed outside of the container without relying
+on the TCL behavior.
 
- at see #performDeploy(WebApplication webApp, String warUrl,
-        WebDescriptorParser webAppParser)
- at see #performUndeploy(String, WebApplication)
- at see #processEnc(...)
- at see #linkSecurityDomain(String, Context)
- at see org.jboss.security.RealmMapping;
- at see org.jboss.security.SimplePrincipal;
- at see org.jboss.security.SecurityAssociation;
-
 @author  Scott.Stark at jboss.org
 @version $Revision: 57455 $
 */
@@ -376,7 +375,7 @@
    {
       URL warURL = webApp.getURL();
       String warUrl = warURL.toString();
-      performUndeploy(warUrl, webApp);
+      performUndeploy(webApp, warUrl);
       // Unregister the permissions with the JACC layer
       WebMetaData metaData = webApp.getMetaData();
       String contextID = metaData.getJaccContextID();
@@ -410,8 +409,12 @@
    /**
     * Called as part of the stop() method template to ask the subclass for
     * perform the web container specific undeployment steps.
+    * @param webApp The web application information context. This contains the
+    * metadata such as the context-root element value from the J2EE
+    * application/module/web application.xml descriptor and virtual-host.
+    * @param warUrl The string for the URL of the web application war.
     */
-   protected abstract void performUndeploy(String warUrl, WebApplication webApp)
+   protected abstract void performUndeploy(WebApplication webApp, String warUrl)
       throws Exception;
 
    /**

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/TomcatDeployment.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/TomcatDeployment.java	2006-10-15 00:28:45 UTC (rev 57675)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/tc6/deployers/TomcatDeployment.java	2006-10-15 00:36:23 UTC (rev 57676)
@@ -454,7 +454,7 @@
     * Called as part of the undeploy() method template to ask the subclass for
     * perform the web container specific undeployment steps.
     */
-   protected void performUndeploy(String warUrl, WebApplication warInfo)
+   protected void performUndeploy(WebApplication warInfo, String warUrl)
          throws Exception
    {
       if (warInfo == null)




More information about the jboss-cvs-commits mailing list