[jboss-cvs] jboss-portal/server/src/main/org/jboss/portal/server/deployment ...
Chris Laprun
chris.laprun at jboss.com
Fri Aug 4 16:19:23 EDT 2006
User: claprun
Date: 06/08/04 16:19:23
Modified: server/src/main/org/jboss/portal/server/deployment
PortalWebApp.java WebAppIntercepter.java
Log:
Updated modules to changes in thirdparty.
Revision Changes Path
1.11 +24 -42 jboss-portal/server/src/main/org/jboss/portal/server/deployment/PortalWebApp.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: PortalWebApp.java
===================================================================
RCS file: /cvsroot/jboss/jboss-portal/server/src/main/org/jboss/portal/server/deployment/PortalWebApp.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- PortalWebApp.java 6 Jan 2006 23:49:05 -0000 1.10
+++ PortalWebApp.java 4 Aug 2006 20:19:23 -0000 1.11
@@ -21,28 +21,26 @@
*/
package org.jboss.portal.server.deployment;
-import java.net.URL;
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.File;
-import java.io.FileOutputStream;
-
-import javax.servlet.ServletContext;
-import javax.xml.parsers.ParserConfigurationException;
-
import org.apache.log4j.Logger;
-import org.jboss.web.WebApplication;
-import org.jboss.portal.common.util.XML;
import org.jboss.portal.common.util.Tools;
+import org.jboss.portal.common.util.XML;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;
+import javax.servlet.ServletContext;
+import javax.xml.parsers.ParserConfigurationException;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
/**
* Encapsulate the infos needed by the portal deployment layer to create the application.
*
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision: 1.10 $
+ * @version $Revision: 1.11 $
*/
public abstract class PortalWebApp
{
@@ -68,53 +66,39 @@
/** . */
private String contextPath;
- /**
- * Constructor with the given web app.
- */
+ /** Constructor with the given web app. */
protected PortalWebApp()
{
}
- /**
- * Instrument the web application.
- */
+ /** Instrument the web application. */
public abstract void instrument() throws Exception;
- /**
- * Return the URL associated to this webapp.
- */
+ /** Return the URL associated to this webapp. */
public final URL getURL()
{
return url;
}
- /**
- * Return the application id.
- */
+ /** Return the application id. */
public final String getId()
{
return id;
}
- /**
- * Return the classloader of the web app.
- */
+ /** Return the classloader of the web app. */
public final ClassLoader getClassLoader()
{
return loader;
}
- /**
- * Returns the context path of the web application.
- */
+ /** Returns the context path of the web application. */
public final String getContextPath()
{
return contextPath;
}
- /**
- * Returns the servlet context of the web application.
- */
+ /** Returns the servlet context of the web application. */
public final ServletContext getServletContext()
{
return servletContext;
@@ -126,12 +110,10 @@
}
/**
- * Import a file in the war file. The file could not be created for some reasons which are :
- * <ul>
- * <li>The parent dir exists and is a file</li>
- * <li>The parent dir does not exist and its creation failed</li>
- * <li>An underlying exception occurs when writing bytes from the source <code>Inputstream</code> to the target <code>OutputStream</code></li>
- * </ul>
+ * Import a file in the war file. The file could not be created for some reasons which are : <ul> <li>The parent dir
+ * exists and is a file</li> <li>The parent dir does not exist and its creation failed</li> <li>An underlying
+ * exception occurs when writing bytes from the source <code>Inputstream</code> to the target
+ * <code>OutputStream</code></li> </ul>
*
* @param parentDirRelativePath the parent relative path in the web app starting from the app root
* @param name the name the created file should have
1.11 +25 -45 jboss-portal/server/src/main/org/jboss/portal/server/deployment/WebAppIntercepter.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: WebAppIntercepter.java
===================================================================
RCS file: /cvsroot/jboss/jboss-portal/server/src/main/org/jboss/portal/server/deployment/WebAppIntercepter.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- WebAppIntercepter.java 10 Mar 2006 11:23:54 -0000 1.10
+++ WebAppIntercepter.java 4 Aug 2006 20:19:23 -0000 1.11
@@ -21,6 +21,14 @@
*/
package org.jboss.portal.server.deployment;
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.deployment.SubDeployer;
+import org.jboss.portal.common.system.AbstractJBossService;
+import org.jboss.web.WebApplication;
+
+import javax.management.Notification;
+import javax.management.NotificationListener;
+import javax.management.ObjectName;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
@@ -29,28 +37,16 @@
import java.util.Iterator;
import java.util.Map;
-import javax.management.Notification;
-import javax.management.NotificationListener;
-import javax.management.ObjectName;
-
-import org.jboss.deployment.DeploymentInfo;
-import org.jboss.deployment.SubDeployer;
-import org.jboss.portal.common.system.AbstractJBossService;
-import org.jboss.web.WebApplication;
-
/**
- * Relay web deployments. When a web deployment occurs, it is abstracted
- * into a PortalWebApp object that provides a consistent way to getPortalObjectContext informations
- * and modify the web application.
- *
- * When this service stops it does not send undeployment notifications, therefore
- * it is up to the client of this service to perform any cleanup task associated
- * to a deployment web application. The purpose of this is that most of the time
- * clients of this service will be stopped before this one and they would
- * receive undeployments in a not started state.
+ * Relay web deployments. When a web deployment occurs, it is abstracted into a PortalWebApp object that provides a
+ * consistent way to getPortalObjectContext informations and modify the web application.
+ * <p/>
+ * When this service stops it does not send undeployment notifications, therefore it is up to the client of this service
+ * to perform any cleanup task associated to a deployment web application. The purpose of this is that most of the time
+ * clients of this service will be stopped before this one and they would receive undeployments in a not started state.
*
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision: 1.10 $
+ * @version $Revision: 1.11 $
*/
public abstract class WebAppIntercepter
extends AbstractJBossService
@@ -81,33 +77,25 @@
classLoader = Thread.currentThread().getContextClassLoader();
}
- /**
- * Set the deployer on this service.
- */
+ /** Set the deployer on this service. */
public void setInterceptedDeployer(ObjectName interceptedDeployer)
{
this.interceptedDeployer = interceptedDeployer;
}
- /**
- * Return the intercepted deployer.
- */
+ /** Return the intercepted deployer. */
public ObjectName getInterceptedDeployer()
{
return interceptedDeployer;
}
- /**
- * Clone and return the deployed URLs.
- */
+ /** Clone and return the deployed URLs. */
public Collection getDeployedURLs()
{
return new ArrayList(deployments.keySet());
}
- /**
- * Only take care of start notifications.
- */
+ /** Only take care of start notifications. */
public void handleNotification(Notification notification, Object handback)
{
String type = notification.getType();
@@ -158,7 +146,7 @@
}
}
}
- catch(Exception e)
+ catch (Exception e)
{
log.error("Cannot handle the intercepted deployment", e);
}
@@ -170,9 +158,7 @@
}
}
- /**
- * Start listening to the deployer notifications.
- */
+ /** Start listening to the deployer notifications. */
protected void startService() throws Exception
{
if (interceptedDeployer != null)
@@ -209,15 +195,13 @@
}
}
- /**
- * Stop listening to the deployer notifications.
- */
+ /** Stop listening to the deployer notifications. */
protected void stopService() throws Exception
{
if (currentInterceptedDeployer != null)
{
// Remove all previously deployed applications
- for (Iterator i = deployments.values().iterator();i.hasNext();)
+ for (Iterator i = deployments.values().iterator(); i.hasNext();)
{
PortalWebApp pwa = (PortalWebApp)i.next();
i.remove();
@@ -237,14 +221,10 @@
}
}
- /**
- * Perform the deploy notification.
- */
+ /** Perform the deploy notification. */
protected abstract void deploy(PortalWebApp pwa);
- /**
- * Perform the undeploy notification.
- */
+ /** Perform the undeploy notification. */
protected abstract void undeploy(PortalWebApp pwa);
}
More information about the jboss-cvs-commits
mailing list