[jboss-cvs] JBossAS SVN: r89826 - in branches/Branch_5_x: system/src/main/org/jboss/system/server/profileservice and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jun 4 10:53:16 EDT 2009


Author: emuckenhuber
Date: 2009-06-04 10:53:16 -0400 (Thu, 04 Jun 2009)
New Revision: 89826

Modified:
   branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/upload/DeploymentProgressImpl.java
   branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/upload/SerializableDeploymentID.java
   branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java
   branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/attachments/LazyPredeterminedManagedObjects.java
   branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java
   branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/repository/DeploymentUtils.java
Log:
minor logging, javadoc improvements.

Modified: branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/upload/DeploymentProgressImpl.java
===================================================================
--- branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/upload/DeploymentProgressImpl.java	2009-06-04 14:34:05 UTC (rev 89825)
+++ branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/upload/DeploymentProgressImpl.java	2009-06-04 14:53:16 UTC (rev 89826)
@@ -35,6 +35,7 @@
 import org.jboss.deployers.spi.management.deploy.DeploymentStatus.StateType;
 
 /**
+ * The deployment progress.
  * 
  * @author Scott.Stark at jboss.org
  * @version $Revision$

Modified: branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/upload/SerializableDeploymentID.java
===================================================================
--- branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/upload/SerializableDeploymentID.java	2009-06-04 14:34:05 UTC (rev 89825)
+++ branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/upload/SerializableDeploymentID.java	2009-06-04 14:53:16 UTC (rev 89826)
@@ -179,7 +179,9 @@
       // Only add the repositoryNames if it differs from deploymentNames
       if(getRepositoryNames() != getNames())
          buffer.append(", repositoryNames=").append(Arrays.toString(getRepositoryNames()));
-      buffer.append(", copyContent=").append(copyContent);
+      // Only log copyContent when the contentURL is set
+      if(getContentURL() != null)
+         buffer.append(", copyContent=").append(copyContent);
       if(description != null)
          buffer.append(", description=").append(description);
       if(options != null && options.isEmpty() == false)

Modified: branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java
===================================================================
--- branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java	2009-06-04 14:34:05 UTC (rev 89825)
+++ branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java	2009-06-04 14:53:16 UTC (rev 89826)
@@ -38,8 +38,6 @@
 import org.jboss.bootstrap.spi.as.JBossASBootstrap;
 import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.bootstrap.spi.as.server.JBossASServer;
-import org.jboss.bootstrap.spi.mc.config.MCServerConfig;
-import org.jboss.bootstrap.spi.mc.server.MCServer;
 import org.jboss.dependency.spi.ControllerContext;
 import org.jboss.dependency.spi.ControllerState;
 import org.jboss.deployers.client.spi.IncompleteDeploymentException;
@@ -85,7 +83,6 @@
 import org.jboss.profileservice.spi.Profile;
 import org.jboss.profileservice.spi.ProfileKey;
 import org.jboss.profileservice.spi.ProfileService;
-import org.jboss.profileservice.spi.metadata.ProfileMetaData;
 import org.jboss.profileservice.spi.types.ControllerStateMetaType;
 import org.jboss.system.server.profileservice.repository.AbstractBootstrapProfileFactory;
 
@@ -247,8 +244,9 @@
       if(this.profileKey == null)
          this.profileKey = new ProfileKey(server.getConfiguration().getServerName());
       
-      Map<String, Object> metaData = server.getMetaData();
-      ProfileMetaData pmd = (ProfileMetaData) metaData.get(ProfileMetaData.class.getName());
+      // TODO check if there is a predetermined ProfileMetaData attachment
+      // Map<String, Object> metaData = server.getMetaData();
+      // ProfileMetaData pmd = (ProfileMetaData) metaData.get(ProfileMetaData.class.getName());
  
       // Register the profiles
       Collection<Profile> bootstrapProfiles = profileFactory.createProfiles(profileKey, null);
@@ -279,7 +277,7 @@
          log.error("Failed to load profile: ", e);
       }
       
-      // Mark the profile as ready for hotdeployment if supported
+      // Enable modification checks on all mutable profiles 
       for(ProfileKey key : profileService.getActiveProfileKeys())
       {
          try
@@ -301,7 +299,7 @@
 
    public void shutdown(JBossASServer server)
    {
-      // Disable hotdeployment scanning
+      // Disable modification checks on all mutable profiles
       for(ProfileKey key : profileService.getActiveProfileKeys())
       {
          try
@@ -318,7 +316,8 @@
       try
       {
          // Release 
-         profileService.deactivateProfile(profileKey);
+         if(profileService.getActiveProfileKeys().contains(profileKey))
+            profileService.deactivateProfile(profileKey);
       }
       catch(Throwable t)
       {
@@ -327,8 +326,8 @@
       try
       {
          // Unregister
-         Profile profile = profileService.getProfile(profileKey);
-         profileService.unregisterProfile(profileKey);
+         if(profileService.getProfileKeys().contains(profileKey))
+            profileService.unregisterProfile(profileKey);
       }
       catch(Throwable t)
       {
@@ -346,7 +345,6 @@
       {
          try
          {
-            // TODO update to unregister(ProfileKey);
             profileService.unregisterProfile(key);
          }
          catch(Throwable t)

Modified: branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/attachments/LazyPredeterminedManagedObjects.java
===================================================================
--- branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/attachments/LazyPredeterminedManagedObjects.java	2009-06-04 14:34:05 UTC (rev 89825)
+++ branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/attachments/LazyPredeterminedManagedObjects.java	2009-06-04 14:53:16 UTC (rev 89826)
@@ -37,7 +37,10 @@
  * 
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
+ * 
+ * @deprecated this is not used anymore {@link ProfileServicePersistenceDeployer}
  */
