[jboss-cvs] JBossAS SVN: r58278 - trunk/system-jmx/src/main/org/jboss/deployment

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Nov 11 21:03:48 EST 2006


Author: scott.stark at jboss.org
Date: 2006-11-11 21:03:46 -0500 (Sat, 11 Nov 2006)
New Revision: 58278

Modified:
   trunk/system-jmx/src/main/org/jboss/deployment/MainDeployer.java
   trunk/system-jmx/src/main/org/jboss/deployment/MainDeployerMBean.java
Log:
Update getDeployment to return a DeploymentContext

Modified: trunk/system-jmx/src/main/org/jboss/deployment/MainDeployer.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/deployment/MainDeployer.java	2006-11-12 02:02:41 UTC (rev 58277)
+++ trunk/system-jmx/src/main/org/jboss/deployment/MainDeployer.java	2006-11-12 02:03:46 UTC (rev 58278)
@@ -1266,12 +1266,8 @@
     */
    public void start(String urlspec)
       throws DeploymentException, MalformedURLException
-   {	
-      DeploymentInfo sdi = getDeployment(new URL(urlspec));
-      if (sdi!= null)
-      {
-         start(sdi);
-      }
+   {
+      throw new DeploymentException("Not supported");
    }
 
    /**
@@ -1283,11 +1279,7 @@
    public void stop(String urlspec)
       throws DeploymentException, MalformedURLException
    {	
-      DeploymentInfo sdi = getDeployment(new URL(urlspec));
-      if (sdi!= null)
-      {
-         stop(sdi);
-      }	
+      throw new DeploymentException("Not supported");
    }
 
    /**
@@ -1314,12 +1306,12 @@
     */
    public boolean isDeployed(URL url)
    {
-      DeploymentInfo di = getDeployment(url);
+      DeploymentContext di = delegate.getDeploymentContext(url.toString());
       if (di == null)
       {
          return false;
       } // end of if ()
-      return di.state == DeploymentState.STARTED;
+      return di.getState() == org.jboss.deployers.spi.structure.DeploymentState.DEPLOYED;
    }
 
    /**
@@ -1330,12 +1322,12 @@
     * @return a <code>DeploymentInfo</code> value
     * @jmx.managed-operation
     */
-   public DeploymentInfo getDeployment(URL url)
+   public DeploymentContext getDeployment(URL url)
    {
-      synchronized (deploymentList)
-      {
-         return (DeploymentInfo) deploymentMap.get(url);
-      }
+      String name = contextMap.get(url);
+      DeploymentContext dc = delegate.getDeploymentContext(name);
+      log.info("getDeploymen, url="+url+", dc="+dc);
+      return dc;
    }
 
    /**
@@ -1348,8 +1340,7 @@
     */
    public URL getWatchUrl(URL url)
    {
-      DeploymentInfo info = getDeployment(url);
-      return info == null ? null : info.watch;
+      return url;
    }
 
    /** Check the current deployment states and generate a IncompleteDeploymentException

Modified: trunk/system-jmx/src/main/org/jboss/deployment/MainDeployerMBean.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/deployment/MainDeployerMBean.java	2006-11-12 02:02:41 UTC (rev 58277)
+++ trunk/system-jmx/src/main/org/jboss/deployment/MainDeployerMBean.java	2006-11-12 02:03:46 UTC (rev 58278)
@@ -28,6 +28,7 @@
 
 import javax.management.ObjectName;
 
+import org.jboss.deployers.spi.structure.DeploymentContext;
 import org.jboss.mx.util.ObjectNameFactory;
 import org.jboss.system.ServiceMBean;
 
@@ -230,9 +231,9 @@
     * The <code>getDeployment</code> method returns the DeploymentInfo object
     * for the URL supplied.
     * @param url an <code>URL</code> value
-    * @return a <code>DeploymentInfo</code> value
+    * @return a <code>DeploymentContext</code> value
     */
-   DeploymentInfo getDeployment(URL url);
+   DeploymentContext getDeployment(URL url);
 
    /**
     * The <code>getWatchUrl</code> method returns the URL that,




More information about the jboss-cvs-commits mailing list