[jboss-cvs] JBossAS SVN: r89838 - in branches/JBPAPP_5_0: messaging/src/main/org/jboss/jms/server/destination and 7 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Jun 4 12:29:35 EDT 2009
Author: emuckenhuber
Date: 2009-06-04 12:29:35 -0400 (Thu, 04 Jun 2009)
New Revision: 89838
Modified:
branches/JBPAPP_5_0/component-matrix/pom.xml
branches/JBPAPP_5_0/messaging/src/main/org/jboss/jms/server/destination/QueueServiceMO.java
branches/JBPAPP_5_0/messaging/src/main/org/jboss/jms/server/destination/TopicServiceMO.java
branches/JBPAPP_5_0/profileservice/src/main/org/jboss/profileservice/management/upload/DeploymentProgressImpl.java
branches/JBPAPP_5_0/profileservice/src/main/org/jboss/profileservice/management/upload/SerializableDeploymentID.java
branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java
branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profileservice/attachments/LazyPredeterminedManagedObjects.java
branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java
branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profileservice/repository/DeploymentUtils.java
branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/deployers/test/DeploymentManagerUnitTestCase.java
branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java
Log:
change jms dest managed property impact to lifecycle
Modified: branches/JBPAPP_5_0/component-matrix/pom.xml
===================================================================
--- branches/JBPAPP_5_0/component-matrix/pom.xml 2009-06-04 16:27:42 UTC (rev 89837)
+++ branches/JBPAPP_5_0/component-matrix/pom.xml 2009-06-04 16:29:35 UTC (rev 89838)
@@ -80,7 +80,7 @@
<version.org.jboss.jpa>1.0.0</version.org.jboss.jpa>
<version.org.jboss.logbridge>1.0.0.GA</version.org.jboss.logbridge>
<version.org.jboss.logmanager>1.0.0.GA</version.org.jboss.logmanager>
- <version.org.jboss.man>2.1.1.Beta1</version.org.jboss.man>
+ <version.org.jboss.man>2.1.1.Beta2</version.org.jboss.man>
<version.org.jboss.mdr>2.0.1.GA</version.org.jboss.mdr>
<version.org.jboss.metadata>1.0.1.GA</version.org.jboss.metadata>
<version.org.jboss.microcontainer>2.0.6.GA</version.org.jboss.microcontainer>
Modified: branches/JBPAPP_5_0/messaging/src/main/org/jboss/jms/server/destination/QueueServiceMO.java
===================================================================
--- branches/JBPAPP_5_0/messaging/src/main/org/jboss/jms/server/destination/QueueServiceMO.java 2009-06-04 16:27:42 UTC (rev 89837)
+++ branches/JBPAPP_5_0/messaging/src/main/org/jboss/jms/server/destination/QueueServiceMO.java 2009-06-04 16:29:35 UTC (rev 89838)
@@ -178,16 +178,16 @@
// Management Operations
- @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
+ @ManagementOperation(description = "Service lifecycle operation", impact = Impact.Lifecycle)
public void create() throws Exception { }
- @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
+ @ManagementOperation(description = "Service lifecycle operation", impact = Impact.Lifecycle)
public void start() throws Exception { }
- @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
+ @ManagementOperation(description = "Service lifecycle operation", impact = Impact.Lifecycle)
public void stop() { }
- @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
+ @ManagementOperation(description = "Service lifecycle operation", impact = Impact.Lifecycle)
public void destroy() { }
@ManagementOperation(description = "Remove all messages in the queue", impact = Impact.WriteOnly)
Modified: branches/JBPAPP_5_0/messaging/src/main/org/jboss/jms/server/destination/TopicServiceMO.java
===================================================================
--- branches/JBPAPP_5_0/messaging/src/main/org/jboss/jms/server/destination/TopicServiceMO.java 2009-06-04 16:27:42 UTC (rev 89837)
+++ branches/JBPAPP_5_0/messaging/src/main/org/jboss/jms/server/destination/TopicServiceMO.java 2009-06-04 16:29:35 UTC (rev 89838)
@@ -176,16 +176,16 @@
// Management Operations
- @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
+ @ManagementOperation(description = "Service lifecycle operation", impact = Impact.Lifecycle)
public void create() throws Exception { }
- @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
+ @ManagementOperation(description = "Service lifecycle operation", impact = Impact.Lifecycle)
public void start() throws Exception { }
- @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
+ @ManagementOperation(description = "Service lifecycle operation", impact = Impact.Lifecycle)
public void stop() { }
- @ManagementOperation(description = "Service lifecycle operation", impact = Impact.WriteOnly)
+ @ManagementOperation(description = "Service lifecycle operation", impact = Impact.Lifecycle)
public void destroy() { }
@ManagementOperation(description = "Remove all messages", impact = Impact.WriteOnly)
Modified: branches/JBPAPP_5_0/profileservice/src/main/org/jboss/profileservice/management/upload/DeploymentProgressImpl.java
===================================================================
--- branches/JBPAPP_5_0/profileservice/src/main/org/jboss/profileservice/management/upload/DeploymentProgressImpl.java 2009-06-04 16:27:42 UTC (rev 89837)
+++ branches/JBPAPP_5_0/profileservice/src/main/org/jboss/profileservice/management/upload/DeploymentProgressImpl.java 2009-06-04 16:29:35 UTC (rev 89838)
@@ -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/JBPAPP_5_0/profileservice/src/main/org/jboss/profileservice/management/upload/SerializableDeploymentID.java
===================================================================
--- branches/JBPAPP_5_0/profileservice/src/main/org/jboss/profileservice/management/upload/SerializableDeploymentID.java 2009-06-04 16:27:42 UTC (rev 89837)
+++ branches/JBPAPP_5_0/profileservice/src/main/org/jboss/profileservice/management/upload/SerializableDeploymentID.java 2009-06-04 16:29:35 UTC (rev 89838)
@@ -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/JBPAPP_5_0/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java
===================================================================
--- branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java 2009-06-04 16:27:42 UTC (rev 89837)
+++ branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java 2009-06-04 16:29:35 UTC (rev 89838)
@@ -25,7 +25,6 @@
import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -36,7 +35,6 @@
import org.jboss.beans.info.spi.BeanInfo;
import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
import org.jboss.bootstrap.spi.Bootstrap;
import org.jboss.bootstrap.spi.Server;
import org.jboss.bootstrap.spi.ServerConfig;
@@ -67,7 +65,6 @@
import org.jboss.managed.api.ManagedProperty;
import org.jboss.managed.api.MutableManagedObject;
import org.jboss.managed.api.annotation.ManagementComponent;
-import org.jboss.managed.api.annotation.ManagementConstants;
import org.jboss.managed.api.annotation.ManagementObject;
import org.jboss.managed.api.annotation.ViewUse;
import org.jboss.managed.api.factory.ManagedObjectFactory;
@@ -76,22 +73,17 @@
import org.jboss.managed.plugins.ManagedObjectImpl;
import org.jboss.managed.plugins.ManagedOperationImpl;
import org.jboss.managed.plugins.ManagedPropertyImpl;
-import org.jboss.managed.plugins.factory.AbstractManagedObjectFactory;
import org.jboss.metatype.api.types.ArrayMetaType;
-import org.jboss.metatype.api.types.CollectionMetaType;
import org.jboss.metatype.api.types.MetaType;
import org.jboss.metatype.api.types.SimpleMetaType;
import org.jboss.metatype.api.values.ArrayValueSupport;
-import org.jboss.metatype.api.values.CollectionValueSupport;
import org.jboss.metatype.api.values.EnumValue;
import org.jboss.metatype.api.values.EnumValueSupport;
-import org.jboss.metatype.api.values.GenericValue;
import org.jboss.profileservice.spi.MutableProfile;
import org.jboss.profileservice.spi.NoSuchProfileException;
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;
@@ -253,8 +245,9 @@
if(this.profileKey == null)
this.profileKey = new ProfileKey(server.getConfig().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);
@@ -285,7 +278,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
@@ -307,7 +300,7 @@
public void shutdown(Server server)
{
- // Disable hotdeployment scanning
+ // Disable modification checks on all mutable profiles
for(ProfileKey key : profileService.getActiveProfileKeys())
{
try
@@ -324,7 +317,8 @@
try
{
// Release
- profileService.deactivateProfile(profileKey);
+ if(profileService.getActiveProfileKeys().contains(profileKey))
+ profileService.deactivateProfile(profileKey);
}
catch(Throwable t)
{
@@ -333,8 +327,8 @@
try
{
// Unregister
- Profile profile = profileService.getProfile(profileKey);
- profileService.unregisterProfile(profileKey);
+ if(profileService.getProfileKeys().contains(profileKey))
+ profileService.unregisterProfile(profileKey);
}
catch(Throwable t)
{
@@ -352,7 +346,6 @@
{
try
{
- // TODO update to unregister(ProfileKey);
profileService.unregisterProfile(key);
}
catch(Throwable t)
Modified: branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profileservice/attachments/LazyPredeterminedManagedObjects.java
===================================================================
--- branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profileservice/attachments/LazyPredeterminedManagedObjects.java 2009-06-04 16:27:42 UTC (rev 89837)
+++ branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profileservice/attachments/LazyPredeterminedManagedObjects.java 2009-06-04 16:29:35 UTC (rev 89838)
@@ -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/JBPAPP_5_0/system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java
===================================================================
--- branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java 2009-06-04 16:27:42 UTC (rev 89837)
+++ branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java 2009-06-04 16:29:35 UTC (rev 89838)
@@ -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/JBPAPP_5_0/system/src/main/org/jboss/system/server/profileservice/repository/DeploymentUtils.java
===================================================================
--- branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profileservice/repository/DeploymentUtils.java 2009-06-04 16:27:42 UTC (rev 89837)
+++ branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profileservice/repository/DeploymentUtils.java 2009-06-04 16:29:35 UTC (rev 89838)
@@ -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
Modified: branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/deployers/test/DeploymentManagerUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/deployers/test/DeploymentManagerUnitTestCase.java 2009-06-04 16:27:42 UTC (rev 89837)
+++ branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/deployers/test/DeploymentManagerUnitTestCase.java 2009-06-04 16:29:35 UTC (rev 89838)
@@ -201,7 +201,7 @@
log.error("Failed ", e);
throw e;
}
-// stopAndRemove(new String[] { NESTED_DEPLOYMENT } );
+ stopAndRemove(new String[] { NESTED_DEPLOYMENT } );
}
/**
@@ -272,7 +272,7 @@
Thread.sleep(10000);
try
{
- mgtView.getDeployment(HD_DEPLOYMENT);
+ getManagementView().getDeployment(HD_DEPLOYMENT);
fail(HD_DEPLOYMENT + " not undeployed");
}
catch(NoSuchDeploymentException e)
Modified: branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java 2009-06-04 16:27:42 UTC (rev 89837)
+++ branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java 2009-06-04 16:29:35 UTC (rev 89838)
@@ -113,6 +113,7 @@
suite.addTest(new JmsDestinationUnitTestCase("testCreateQueue"));
suite.addTest(new JmsDestinationUnitTestCase("testQueueMetrics"));
suite.addTest(new JmsDestinationUnitTestCase("testQueueOperations"));
+ suite.addTest(new JmsDestinationUnitTestCase("testQueueRestart"));
suite.addTest(new JmsDestinationUnitTestCase("testRemoveQueue"));
suite.addTest(new JmsDestinationUnitTestCase("testCreateTopic"));
suite.addTest(new JmsDestinationUnitTestCase("testTopicMetrics"));
@@ -227,6 +228,22 @@
assertNotNull("null operation return value", v);
log.debug("result" + v);
}
+
+ public void testQueueRestart() throws Exception
+ {
+ ManagedComponent component = getManagementView().getComponent("testCreateQueue", QueueType);
+ assertEquals(RunState.RUNNING, component.getRunState());
+ ManagedOperation o = getOperation(component, "stop", new String[0]);
+ o.invoke(new MetaValue[0]);
+
+ // TODO this should not require a reload?
+ getManagementView().reload();
+
+ component = getManagementView().getComponent("testCreateQueue", QueueType);
+ assertEquals(RunState.STOPPED, component.getRunState());
+ o = getOperation(component, "start", new String[0]);
+ o.invoke(new MetaValue[0]);
+ }
public void testMultipleQueues() throws Exception
{
More information about the jboss-cvs-commits
mailing list