+ at Deprecated
 public class LazyPredeterminedManagedObjects implements MutableAttachments
 {
    /** The serialVersionUID */

Modified: branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java
===================================================================
--- branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java	2009-06-04 14:34:05 UTC (rev 89825)
+++ branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java	2009-06-04 14:53:16 UTC (rev 89826)
@@ -333,7 +333,7 @@
             continue;
          }
 
-         MutableProfile activeProfile = (MutableProfile)profile;
+         MutableProfile activeProfile = (MutableProfile) profile;
          Collection<ModificationInfo> modifiedDeployments = activeProfile.getModifiedDeployments();
          for (ModificationInfo info : modifiedDeployments)
          {
@@ -355,7 +355,7 @@
             }
             catch(DeploymentException e)
             {
-               log.warn("Failed to add deployment " + ctx.getName());
+               log.warn("Failed to add deployment: " + ctx.getName(), e);
             }
          }
 
@@ -385,7 +385,6 @@
          return;
       }
 
-
       if (trace)
          log.trace("End deployment scan");
    }

Modified: branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/repository/DeploymentUtils.java
===================================================================
--- branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/repository/DeploymentUtils.java	2009-06-04 14:34:05 UTC (rev 89825)
+++ branches/Branch_5_x/system/src/main/org/jboss/system/server/profileservice/repository/DeploymentUtils.java	2009-06-04 14:53:16 UTC (rev 89826)
@@ -30,8 +30,10 @@
 import java.util.jar.Manifest;
 import java.util.zip.ZipEntry;
 
+import org.jboss.util.file.JarUtils;
+
 /**
- * Deployment utils.
+ * Deployment Utils.
  * 
  * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
  * @version $Revision$
@@ -40,10 +42,12 @@
 {
 
    /**
-    * Try to unpack a IS. a fork of JarUtils.unjar} which does not close the IS.
+    * Try to unpack an inputStream.
+    * This is a fork of {@link JarUtils#unjar}, but does not close the
+    * InputStream itself, as this is done by the remote deploymentTarget.
     * 
-    * @param in
-    * @param dest
+    * @param in the InputStream
+    * @param dest the destination file
     * @throws IOException
     */
    public static void unjar(InputStream in, File dest) throws IOException




More information about the jboss-cvs-commits mailing list