[jboss-cvs] JBossAS SVN: r85160 - in trunk: profileservice/src/main/org/jboss/profileservice/management/templates and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Mar 3 07:12:44 EST 2009
Author: emuckenhuber
Date: 2009-03-03 07:12:44 -0500 (Tue, 03 Mar 2009)
New Revision: 85160
Modified:
trunk/profileservice/src/main/org/jboss/profileservice/management/KernelBusRuntimeComponentDispatcher.java
trunk/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplateInfo.java
trunk/profileservice/src/main/org/jboss/profileservice/management/upload/DeploymentManagerImpl.java
trunk/profileservice/src/main/org/jboss/profileservice/management/upload/messages.properties
trunk/profileservice/src/main/org/jboss/profileservice/remoting/SecurityActions.java
trunk/system/src/main/org/jboss/system/server/profileservice/repository/MutableDeploymentRepository.java
Log:
[JBAS-6525] don't use enableHotDeployment flag in DeploymentManager
Modified: trunk/profileservice/src/main/org/jboss/profileservice/management/KernelBusRuntimeComponentDispatcher.java
===================================================================
--- trunk/profileservice/src/main/org/jboss/profileservice/management/KernelBusRuntimeComponentDispatcher.java 2009-03-03 11:40:09 UTC (rev 85159)
+++ trunk/profileservice/src/main/org/jboss/profileservice/management/KernelBusRuntimeComponentDispatcher.java 2009-03-03 12:12:44 UTC (rev 85160)
@@ -28,11 +28,8 @@
import org.jboss.kernel.Kernel;
import org.jboss.kernel.spi.dependency.KernelController;
import org.jboss.kernel.spi.registry.KernelBus;
-import org.jboss.metatype.api.values.EnumValue;
-import org.jboss.metatype.api.values.EnumValueSupport;
import org.jboss.metatype.api.values.MetaValue;
import org.jboss.metatype.api.values.MetaValueFactory;
-import org.jboss.profileservice.spi.types.ControllerStateMetaType;
/**
* Microcontainer KernelBus runtime component dispatcher.
Modified: trunk/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplateInfo.java
===================================================================
--- trunk/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplateInfo.java 2009-03-03 11:40:09 UTC (rev 85159)
+++ trunk/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplateInfo.java 2009-03-03 12:12:44 UTC (rev 85160)
@@ -31,8 +31,8 @@
import org.jboss.managed.api.Fields;
import org.jboss.managed.api.annotation.ManagementObjectID;
import org.jboss.managed.plugins.BasicDeploymentTemplateInfo;
+import org.jboss.managed.plugins.DefaultFieldsImpl;
import org.jboss.managed.plugins.ManagedObjectImpl;
-import org.jboss.managed.plugins.DefaultFieldsImpl;
import org.jboss.managed.plugins.ManagedPropertyImpl;
import org.jboss.metatype.api.types.MetaType;
import org.jboss.metatype.api.types.SimpleMetaType;
Modified: trunk/profileservice/src/main/org/jboss/profileservice/management/upload/DeploymentManagerImpl.java
===================================================================
--- trunk/profileservice/src/main/org/jboss/profileservice/management/upload/DeploymentManagerImpl.java 2009-03-03 11:40:09 UTC (rev 85159)
+++ trunk/profileservice/src/main/org/jboss/profileservice/management/upload/DeploymentManagerImpl.java 2009-03-03 12:12:44 UTC (rev 85160)
@@ -187,39 +187,36 @@
// FIXME
return false;
}
-
- public void loadProfile(ProfileKey key, boolean allowHotDeployments)
- throws Exception
+
+ public void loadProfile(ProfileKey key) throws NoSuchProfileException
{
// Override a DEFAULT key with the injected default
if(key.isDefaultKey() && this.defaultKey != null)
key = this.defaultKey;
// Get the mutable profile
- MutableProfile activeProfile = getProfile(key);
+ MutableProfile profile = getProfile(key);
+
// Set the key
- this.activeProfileKey = key;
-
- // TODO this should be handled by the deployHandler
- log.debug("Loading profile, key: "+key+", allowHotDeployments: "+allowHotDeployments);
- activeProfile.enableModifiedDeploymentChecks(allowHotDeployments);
+ this.activeProfileKey = profile.getKey();
}
+
+ public void releaseProfile()
+ {
+ this.activeProfileKey = null;
+ }
+
+ public void loadProfile(ProfileKey key, boolean allowHotDeployments)
+ throws Exception
+ {
+ loadProfile(key);
+ }
+
public void releaseProfile(ProfileKey key, boolean allowHotDeployments)
throws Exception
{
- // Override a DEFAULT key with the injected default
- if(key.isDefaultKey() && this.defaultKey != null)
- key = this.defaultKey;
-
- // Get the mutable profile
- MutableProfile activeProfile = getProfile(key);
- // Unset the key
- this.activeProfileKey = null;
-
- // TODO this should be handled by the deployHandler
- log.debug("Releasing profile, key: "+key);
- activeProfile.enableModifiedDeploymentChecks(allowHotDeployments);
+ releaseProfile();
}
public DeploymentProgress redeploy(String name)
@@ -299,7 +296,7 @@
Profile profile = this.ps.getActiveProfile(key);
if(profile.isMutable() == false)
{
- formatter.applyPattern(i18n.getString("DeploymentManager.NoProfileLoadedException")); //$NON-NLS-1$
+ formatter.applyPattern(i18n.getString("DeploymentManager.NoMutableProfileException")); //$NON-NLS-1$
Object[] args = {};
String msg = formatter.format(args);
throw new NoSuchProfileException(msg);
Modified: trunk/profileservice/src/main/org/jboss/profileservice/management/upload/messages.properties
===================================================================
--- trunk/profileservice/src/main/org/jboss/profileservice/management/upload/messages.properties 2009-03-03 11:40:09 UTC (rev 85159)
+++ trunk/profileservice/src/main/org/jboss/profileservice/management/upload/messages.properties 2009-03-03 12:12:44 UTC (rev 85160)
@@ -1,2 +1,3 @@
# resource bundle for the DeploymentManager
DeploymentManager.NoSuchProfileException=Failed to find profile for key: {0}
+DeploymentManager.NoMutableProfileException=Profile does not support deployment actions: {0}
\ No newline at end of file
Modified: trunk/profileservice/src/main/org/jboss/profileservice/remoting/SecurityActions.java
===================================================================
--- trunk/profileservice/src/main/org/jboss/profileservice/remoting/SecurityActions.java 2009-03-03 11:40:09 UTC (rev 85159)
+++ trunk/profileservice/src/main/org/jboss/profileservice/remoting/SecurityActions.java 2009-03-03 12:12:44 UTC (rev 85160)
@@ -28,8 +28,8 @@
import org.jboss.security.ISecurityManagement;
import org.jboss.security.SecurityContext;
+import org.jboss.security.SecurityContextAssociation;
import org.jboss.security.SecurityContextFactory;
-import org.jboss.security.SecurityContextAssociation;
/**
* Privileged Blocks
Modified: trunk/system/src/main/org/jboss/system/server/profileservice/repository/MutableDeploymentRepository.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/repository/MutableDeploymentRepository.java 2009-03-03 11:40:09 UTC (rev 85159)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/repository/MutableDeploymentRepository.java 2009-03-03 12:12:44 UTC (rev 85160)
@@ -105,7 +105,7 @@
boolean trace = log.isTraceEnabled();
// Suspend hot deployment checking
if( trace )
- log.trace("Aquiring content read lock");
+ log.trace("Aquiring content write lock");
contentLock.writeLock().lock();
String repositoryName = null;
try
@@ -258,11 +258,24 @@
public ProfileDeployment removeDeployment(String vfsPath) throws Exception
{
- ProfileDeployment deployment = getDeployment(vfsPath);
- VirtualFile root = deployment.getRoot();
- if(root.delete() == false)
- throw new IOException("Failed to delete: " + root);
- return super.removeDeployment(deployment.getName());
+ // Suspend hot deployment checking
+ if( log.isTraceEnabled() )
+ log.trace("Aquiring content write lock");
+ contentLock.writeLock().lock();
+ try
+ {
+ ProfileDeployment deployment = getDeployment(vfsPath);
+ VirtualFile root = deployment.getRoot();
+ if(root.delete() == false)
+ throw new IOException("Failed to delete: " + root);
+ return super.removeDeployment(deployment.getName());
+ }
+ finally
+ {
+ contentLock.writeLock().unlock();
+ if (log.isTraceEnabled())
+ log.trace("Released content write lock");
+ }
}
public void remove() throws Exception
More information about the jboss-cvs-commits
mailing list