[jboss-cvs] JBossAS SVN: r89828 - in trunk: 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 11:28:10 EDT 2009
Author: emuckenhuber
Date: 2009-06-04 11:28:09 -0400 (Thu, 04 Jun 2009)
New Revision: 89828
Modified:
trunk/component-matrix/pom.xml
trunk/messaging/src/main/org/jboss/jms/server/destination/QueueServiceMO.java
trunk/messaging/src/main/org/jboss/jms/server/destination/TopicServiceMO.java
trunk/profileservice/src/main/org/jboss/profileservice/management/upload/DeploymentProgressImpl.java
trunk/profileservice/src/main/org/jboss/profileservice/management/upload/SerializableDeploymentID.java
trunk/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java
trunk/system/src/main/org/jboss/system/server/profileservice/attachments/LazyPredeterminedManagedObjects.java
trunk/system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java
trunk/system/src/main/org/jboss/system/server/profileservice/repository/DeploymentUtils.java
trunk/testsuite/src/main/org/jboss/test/deployers/test/DeploymentManagerUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java
Log:
change jms dest managed property impact to lifecycle
Modified: trunk/component-matrix/pom.xml
===================================================================
--- trunk/component-matrix/pom.xml 2009-06-04 15:20:11 UTC (rev 89827)
+++ trunk/component-matrix/pom.xml 2009-06-04 15:28:09 UTC (rev 89828)
@@ -79,7 +79,7 @@
<version.org.jboss.logbridge>1.0.0.GA</version.org.jboss.logbridge>
<version.org.jboss.logging>2.1.0.GA</version.org.jboss.logging>
<version.org.jboss.logmanager>1.0.0.GA</version.org.jboss.logmanager>
- <version.org.jboss.man>2.1.0.SP1</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.0.CR16</version.org.jboss.metadata>
<version.org.jboss.microcontainer>2.0.4.GA</version.org.jboss.microcontainer>
Modified: trunk/messaging/src/main/org/jboss/jms/server/destination/QueueServiceMO.java
===================================================================
--- trunk/messaging/src/main/org/jboss/jms/server/destination/QueueServiceMO.java 2009-06-04 15:20:11 UTC (rev 89827)
+++ trunk/messaging/src/main/org/jboss/jms/server/destination/QueueServiceMO.java 2009-06-04 15:28:09 UTC (rev 89828)
@@ -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: trunk/messaging/src/main/org/jboss/jms/server/destination/TopicServiceMO.java
===================================================================
--- trunk/messaging/src/main/org/jboss/jms/server/destination/TopicServiceMO.java 2009-06-04 15:20:11 UTC (rev 89827)
+++ trunk/messaging/src/main/org/jboss/jms/server/destination/TopicServiceMO.java 2009-06-04 15:28:09 UTC (rev 89828)
@@ -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: trunk/profileservice/src/main/org/jboss/profileservice/management/upload/DeploymentProgressImpl.java
===================================================================
--- trunk/profileservice/src/main/org/jboss/profileservice/management/upload/DeploymentProgressImpl.java 2009-06-04 15:20:11 UTC (rev 89827)
+++ trunk/profileservice/src/main/org/jboss/profileservice/management/upload/DeploymentProgressImpl.java 2009-06-04 15:28:09 UTC (rev 89828)
@@ -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: trunk/profileservice/src/main/org/jboss/profileservice/management/upload/SerializableDeploymentID.java
===================================================================
--- trunk/profileservice/src/main/org/jboss/profileservice/management/upload/SerializableDeploymentID.java 2009-06-04 15:20:11 UTC (rev 89827)
+++ trunk/profileservice/src/main/org/jboss/profileservice/management/upload/SerializableDeploymentID.java 2009-06-04 15:28:09 UTC (rev 89828)
@@ -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: trunk/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java 2009-06-04 15:20:11 UTC (rev 89827)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java 2009-06-04 15:28:09 UTC (rev 89828)
@@ -253,8 +253,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 +286,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 +308,7 @@
public void shutdown(Server server)
{
- // Disable hotdeployment scanning
+ // Disable modification checks on all mutable profiles
for(ProfileKey key : profileService.getActiveProfileKeys())
{
try
@@ -324,7 +325,8 @@
try
{
// Release
- profileService.deactivateProfile(profileKey);
+ if(profileService.getActiveProfileKeys().contains(profileKey))
+ profileService.deactivateProfile(profileKey);
}
catch(Throwable t)
{
@@ -333,8 +335,8 @@
try
{
// Unregister
- Profile profile = profileService.getProfile(profileKey);
- profileService.unregisterProfile(profileKey);
+ if(profileService.getProfileKeys().contains(profileKey))
+ profileService.unregisterProfile(profileKey);
}
catch(Throwable t)
{
@@ -352,7 +354,6 @@
{
try
{
- // TODO update to unregister(ProfileKey);
profileService.unregisterProfile(key);
}
catch(Throwable t)
Modified: trunk/system/src/main/org/jboss/system/server/profileservice/attachments/LazyPredeterminedManagedObjects.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/attachments/LazyPredeterminedManagedObjects.java 2009-06-04 15:20:11 UTC (rev 89827)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/attachments/LazyPredeterminedManagedObjects.java 2009-06-04 15:28:09 UTC (rev 89828)
@@ -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: trunk/system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java 2009-06-04 15:20:11 UTC (rev 89827)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/hotdeploy/HDScanner.java 2009-06-04 15:28:09 UTC (rev 89828)
@@ -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: trunk/system/src/main/org/jboss/system/server/profileservice/repository/DeploymentUtils.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/repository/DeploymentUtils.java 2009-06-04 15:20:11 UTC (rev 89827)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/repository/DeploymentUtils.java 2009-06-04 15:28:09 UTC (rev 89828)
@@ -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: trunk/testsuite/src/main/org/jboss/test/deployers/test/DeploymentManagerUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/deployers/test/DeploymentManagerUnitTestCase.java 2009-06-04 15:20:11 UTC (rev 89827)
+++ trunk/testsuite/src/main/org/jboss/test/deployers/test/DeploymentManagerUnitTestCase.java 2009-06-04 15:28:09 UTC (rev 89828)
@@ -280,7 +280,7 @@
Thread.sleep(10000);
try
{
- mgtView.getDeployment(HD_DEPLOYMENT);
+ getManagementView().getDeployment(HD_DEPLOYMENT);
fail(HD_DEPLOYMENT + " not undeployed");
}
catch(NoSuchDeploymentException e)
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java 2009-06-04 15:20:11 UTC (rev 89827)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java 2009-06-04 15:28:09 UTC (rev 89828)
@@ -112,6 +112,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"));
@@ -226,6 +227,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