diff --git a/clustering/infinispan/pom.xml b/clustering/infinispan/pom.xml
index 3ced51e434f..beacf2c6a39 100644
--- a/clustering/infinispan/pom.xml
+++ b/clustering/infinispan/pom.xml
@@ -74,5 +74,10 @@
test
tests
+
+ org.jboss.as
+ jboss-as-subsystem-test
+ test
+
diff --git a/clustering/infinispan/src/test/java/org/jboss/as/clustering/infinispan/subsystem/InfinispanSubsystemTestCase.java b/clustering/infinispan/src/test/java/org/jboss/as/clustering/infinispan/subsystem/InfinispanSubsystemTestCase.java
new file mode 100644
index 00000000000..a294cbdf7bc
--- /dev/null
+++ b/clustering/infinispan/src/test/java/org/jboss/as/clustering/infinispan/subsystem/InfinispanSubsystemTestCase.java
@@ -0,0 +1,108 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.clustering.infinispan.subsystem;
+
+import java.io.IOException;
+
+import org.jboss.as.controller.OperationContext;
+import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
+import org.jboss.as.subsystem.test.AdditionalInitialization;
+import org.jboss.as.subsystem.test.ModelDescriptionValidator.ValidationConfiguration;
+import org.junit.Ignore;
+
+/**
+ *
+ * @author Kabir Khan
+ */
+@Ignore
+public class InfinispanSubsystemTestCase extends AbstractSubsystemBaseTest {
+
+ public InfinispanSubsystemTestCase() {
+ super(InfinispanExtension.SUBSYSTEM_NAME, new InfinispanExtension());
+ }
+
+ @Override
+ protected String getSubsystemXml() throws IOException {
+ //TODO: This is copied from standalone-ha.xml you may want to try more combinations
+
+ return
+ "" +
+ "" +
+ " ha-partition" +
+ " " +
+ " " +
+ " " +
+ "" +
+ "" +
+ " standard-session-cache" +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ "" +
+ "" +
+ " sfsb-cache" +
+ " jboss.cache:service=EJB3SFSBClusteredCache" +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ "" +
+ "" +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ "" +
+ "";
+ }
+
+ protected AdditionalInitialization createAdditionalInitialization() {
+ return new AdditionalInitialization(){
+ @Override
+ protected OperationContext.Type getType() {
+ return OperationContext.Type.MANAGEMENT;
+ }
+
+
+ @Override
+ protected ValidationConfiguration getModelValidationConfiguration() {
+ //TODO fix validation https://issues.jboss.org/browse/AS7-1788
+ return null;
+ }
+ };
+ }
+
+
+}
diff --git a/clustering/jgroups/pom.xml b/clustering/jgroups/pom.xml
index 67a913fdb65..d52f7778e36 100644
--- a/clustering/jgroups/pom.xml
+++ b/clustering/jgroups/pom.xml
@@ -65,5 +65,10 @@
test
tests
+
+ org.jboss.as
+ jboss-as-subsystem-test
+ test
+
diff --git a/clustering/jgroups/src/test/java/org/jboss/as/clustering/jgroups/subsystem/JGroupsExtensionTest.java b/clustering/jgroups/src/test/java/org/jboss/as/clustering/jgroups/subsystem/JGroupsExtensionTest.java
index 2addf653ada..c3c5b24d2f0 100644
--- a/clustering/jgroups/src/test/java/org/jboss/as/clustering/jgroups/subsystem/JGroupsExtensionTest.java
+++ b/clustering/jgroups/src/test/java/org/jboss/as/clustering/jgroups/subsystem/JGroupsExtensionTest.java
@@ -27,12 +27,13 @@
import java.util.List;
-import org.jboss.as.clustering.jgroups.subsystem.Namespace;
import org.jboss.as.clustering.subsystem.AbstractExtensionTest;
import org.jboss.as.controller.OperationContext;
import org.jboss.as.controller.OperationFailedException;
import org.jboss.as.controller.PathAddress;
import org.jboss.as.controller.registry.Resource;
+import org.jboss.as.subsystem.test.AdditionalInitialization;
+import org.jboss.as.subsystem.test.ModelDescriptionValidator.ValidationConfiguration;
import org.jboss.dmr.ModelNode;
public class JGroupsExtensionTest extends AbstractExtensionTest {
@@ -71,4 +72,21 @@ protected ModelNode populate(List operations) throws OperationFailedE
}
return model;
}
+
+ protected AdditionalInitialization createAdditionalInitialization() {
+ return new AdditionalInitialization(){
+ @Override
+ protected OperationContext.Type getType() {
+ return OperationContext.Type.MANAGEMENT;
+ }
+
+
+ @Override
+ protected ValidationConfiguration getModelValidationConfiguration() {
+ //TODO fix validation https://issues.jboss.org/browse/AS7-1786
+ return null;
+ }
+ };
+ }
+
}
diff --git a/clustering/jgroups/src/test/java/org/jboss/as/clustering/jgroups/subsystem/JGroupsSubsystemTest.java b/clustering/jgroups/src/test/java/org/jboss/as/clustering/jgroups/subsystem/JGroupsSubsystemTest.java
new file mode 100644
index 00000000000..b0d08f4171b
--- /dev/null
+++ b/clustering/jgroups/src/test/java/org/jboss/as/clustering/jgroups/subsystem/JGroupsSubsystemTest.java
@@ -0,0 +1,84 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.clustering.jgroups.subsystem;
+
+import java.io.IOException;
+
+import org.jboss.as.controller.OperationContext;
+import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
+import org.jboss.as.subsystem.test.AdditionalInitialization;
+import org.jboss.as.subsystem.test.ModelDescriptionValidator.ValidationConfiguration;
+
+/**
+ *
+ * @author Kabir Khan
+ */
+public class JGroupsSubsystemTest extends AbstractSubsystemBaseTest {
+
+ public JGroupsSubsystemTest() {
+ // FIXME JGroupsSubsystemTest constructor
+ super(JGroupsExtension.SUBSYSTEM_NAME, new JGroupsExtension());
+ }
+
+ @Override
+ protected String getSubsystemXml() throws IOException {
+ //TODO: This is copied from standalone-ha.xml you may want to try more combinations
+ return "" +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ "";
+ }
+
+ protected AdditionalInitialization createAdditionalInitialization() {
+ return new AdditionalInitialization(){
+ @Override
+ protected OperationContext.Type getType() {
+ return OperationContext.Type.MANAGEMENT;
+ }
+
+
+ @Override
+ protected ValidationConfiguration getModelValidationConfiguration() {
+ //TODO fix validation https://issues.jboss.org/browse/AS7-1787
+ return null;
+ }
+ };
+ }
+
+}
diff --git a/connector/pom.xml b/connector/pom.xml
index 76a601454a4..f53ea3d183c 100644
--- a/connector/pom.xml
+++ b/connector/pom.xml
@@ -149,5 +149,10 @@
junit
test
+
+ org.jboss.as
+ jboss-as-subsystem-test
+ test
+
diff --git a/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/Constants.java b/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/Constants.java
index 7963e0bf59d..cb132878177 100644
--- a/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/Constants.java
+++ b/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/Constants.java
@@ -44,8 +44,6 @@
*/
class Constants {
- static final String DATASOURCES_SUBSYTEM = "datasources-subsystem";
-
static final String DATASOURCES = "datasources";
static final String DATA_SOURCE = "data-source";
diff --git a/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/DataSourcesExtension.java b/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/DataSourcesExtension.java
index 928524dceb9..78ee46eb7da 100644
--- a/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/DataSourcesExtension.java
+++ b/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/DataSourcesExtension.java
@@ -181,12 +181,14 @@
*/
public class DataSourcesExtension implements Extension {
+ public static final String SUBSYSTEM_NAME = Constants.DATASOURCES;
+
@Override
public void initialize(final ExtensionContext context) {
SUBSYSTEM_DATASOURCES_LOGGER.debugf("Initializing Datasources Extension");
// Register the remoting subsystem
- final SubsystemRegistration registration = context.registerSubsystem(DATASOURCES);
+ final SubsystemRegistration registration = context.registerSubsystem(SUBSYSTEM_NAME);
registration.registerXMLElementWriter(NewDataSourceSubsystemParser.INSTANCE);
diff --git a/connector/src/main/java/org/jboss/as/connector/subsystems/jca/JcaExtension.java b/connector/src/main/java/org/jboss/as/connector/subsystems/jca/JcaExtension.java
index e3499f113ac..966288bae02 100644
--- a/connector/src/main/java/org/jboss/as/connector/subsystems/jca/JcaExtension.java
+++ b/connector/src/main/java/org/jboss/as/connector/subsystems/jca/JcaExtension.java
@@ -87,7 +87,7 @@
*/
public class JcaExtension implements Extension {
- private static String SUBSYSTEM_NAME = "jca";
+ public static String SUBSYSTEM_NAME = "jca";
@Override
public void initialize(final ExtensionContext context) {
diff --git a/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersExtension.java b/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersExtension.java
index d11614371da..e734f765079 100644
--- a/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersExtension.java
+++ b/connector/src/main/java/org/jboss/as/connector/subsystems/resourceadapters/ResourceAdaptersExtension.java
@@ -124,11 +124,13 @@
*/
public class ResourceAdaptersExtension implements Extension {
+ public static final String SUBSYSTEM_NAME = RESOURCEADAPTERS_NAME;
+
@Override
public void initialize(final ExtensionContext context) {
SUBSYSTEM_RA_LOGGER.debugf("Initializing ResourceAdapters Extension");
// Register the remoting subsystem
- final SubsystemRegistration registration = context.registerSubsystem(RESOURCEADAPTERS_NAME);
+ final SubsystemRegistration registration = context.registerSubsystem(SUBSYSTEM_NAME);
registration.registerXMLElementWriter(ResourceAdapterSubsystemParser.INSTANCE);
diff --git a/connector/src/test/java/org/jboss/as/connector/subsystems/jca/DatasourcesSubsystemTestCase.java b/connector/src/test/java/org/jboss/as/connector/subsystems/jca/DatasourcesSubsystemTestCase.java
new file mode 100644
index 00000000000..1f0883111f0
--- /dev/null
+++ b/connector/src/test/java/org/jboss/as/connector/subsystems/jca/DatasourcesSubsystemTestCase.java
@@ -0,0 +1,89 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.connector.subsystems.jca;
+
+import java.io.IOException;
+
+import org.jboss.as.connector.subsystems.datasources.DataSourcesExtension;
+import org.jboss.as.controller.OperationContext;
+import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
+import org.jboss.as.subsystem.test.AdditionalInitialization;
+import org.jboss.as.subsystem.test.ModelDescriptionValidator.ValidationConfiguration;
+
+/**
+ *
+ * @author Kabir Khan
+ */
+public class DatasourcesSubsystemTestCase extends AbstractSubsystemBaseTest {
+
+ public DatasourcesSubsystemTestCase() {
+ // FIXME DatasourcesSubsystemTestCase constructor
+ super(DataSourcesExtension.SUBSYSTEM_NAME, new DataSourcesExtension());
+ }
+
+ @Override
+ protected String getSubsystemXml() throws IOException {
+ //TODO: This is copied from standalone.xml you may want to try more combinations
+ return "" +
+ " " +
+ " " +
+ " jdbc:h2:mem:test;DB_CLOSE_DELAY=-1" +
+ " h2" +
+ " " +
+ " " +
+ " sa" +
+ " sa" +
+ " " +
+ " " +
+ " " +
+ " " +
+ " org.h2.jdbcx.JdbcDataSource" +
+ " " +
+ " " +
+ " " +
+ "";
+ }
+
+ protected AdditionalInitialization createAdditionalInitialization() {
+ return new AdditionalInitialization(){
+ @Override
+ protected OperationContext.Type getType() {
+ return OperationContext.Type.MANAGEMENT;
+ }
+
+
+ @Override
+ protected ValidationConfiguration getModelValidationConfiguration() {
+ //TODO fix providers https://issues.jboss.org/browse/AS7-1789
+ return null;
+ }
+
+ @Override
+ protected boolean isValidateOperations() {
+ //TODO fix providers https://issues.jboss.org/browse/AS7-1789
+ return false;
+ }
+ };
+ }
+
+
+}
diff --git a/connector/src/test/java/org/jboss/as/connector/subsystems/jca/JcaSubsystemTestCase.java b/connector/src/test/java/org/jboss/as/connector/subsystems/jca/JcaSubsystemTestCase.java
new file mode 100644
index 00000000000..57b05e96280
--- /dev/null
+++ b/connector/src/test/java/org/jboss/as/connector/subsystems/jca/JcaSubsystemTestCase.java
@@ -0,0 +1,87 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.connector.subsystems.jca;
+
+import java.io.IOException;
+
+import org.jboss.as.controller.OperationContext;
+import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
+import org.jboss.as.subsystem.test.AdditionalInitialization;
+import org.jboss.as.subsystem.test.ModelDescriptionValidator.ValidationConfiguration;
+
+/**
+ *
+ * @author Kabir Khan
+ */
+public class JcaSubsystemTestCase extends AbstractSubsystemBaseTest {
+
+ public JcaSubsystemTestCase() {
+ // FIXME JcaSubsystemTestCase constructor
+ super(JcaExtension.SUBSYSTEM_NAME, new JcaExtension());
+ }
+
+ @Override
+ protected String getSubsystemXml() throws IOException {
+ //TODO: This is copied from standalone.xml you may want to try more combinations
+ return
+ "" +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ "";
+ }
+
+ protected AdditionalInitialization createAdditionalInitialization() {
+ return new AdditionalInitialization(){
+ @Override
+ protected OperationContext.Type getType() {
+ return OperationContext.Type.MANAGEMENT;
+ }
+
+
+ @Override
+ protected ValidationConfiguration getModelValidationConfiguration() {
+ //TODO fix providers https://issues.jboss.org/browse/AS7-1789
+ return null;
+ }
+
+ @Override
+ protected boolean isValidateOperations() {
+ //TODO fix providers https://issues.jboss.org/browse/AS7-1789
+ return false;
+ }
+ };
+ }
+}
diff --git a/connector/src/test/java/org/jboss/as/connector/subsystems/jca/ResourceAdaptersSubsystemTestCase.java b/connector/src/test/java/org/jboss/as/connector/subsystems/jca/ResourceAdaptersSubsystemTestCase.java
new file mode 100644
index 00000000000..8049f8ac6d0
--- /dev/null
+++ b/connector/src/test/java/org/jboss/as/connector/subsystems/jca/ResourceAdaptersSubsystemTestCase.java
@@ -0,0 +1,67 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.connector.subsystems.jca;
+
+import java.io.IOException;
+
+import org.jboss.as.connector.subsystems.resourceadapters.ResourceAdaptersExtension;
+import org.jboss.as.controller.OperationContext;
+import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
+import org.jboss.as.subsystem.test.AdditionalInitialization;
+import org.jboss.as.subsystem.test.ModelDescriptionValidator.ValidationConfiguration;
+
+/**
+ *
+ * @author Kabir Khan
+ */
+public class ResourceAdaptersSubsystemTestCase extends AbstractSubsystemBaseTest {
+
+ public ResourceAdaptersSubsystemTestCase() {
+ // FIXME ResourceAdaptersSubsystemTestCase constructor
+ super(ResourceAdaptersExtension.SUBSYSTEM_NAME, new ResourceAdaptersExtension());
+ }
+
+ @Override
+ protected String getSubsystemXml() throws IOException {
+ //TODO: This is copied from standalone.xml you may want to try more combinations
+ return "";
+ }
+
+
+ protected AdditionalInitialization createAdditionalInitialization() {
+ return new AdditionalInitialization(){
+ @Override
+ protected OperationContext.Type getType() {
+ return OperationContext.Type.MANAGEMENT;
+ }
+
+
+ @Override
+ protected ValidationConfiguration getModelValidationConfiguration() {
+ //TODO fix providers https://issues.jboss.org/browse/AS7-1789
+ return null;
+ }
+
+ };
+ }
+
+}
diff --git a/controller/src/main/java/org/jboss/as/controller/descriptions/ModelDescriptionConstants.java b/controller/src/main/java/org/jboss/as/controller/descriptions/ModelDescriptionConstants.java
index 8d1d2cb0c68..f368ed7debf 100644
--- a/controller/src/main/java/org/jboss/as/controller/descriptions/ModelDescriptionConstants.java
+++ b/controller/src/main/java/org/jboss/as/controller/descriptions/ModelDescriptionConstants.java
@@ -121,11 +121,9 @@ public class ModelDescriptionConstants {
public static final String MAX_LENGTH = "max-length";
public static final String MAX_OCCURS = "max-occurs";
public static final String MAX_THREADS = "max-threads";
- public static final String MAX_VALUE = "max-value";
public static final String MIN = "min";
public static final String MIN_LENGTH = "min-length";
public static final String MIN_OCCURS = "min-occurs";
- public static final String MIN_VALUE = "min-value";
public static final String MODEL_DESCRIPTION = "model-description";
public static final String MULTICAST_ADDRESS = "multicast-address";
public static final String MULTICAST_PORT = "multicast-port";
diff --git a/controller/src/main/java/org/jboss/as/controller/descriptions/common/DeploymentDescription.java b/controller/src/main/java/org/jboss/as/controller/descriptions/common/DeploymentDescription.java
index 38c1d651ff0..21d4d0a5d75 100644
--- a/controller/src/main/java/org/jboss/as/controller/descriptions/common/DeploymentDescription.java
+++ b/controller/src/main/java/org/jboss/as/controller/descriptions/common/DeploymentDescription.java
@@ -18,12 +18,6 @@
*/
package org.jboss.as.controller.descriptions.common;
-import org.jboss.dmr.ModelNode;
-import org.jboss.dmr.ModelType;
-
-import java.util.Locale;
-import java.util.ResourceBundle;
-
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ARCHIVE;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ATTRIBUTES;
@@ -38,9 +32,9 @@
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.HEAD_COMMENT_ALLOWED;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.INPUT_STREAM_INDEX;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MAX_LENGTH;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MIN;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MIN_LENGTH;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MIN_OCCURS;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MIN_VALUE;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MODEL_DESCRIPTION;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.NAME;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.NILLABLE;
@@ -68,6 +62,12 @@
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.URL;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.VALUE_TYPE;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import org.jboss.dmr.ModelNode;
+import org.jboss.dmr.ModelType;
+
/**
* Model descriptions for deployment resources.
*
@@ -104,7 +104,7 @@ public static final ModelNode getDeploymentDescription(Locale locale, boolean in
root.get(ATTRIBUTES, CONTENT, VALUE_TYPE, INPUT_STREAM_INDEX, TYPE).set(ModelType.INT);
root.get(ATTRIBUTES, CONTENT, VALUE_TYPE, INPUT_STREAM_INDEX, DESCRIPTION).set(bundle.getString("deployment.inputstream"));
root.get(ATTRIBUTES, CONTENT, VALUE_TYPE, INPUT_STREAM_INDEX, REQUIRED).set(false);
- root.get(ATTRIBUTES, CONTENT, VALUE_TYPE, INPUT_STREAM_INDEX, MIN_VALUE).set(0);
+ root.get(ATTRIBUTES, CONTENT, VALUE_TYPE, INPUT_STREAM_INDEX, MIN).set(0);
root.get(ATTRIBUTES, CONTENT, VALUE_TYPE, INPUT_STREAM_INDEX, NILLABLE).set(true);
root.get(ATTRIBUTES, CONTENT, VALUE_TYPE, HASH, TYPE).set(ModelType.BYTES);
root.get(ATTRIBUTES, CONTENT, VALUE_TYPE, HASH, DESCRIPTION).set(bundle.getString("deployment.hash"));
@@ -232,7 +232,7 @@ public static final ModelNode getUploadDeploymentStreamAttachmentOperation(Local
root.get(REQUEST_PROPERTIES, INPUT_STREAM_INDEX, TYPE).set(ModelType.STRING);
root.get(REQUEST_PROPERTIES, INPUT_STREAM_INDEX, DESCRIPTION).set(bundle.getString("deployment.inputstream"));
root.get(REQUEST_PROPERTIES, INPUT_STREAM_INDEX, REQUIRED).set(true);
- root.get(REQUEST_PROPERTIES, INPUT_STREAM_INDEX, MIN_VALUE).set(0);
+ root.get(REQUEST_PROPERTIES, INPUT_STREAM_INDEX, MIN).set(0);
root.get(REQUEST_PROPERTIES, INPUT_STREAM_INDEX, NILLABLE).set(false);
root.get(REPLY_PROPERTIES, TYPE).set(ModelType.BYTES);
root.get(REPLY_PROPERTIES, DESCRIPTION).set(bundle.getString("deployment.hash"));
@@ -343,7 +343,7 @@ private static void getDeploymentContentParamDescription(ModelNode root, Resourc
root.get(REQUEST_PROPERTIES, CONTENT, VALUE_TYPE, INPUT_STREAM_INDEX, TYPE).set(ModelType.INT);
root.get(REQUEST_PROPERTIES, CONTENT, VALUE_TYPE, INPUT_STREAM_INDEX, DESCRIPTION).set(bundle.getString("deployment.inputstream"));
root.get(REQUEST_PROPERTIES, CONTENT, VALUE_TYPE, INPUT_STREAM_INDEX, REQUIRED).set(false);
- root.get(REQUEST_PROPERTIES, CONTENT, VALUE_TYPE, INPUT_STREAM_INDEX, MIN_VALUE).set(0);
+ root.get(REQUEST_PROPERTIES, CONTENT, VALUE_TYPE, INPUT_STREAM_INDEX, MIN).set(0);
root.get(REQUEST_PROPERTIES, CONTENT, VALUE_TYPE, INPUT_STREAM_INDEX, NILLABLE).set(true);
root.get(REQUEST_PROPERTIES, CONTENT, VALUE_TYPE, HASH, TYPE).set(ModelType.BYTES);
root.get(REQUEST_PROPERTIES, CONTENT, VALUE_TYPE, HASH, DESCRIPTION).set(bundle.getString("deployment.hash"));
diff --git a/ee/pom.xml b/ee/pom.xml
index 748dbbd0ccf..2d8b02d127b 100644
--- a/ee/pom.xml
+++ b/ee/pom.xml
@@ -88,5 +88,10 @@
junit
test
+
+ org.jboss.as
+ jboss-as-subsystem-test
+ test
+
diff --git a/ee/src/main/java/org/jboss/as/ee/subsystem/EeExtension.java b/ee/src/main/java/org/jboss/as/ee/subsystem/EeExtension.java
index ca35267ce6e..3127f74164d 100644
--- a/ee/src/main/java/org/jboss/as/ee/subsystem/EeExtension.java
+++ b/ee/src/main/java/org/jboss/as/ee/subsystem/EeExtension.java
@@ -75,7 +75,7 @@
public class EeExtension implements Extension {
public static final String NAMESPACE = "urn:jboss:domain:ee:1.0";
- private static final String SUBSYSTEM_NAME = "ee";
+ public static final String SUBSYSTEM_NAME = "ee";
private static final EESubsystemParser parser = new EESubsystemParser();
/**
diff --git a/ee/src/test/java/org/jboss/as/ee/subsystem/EeSubsystemTestCase.java b/ee/src/test/java/org/jboss/as/ee/subsystem/EeSubsystemTestCase.java
new file mode 100644
index 00000000000..efe43aa5f42
--- /dev/null
+++ b/ee/src/test/java/org/jboss/as/ee/subsystem/EeSubsystemTestCase.java
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.ee.subsystem;
+
+import java.io.IOException;
+
+import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
+
+/**
+ *
+ * @author Kabir Khan
+ */
+public class EeSubsystemTestCase extends AbstractSubsystemBaseTest {
+
+ public EeSubsystemTestCase() {
+ super(EeExtension.SUBSYSTEM_NAME, new EeExtension());
+ }
+
+ @Override
+ protected String getSubsystemXml() throws IOException {
+ //TODO: This is copied from standalone.xml you may want to try more combinations
+ return "";
+ }
+
+}
diff --git a/ejb3/src/main/java/org/jboss/as/ejb3/subsystem/EJB3SubsystemDescriptions.java b/ejb3/src/main/java/org/jboss/as/ejb3/subsystem/EJB3SubsystemDescriptions.java
index 75d62510bef..2f5918ea4f1 100644
--- a/ejb3/src/main/java/org/jboss/as/ejb3/subsystem/EJB3SubsystemDescriptions.java
+++ b/ejb3/src/main/java/org/jboss/as/ejb3/subsystem/EJB3SubsystemDescriptions.java
@@ -22,17 +22,25 @@
package org.jboss.as.ejb3.subsystem;
-import org.jboss.as.controller.descriptions.DescriptionProvider;
-import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
-import org.jboss.as.ejb3.component.pool.StrictMaxPoolConfig;
-import org.jboss.dmr.ModelNode;
-import org.jboss.dmr.ModelType;
-
-import java.util.Locale;
-import java.util.ResourceBundle;
-import java.util.concurrent.TimeUnit;
-
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.*;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ALLOWED;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ATTRIBUTES;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.CHILDREN;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DEFAULT;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIPTION;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.HEAD_COMMENT_ALLOWED;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MIN;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MIN_OCCURS;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MODEL_DESCRIPTION;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.NAMESPACE;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OPERATIONS;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OPERATION_NAME;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REMOVE;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REPLY_PROPERTIES;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REQUEST_PROPERTIES;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REQUIRED;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.TAIL_COMMENT_ALLOWED;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.TYPE;
import static org.jboss.as.ejb3.subsystem.EJB3SubsystemModel.CORE_THREADS;
import static org.jboss.as.ejb3.subsystem.EJB3SubsystemModel.DEFAULT_MDB_INSTANCE_POOL;
import static org.jboss.as.ejb3.subsystem.EJB3SubsystemModel.DEFAULT_RESOURCE_ADAPTER_NAME;
@@ -47,6 +55,16 @@
import static org.jboss.as.ejb3.subsystem.EJB3SubsystemModel.SERVICE;
import static org.jboss.as.ejb3.subsystem.EJB3SubsystemModel.STRICT_MAX_BEAN_INSTANCE_POOL;
+import java.util.Locale;
+import java.util.ResourceBundle;
+import java.util.concurrent.TimeUnit;
+
+import org.jboss.as.controller.descriptions.DescriptionProvider;
+import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
+import org.jboss.as.ejb3.component.pool.StrictMaxPoolConfig;
+import org.jboss.dmr.ModelNode;
+import org.jboss.dmr.ModelType;
+
/**
* Static utilities containing subsystem resource and operation descriptions. Separated from the
* {@link DescriptionProvider} implementations so the cost of loading this code doesn't
@@ -142,7 +160,7 @@ static ModelNode getTimerServiceDescription(Locale locale) {
description.get(ATTRIBUTES, CORE_THREADS, TYPE).set(ModelType.INT);
description.get(ATTRIBUTES, CORE_THREADS, REQUIRED).set(false);
description.get(ATTRIBUTES, CORE_THREADS, DEFAULT).set(0);
- description.get(ATTRIBUTES, CORE_THREADS, MIN_VALUE).set(0);
+ description.get(ATTRIBUTES, CORE_THREADS, MIN).set(0);
description.get(ATTRIBUTES, PATH, DESCRIPTION).set(bundle.getString("ejb3.timerservice.path"));
description.get(ATTRIBUTES, PATH, TYPE).set(ModelType.STRING);
@@ -165,6 +183,7 @@ static ModelNode getTimerServiceDescription(Locale locale) {
static ModelNode getTimerServiceAddDescription(Locale locale) {
final ResourceBundle bundle = getResourceBundle(locale);
final ModelNode description = new ModelNode();
+ description.get(OPERATION_NAME).set(ADD);
// set the description of this operation
description.get(ModelDescriptionConstants.DESCRIPTION).set(bundle.getString("ejb3.timerservice.add"));
@@ -193,6 +212,7 @@ static ModelNode getTimerServiceAddDescription(Locale locale) {
static ModelNode getTimerServiceRemoveDescription(Locale locale) {
final ResourceBundle bundle = getResourceBundle(locale);
final ModelNode description = new ModelNode();
+ description.get(OPERATION_NAME).set(REMOVE);
// setup the description
description.get(DESCRIPTION).set(bundle.getString("ejb3.timerservice.remove"));
return description;
@@ -236,6 +256,7 @@ static ModelNode getStrictMaxBeanInstancePoolDescription(Locale locale) {
static ModelNode getStrictMaxPoolAddDescription(Locale locale) {
final ResourceBundle bundle = getResourceBundle(locale);
final ModelNode description = new ModelNode();
+ description.get(OPERATION_NAME).set(ADD);
// set the description of this operation
description.get(ModelDescriptionConstants.DESCRIPTION).set(bundle.getString("ejb3.strict-max-bean-instance-pool.add"));
@@ -267,6 +288,7 @@ static ModelNode getStrictMaxPoolAddDescription(Locale locale) {
static ModelNode getStrictMaxPoolRemoveDescription(Locale locale) {
final ResourceBundle bundle = getResourceBundle(locale);
final ModelNode description = new ModelNode();
+ description.get(OPERATION_NAME).set(REMOVE);
// setup the description
description.get(DESCRIPTION).set(bundle.getString("ejb3.strict-max-bean-instance-pool.remove"));
diff --git a/jacorb/pom.xml b/jacorb/pom.xml
index 053728531b9..e3dd5b70930 100644
--- a/jacorb/pom.xml
+++ b/jacorb/pom.xml
@@ -94,8 +94,14 @@
- org.picketbox
- picketbox
+ org.picketbox
+ picketbox
+
+
+
+ org.jboss.as
+ jboss-as-subsystem-test
+ test
diff --git a/jacorb/src/test/java/org/jboss/as/jacorb/JacORBSubsystemTestCase.java b/jacorb/src/test/java/org/jboss/as/jacorb/JacORBSubsystemTestCase.java
new file mode 100644
index 00000000000..da051bfbf91
--- /dev/null
+++ b/jacorb/src/test/java/org/jboss/as/jacorb/JacORBSubsystemTestCase.java
@@ -0,0 +1,77 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.jacorb;
+
+import java.io.IOException;
+
+import org.jboss.as.controller.OperationContext;
+import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
+import org.jboss.as.subsystem.test.AdditionalInitialization;
+import org.jboss.as.subsystem.test.ModelDescriptionValidator.ValidationConfiguration;
+
+/**
+ *
+ * @author Kabir Khan
+ */
+public class JacORBSubsystemTestCase extends AbstractSubsystemBaseTest {
+
+ public JacORBSubsystemTestCase() {
+ super(JacORBExtension.SUBSYSTEM_NAME, new JacORBExtension());
+ }
+
+ @Override
+ protected String getSubsystemXml() throws IOException {
+ //This is copied from standalone-preview.xml you may want to try more combinations
+ return
+ "" +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ "";
+ }
+
+ protected AdditionalInitialization createAdditionalInitialization() {
+ return new AdditionalInitialization(){
+ @Override
+ protected OperationContext.Type getType() {
+ return OperationContext.Type.MANAGEMENT;
+ }
+
+ @Override
+ protected boolean isValidateOperations() {
+ //TODO fix providers https://issues.jboss.org/browse/AS7-1791
+ return false;
+ }
+
+ @Override
+ protected ValidationConfiguration getModelValidationConfiguration() {
+ //TODO fix providers https://issues.jboss.org/browse/AS7-1791
+ return null;
+ }
+ };
+ }
+}
diff --git a/jaxrs/pom.xml b/jaxrs/pom.xml
index dc35becb74e..1345a26b8ff 100644
--- a/jaxrs/pom.xml
+++ b/jaxrs/pom.xml
@@ -112,5 +112,11 @@
junit
test
+
+
+ org.jboss.as
+ jboss-as-subsystem-test
+ test
+
diff --git a/jaxrs/src/test/java/org/jboss/as/jaxrs/JaxrsSubsystemTestCase.java b/jaxrs/src/test/java/org/jboss/as/jaxrs/JaxrsSubsystemTestCase.java
new file mode 100644
index 00000000000..26d59455053
--- /dev/null
+++ b/jaxrs/src/test/java/org/jboss/as/jaxrs/JaxrsSubsystemTestCase.java
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.jaxrs;
+
+import java.io.IOException;
+
+import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
+
+/**
+ *
+ * @author Kabir Khan
+ */
+public class JaxrsSubsystemTestCase extends AbstractSubsystemBaseTest {
+
+ public JaxrsSubsystemTestCase() {
+ super(JaxrsExtension.SUBSYSTEM_NAME, new JaxrsExtension());
+ }
+
+ @Override
+ protected String getSubsystemXml() throws IOException {
+ //TODO This is just copied from standalone.xml, more extensive testing is a good idea
+ return "";
+ }
+
+}
diff --git a/jmx/src/main/java/org/jboss/as/jmx/JMXSubsystemProviders.java b/jmx/src/main/java/org/jboss/as/jmx/JMXSubsystemProviders.java
index 4303facc04f..83d1bee9cb0 100644
--- a/jmx/src/main/java/org/jboss/as/jmx/JMXSubsystemProviders.java
+++ b/jmx/src/main/java/org/jboss/as/jmx/JMXSubsystemProviders.java
@@ -26,8 +26,6 @@
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ATTRIBUTES;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIPTION;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.HEAD_COMMENT_ALLOWED;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MAX_OCCURS;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MIN_OCCURS;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.NAMESPACE;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OPERATION_NAME;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REPLY_PROPERTIES;
@@ -66,14 +64,10 @@ public ModelNode getModelDescription(final Locale locale) {
subsystem.get(ATTRIBUTES, REGISTRY_BINDING, DESCRIPTION).set(bundle.getString("registry.binding"));
subsystem.get(ATTRIBUTES, REGISTRY_BINDING, TYPE).set(ModelType.STRING);
subsystem.get(ATTRIBUTES, REGISTRY_BINDING, REQUIRED).set(true);
- subsystem.get(ATTRIBUTES, REGISTRY_BINDING, MIN_OCCURS).set(1);
- subsystem.get(ATTRIBUTES, REGISTRY_BINDING, MAX_OCCURS).set(1);
subsystem.get(ATTRIBUTES, SERVER_BINDING, DESCRIPTION).set(bundle.getString("server.binding"));
subsystem.get(ATTRIBUTES, SERVER_BINDING, TYPE).set(ModelType.STRING);
subsystem.get(ATTRIBUTES, SERVER_BINDING, REQUIRED).set(true);
- subsystem.get(ATTRIBUTES, SERVER_BINDING, MIN_OCCURS).set(1);
- subsystem.get(ATTRIBUTES, SERVER_BINDING, MAX_OCCURS).set(1);
return subsystem;
}
@@ -105,14 +99,10 @@ public ModelNode getModelDescription(Locale locale) {
op.get(REQUEST_PROPERTIES, REGISTRY_BINDING, DESCRIPTION).set(bundle.getString("registry.binding"));
op.get(REQUEST_PROPERTIES, REGISTRY_BINDING, TYPE).set(ModelType.STRING);
op.get(REQUEST_PROPERTIES, REGISTRY_BINDING, REQUIRED).set(true);
- op.get(REQUEST_PROPERTIES, REGISTRY_BINDING, MIN_OCCURS).set(1);
- op.get(REQUEST_PROPERTIES, REGISTRY_BINDING, MAX_OCCURS).set(1);
op.get(REQUEST_PROPERTIES, SERVER_BINDING, DESCRIPTION).set(bundle.getString("server.binding"));
op.get(REQUEST_PROPERTIES, SERVER_BINDING, TYPE).set(ModelType.STRING);
op.get(REQUEST_PROPERTIES, SERVER_BINDING, REQUIRED).set(true);
- op.get(REQUEST_PROPERTIES, SERVER_BINDING, MIN_OCCURS).set(1);
- op.get(REQUEST_PROPERTIES, SERVER_BINDING, MAX_OCCURS).set(1);
op.get(REPLY_PROPERTIES).setEmptyObject();
diff --git a/jpa/core/pom.xml b/jpa/core/pom.xml
index cb910f6b83c..fe2eed5a6d1 100644
--- a/jpa/core/pom.xml
+++ b/jpa/core/pom.xml
@@ -190,5 +190,10 @@
org.slf4j
slf4j-api
+
+
+ org.jboss.as
+ jboss-as-subsystem-test
+
diff --git a/jpa/core/src/main/java/org/jboss/as/jpa/subsystem/JPADescriptions.java b/jpa/core/src/main/java/org/jboss/as/jpa/subsystem/JPADescriptions.java
index adc01d1279c..8886108c4cd 100644
--- a/jpa/core/src/main/java/org/jboss/as/jpa/subsystem/JPADescriptions.java
+++ b/jpa/core/src/main/java/org/jboss/as/jpa/subsystem/JPADescriptions.java
@@ -27,7 +27,6 @@
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.HEAD_COMMENT_ALLOWED;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MIN_LENGTH;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.NAMESPACE;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OPERATIONS;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OPERATION_NAME;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REPLY_PROPERTIES;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REQUEST_PROPERTIES;
@@ -66,8 +65,7 @@ static ModelNode getSubsystemDescription(Locale locale) {
subsystem.get(ATTRIBUTES, CommonAttributes.DEFAULT_DATASOURCE, TYPE).set(ModelType.STRING);
subsystem.get(ATTRIBUTES, CommonAttributes.DEFAULT_DATASOURCE, REQUIRED).set(true);
subsystem.get(ATTRIBUTES, CommonAttributes.DEFAULT_DATASOURCE, MIN_LENGTH).set(0);
- subsystem.get(OPERATIONS);
- subsystem.get(CHILDREN);
+ subsystem.get(CHILDREN).setEmptyObject();
return subsystem;
}
diff --git a/jpa/core/src/test/java/org/jboss/as/jpa/subsystem/JPASubsystemTestCase.java b/jpa/core/src/test/java/org/jboss/as/jpa/subsystem/JPASubsystemTestCase.java
new file mode 100644
index 00000000000..0b310f1d6c2
--- /dev/null
+++ b/jpa/core/src/test/java/org/jboss/as/jpa/subsystem/JPASubsystemTestCase.java
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.jpa.subsystem;
+
+import java.io.IOException;
+
+import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
+
+/**
+ *
+ * @author Kabir Khan
+ */
+public class JPASubsystemTestCase extends AbstractSubsystemBaseTest {
+
+ public JPASubsystemTestCase() {
+ super(JPAExtension.SUBSYSTEM_NAME, new JPAExtension());
+ }
+
+ @Override
+ protected String getSubsystemXml() throws IOException {
+ return
+ "" +
+ " " +
+ "";
+ }
+
+}
diff --git a/logging/pom.xml b/logging/pom.xml
index 3f1748ef647..78ce7a2b99f 100644
--- a/logging/pom.xml
+++ b/logging/pom.xml
@@ -63,5 +63,11 @@
org.jboss.msc
jboss-msc
+
+
+ org.jboss.as
+ jboss-as-subsystem-test
+ test
+
diff --git a/logging/src/test/java/org/jboss/as/logging/LoggingSubsystemTestCase.java b/logging/src/test/java/org/jboss/as/logging/LoggingSubsystemTestCase.java
new file mode 100644
index 00000000000..807635f4a46
--- /dev/null
+++ b/logging/src/test/java/org/jboss/as/logging/LoggingSubsystemTestCase.java
@@ -0,0 +1,102 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.logging;
+
+import java.io.IOException;
+
+import org.jboss.as.controller.OperationContext;
+import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
+import org.jboss.as.subsystem.test.AdditionalInitialization;
+import org.jboss.as.subsystem.test.ModelDescriptionValidator.ValidationConfiguration;
+import org.junit.Ignore;
+
+/**
+ *
+ * @author Kabir Khan
+ */
+@Ignore("The marshalling does not seem to be right - AS7-1792 ")
+public class LoggingSubsystemTestCase extends AbstractSubsystemBaseTest {
+
+ public LoggingSubsystemTestCase() {
+ super(LoggingExtension.SUBSYSTEM_NAME, new LoggingExtension());
+ }
+
+ @Override
+ protected String getSubsystemXml() throws IOException {
+ //TODO THis is copied from standalone.xml. Testing more combinations is a good idea
+ return
+ "" +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ "";
+ }
+
+
+ protected AdditionalInitialization createAdditionalInitialization() {
+ return new AdditionalInitialization(){
+ @Override
+ protected OperationContext.Type getType() {
+ return OperationContext.Type.MANAGEMENT;
+ }
+
+ @Override
+ protected ValidationConfiguration getModelValidationConfiguration() {
+ //TODO fix providers https://issues.jboss.org/browse/AS7-1792
+ return null;
+ }
+
+ @Override
+ protected boolean isValidateOperations() {
+ //TODO fix providers https://issues.jboss.org/browse/AS7-1792
+ return false;
+ }
+ };
+ }
+}
diff --git a/mail/src/main/java/org/jboss/as/mail/extension/MailSubsystemProviders.java b/mail/src/main/java/org/jboss/as/mail/extension/MailSubsystemProviders.java
index 229f64b6b84..5a47ef9c7d5 100644
--- a/mail/src/main/java/org/jboss/as/mail/extension/MailSubsystemProviders.java
+++ b/mail/src/main/java/org/jboss/as/mail/extension/MailSubsystemProviders.java
@@ -1,14 +1,27 @@
package org.jboss.as.mail.extension;
-import org.jboss.as.controller.descriptions.DescriptionProvider;
-import org.jboss.as.threads.CommonAttributes;
-import org.jboss.dmr.ModelNode;
-import org.jboss.dmr.ModelType;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ATTRIBUTES;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.CHILDREN;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIPTION;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.HEAD_COMMENT_ALLOWED;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MIN_OCCURS;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.NAMESPACE;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OPERATION_NAME;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REPLY_PROPERTIES;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REQUEST_PROPERTIES;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.REQUIRED;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.TAIL_COMMENT_ALLOWED;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.TYPE;
+import static org.jboss.as.mail.extension.ModelKeys.MAIL_SESSION;
import java.util.Locale;
import java.util.ResourceBundle;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.*;
+import org.jboss.as.controller.descriptions.DescriptionProvider;
+import org.jboss.as.threads.CommonAttributes;
+import org.jboss.dmr.ModelNode;
+import org.jboss.dmr.ModelType;
/**
* Contains the mail system description providers.
@@ -24,14 +37,16 @@ class MailSubsystemProviders {
*/
public static DescriptionProvider SUBSYSTEM = new DescriptionProvider() {
public ModelNode getModelDescription(Locale locale) {
- //The locale is passed in so you can internationalize the strings used in the descriptions
+ final ResourceBundle bundle = getResourceBundle(locale);
final ModelNode subsystem = new ModelNode();
- subsystem.get(DESCRIPTION).set("Mail subsystem");
+ subsystem.get(DESCRIPTION).set(bundle.getString("mail"));
subsystem.get(HEAD_COMMENT_ALLOWED).set(true);
subsystem.get(TAIL_COMMENT_ALLOWED).set(true);
subsystem.get(NAMESPACE).set(Namespace.CURRENT.getUriString());
+ subsystem.get(CHILDREN, MAIL_SESSION, DESCRIPTION).set(bundle.getString("mail.sessions.description"));
+ subsystem.get(CHILDREN, MAIL_SESSION, MIN_OCCURS).set(1);
return subsystem;
}
};
@@ -72,14 +87,17 @@ public ModelNode getModelDescription(final Locale locale) {
node.get(ATTRIBUTES, ModelKeys.DEBUG, TYPE).set(ModelType.STRING);
node.get(ATTRIBUTES, ModelKeys.DEBUG, REQUIRED).set(false);
- node.get(CHILDREN, ModelKeys.SMTP_SERVER, DESCRIPTION).set(bundle.getString("smtp-server"));
- node.get(CHILDREN, ModelKeys.SMTP_SERVER, REQUIRED).set(false);
+ node.get(ATTRIBUTES, ModelKeys.SMTP_SERVER, DESCRIPTION).set(bundle.getString("smtp-server"));
+ node.get(ATTRIBUTES, ModelKeys.SMTP_SERVER, TYPE).set(ModelType.STRING);
+ node.get(ATTRIBUTES, ModelKeys.SMTP_SERVER, REQUIRED).set(false);
- node.get(CHILDREN, ModelKeys.IMAP_SERVER, DESCRIPTION).set(bundle.getString("imap-server"));
- node.get(CHILDREN, ModelKeys.IMAP_SERVER, REQUIRED).set(false);
+ node.get(ATTRIBUTES, ModelKeys.IMAP_SERVER, DESCRIPTION).set(bundle.getString("imap-server"));
+ node.get(ATTRIBUTES, ModelKeys.IMAP_SERVER, TYPE).set(ModelType.STRING);
+ node.get(ATTRIBUTES, ModelKeys.IMAP_SERVER, REQUIRED).set(false);
- node.get(CHILDREN, ModelKeys.POP3_SERVER, DESCRIPTION).set(bundle.getString("pop3-server"));
- node.get(CHILDREN, ModelKeys.POP3_SERVER, REQUIRED).set(false);
+ node.get(ATTRIBUTES, ModelKeys.POP3_SERVER, DESCRIPTION).set(bundle.getString("pop3-server"));
+ node.get(ATTRIBUTES, ModelKeys.POP3_SERVER, TYPE).set(ModelType.STRING);
+ node.get(ATTRIBUTES, ModelKeys.POP3_SERVER, REQUIRED).set(false);
return node;
diff --git a/mail/src/main/resources/org/jboss/as/mail/extension/LocalDescriptions.properties b/mail/src/main/resources/org/jboss/as/mail/extension/LocalDescriptions.properties
index e18b2783d04..9f31db22cf8 100644
--- a/mail/src/main/resources/org/jboss/as/mail/extension/LocalDescriptions.properties
+++ b/mail/src/main/resources/org/jboss/as/mail/extension/LocalDescriptions.properties
@@ -1,4 +1,6 @@
+mail=The mail subsystem
mail.add=Adds the mail subsystem
+mail.sessions.description=Defines the mail sessions.
mail-session.add=Adds a mail session
pop3-server=The address of a POP3 Mail Server
imap-server=The address of an IMAP Mail Server
diff --git a/messaging/src/main/java/org/jboss/as/messaging/MessagingDescriptions.java b/messaging/src/main/java/org/jboss/as/messaging/MessagingDescriptions.java
index 568f3d847ab..30c7d5e472e 100644
--- a/messaging/src/main/java/org/jboss/as/messaging/MessagingDescriptions.java
+++ b/messaging/src/main/java/org/jboss/as/messaging/MessagingDescriptions.java
@@ -27,11 +27,11 @@
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ATTRIBUTES;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.CHILDREN;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIPTION;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MAX;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MAX_OCCURS;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MAX_VALUE;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MIN;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MIN_LENGTH;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MIN_OCCURS;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MIN_VALUE;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MODEL_DESCRIPTION;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.NAME;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.NILLABLE;
@@ -455,8 +455,8 @@ private static void populateCoreMessageDescription(final ResourceBundle bundle,
priority.get(DESCRIPTION).set(bundle.getString("queue.message.priority"));
priority.get(TYPE).set(ModelType.INT);
priority.get(NILLABLE).set(false);
- priority.get(MIN_VALUE).set(0);
- priority.get(MAX_VALUE).set(9);
+ priority.get(MIN).set(0);
+ priority.get(MAX).set(9);
}
public static ModelNode getCountMessages(Locale locale) {
@@ -590,8 +590,8 @@ private static void populatePriorityParam(final ResourceBundle bundle, final Mod
priority.get(DESCRIPTION).set(bundle.getString("queue.change-message-priority.new-priority"));
priority.get(TYPE).set(ModelType.INT);
priority.get(REQUIRED).set(true);
- priority.get(MIN_VALUE).set(0);
- priority.get(MAX_VALUE).set(9);
+ priority.get(MIN).set(0);
+ priority.get(MAX).set(9);
}
public static ModelNode getMoveMessage(Locale locale, boolean forJMS) {
diff --git a/messaging/src/test/java/org/jboss/as/messaging/test/MessagingAdditionalInitialization.java b/messaging/src/test/java/org/jboss/as/messaging/test/MessagingAdditionalInitialization.java
new file mode 100644
index 00000000000..d5141ae87e3
--- /dev/null
+++ b/messaging/src/test/java/org/jboss/as/messaging/test/MessagingAdditionalInitialization.java
@@ -0,0 +1,53 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.messaging.test;
+
+import org.jboss.as.controller.OperationContext;
+import org.jboss.as.subsystem.test.AdditionalInitialization;
+import org.jboss.as.subsystem.test.ModelDescriptionValidator.ValidationConfiguration;
+
+/**
+ *
+ * @author Kabir Khan
+ */
+public class MessagingAdditionalInitialization extends AdditionalInitialization {
+
+ private final OperationContext.Type type;
+
+ public MessagingAdditionalInitialization(OperationContext.Type type) {
+ this.type = type;
+ }
+
+ @Override
+ protected OperationContext.Type getType() {
+ return type;
+ }
+
+ @Override
+ protected ValidationConfiguration getModelValidationConfiguration() {
+ if (false) {
+ return super.getModelValidationConfiguration();
+ }
+ //TODO fix providers and register overrides above https://issues.jboss.org/browse/AS7-1790
+ return null;
+ }
+}
diff --git a/messaging/src/test/java/org/jboss/as/messaging/test/SubsystemDescriptionsUnitTestCase.java b/messaging/src/test/java/org/jboss/as/messaging/test/SubsystemDescriptionsUnitTestCase.java
index b449bcf5a28..df0e2a67f62 100644
--- a/messaging/src/test/java/org/jboss/as/messaging/test/SubsystemDescriptionsUnitTestCase.java
+++ b/messaging/src/test/java/org/jboss/as/messaging/test/SubsystemDescriptionsUnitTestCase.java
@@ -26,12 +26,11 @@
import java.util.List;
import junit.framework.Assert;
-import org.jboss.as.controller.OperationContext;
+
+import org.jboss.as.controller.OperationContext.Type;
import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
import org.jboss.as.messaging.MessagingExtension;
-import org.jboss.as.messaging.MessagingSubsystemParser;
import org.jboss.as.subsystem.test.AbstractSubsystemTest;
-import org.jboss.as.subsystem.test.AdditionalInitialization;
import org.jboss.as.subsystem.test.KernelServices;
import org.jboss.dmr.ModelNode;
import org.junit.Test;
@@ -52,7 +51,7 @@ public SubsystemDescriptionsUnitTestCase() {
public void testSubsystemDescriptions() throws Exception {
List empty = Collections.emptyList();
- KernelServices servicesA = super.installInController(null, empty);
+ KernelServices servicesA = super.installInController(new MessagingAdditionalInitialization(Type.SERVER), empty);
final ModelNode operation = createReadResourceDescriptionOperation();
final ModelNode result = servicesA.executeOperation(operation);
diff --git a/messaging/src/test/java/org/jboss/as/messaging/test/SubsystemParsingUnitTestCase.java b/messaging/src/test/java/org/jboss/as/messaging/test/SubsystemParsingUnitTestCase.java
index 32ad5ea8858..3a1641d061b 100644
--- a/messaging/src/test/java/org/jboss/as/messaging/test/SubsystemParsingUnitTestCase.java
+++ b/messaging/src/test/java/org/jboss/as/messaging/test/SubsystemParsingUnitTestCase.java
@@ -22,10 +22,12 @@
package org.jboss.as.messaging.test;
+import java.io.IOException;
+
+import org.jboss.as.controller.OperationContext.Type;
import org.jboss.as.messaging.MessagingExtension;
import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
-
-import java.io.IOException;
+import org.jboss.as.subsystem.test.AdditionalInitialization;
/**
* @author Emanuel Muckenhuber
@@ -42,4 +44,10 @@ protected String getSubsystemXml() throws IOException {
return readResource("subsystem.xml");
}
+
+ @Override
+ protected AdditionalInitialization createAdditionalInitialization() {
+ return new MessagingAdditionalInitialization(Type.MANAGEMENT);
+ }
+
}
diff --git a/modcluster/pom.xml b/modcluster/pom.xml
index 8b0159369e5..3133fbd39cf 100644
--- a/modcluster/pom.xml
+++ b/modcluster/pom.xml
@@ -79,5 +79,10 @@
junit
test
+
+ org.jboss.as
+ jboss-as-subsystem-test
+ test
+
diff --git a/modcluster/src/test/java/org/jboss/as/modcluster/test/ModClusterSubsystemTestCase.java b/modcluster/src/test/java/org/jboss/as/modcluster/test/ModClusterSubsystemTestCase.java
new file mode 100644
index 00000000000..022333f34b6
--- /dev/null
+++ b/modcluster/src/test/java/org/jboss/as/modcluster/test/ModClusterSubsystemTestCase.java
@@ -0,0 +1,75 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.modcluster.test;
+
+import java.io.IOException;
+
+import org.jboss.as.controller.OperationContext;
+import org.jboss.as.modcluster.ModClusterExtension;
+import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
+import org.jboss.as.subsystem.test.AdditionalInitialization;
+import org.jboss.as.subsystem.test.ModelDescriptionValidator.ValidationConfiguration;
+import org.junit.Ignore;
+
+/**
+ *
+ * @author Kabir Khan
+ */
+@Ignore("Seems to have some problems in the marshalling AS7-1795")
+public class ModClusterSubsystemTestCase extends AbstractSubsystemBaseTest {
+
+ public ModClusterSubsystemTestCase() {
+ super(ModClusterExtension.SUBSYSTEM_NAME, new ModClusterExtension());
+ }
+
+ @Override
+ protected String getSubsystemXml() throws IOException {
+ //This is just copied from standalone-ha.xml, testing for more combinations would be good
+ return
+ "" +
+ " " +
+ "";
+ }
+
+ protected AdditionalInitialization createAdditionalInitialization() {
+ return new AdditionalInitialization(){
+ @Override
+ protected OperationContext.Type getType() {
+ return OperationContext.Type.MANAGEMENT;
+ }
+
+
+ @Override
+ protected ValidationConfiguration getModelValidationConfiguration() {
+ //TODO fix providers https://issues.jboss.org/browse/AS7-1795
+ return null;
+ }
+
+ @Override
+ protected boolean isValidateOperations() {
+ //TODO fix providers https://issues.jboss.org/browse/AS7-1795
+ return false;
+ }
+ };
+ }
+
+}
diff --git a/naming/pom.xml b/naming/pom.xml
index ecb27ff7d75..5668fe7a0c1 100644
--- a/naming/pom.xml
+++ b/naming/pom.xml
@@ -76,5 +76,10 @@
junit
test
+
+ org.jboss.as
+ jboss-as-subsystem-test
+ test
+
diff --git a/naming/src/main/java/org/jboss/as/naming/service/NamingSubsystemProviders.java b/naming/src/main/java/org/jboss/as/naming/service/NamingSubsystemProviders.java
index b03cdc959af..0f6947d95d0 100644
--- a/naming/src/main/java/org/jboss/as/naming/service/NamingSubsystemProviders.java
+++ b/naming/src/main/java/org/jboss/as/naming/service/NamingSubsystemProviders.java
@@ -22,7 +22,6 @@
package org.jboss.as.naming.service;
-import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIPTION;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.HEAD_COMMENT_ALLOWED;
@@ -34,6 +33,8 @@
import java.util.ResourceBundle;
import org.jboss.as.controller.descriptions.DescriptionProvider;
+import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
+import org.jboss.as.naming.management.JndiViewOperation;
import org.jboss.dmr.ModelNode;
/**
@@ -77,7 +78,7 @@ public ModelNode getModelDescription(final Locale locale) {
final ResourceBundle bundle = getResourceBundle(locale);
final ModelNode op = new ModelNode();
- op.get(ModelDescriptionConstants.OPERATION_NAME).set(OPERATION_NAME);
+ op.get(ModelDescriptionConstants.OPERATION_NAME).set(JndiViewOperation.OPERATION_NAME);
op.get(DESCRIPTION).set(bundle.getString("naming.jndi-view"));
return op;
diff --git a/naming/src/test/java/org/jboss/as/naming/NamingSubsystemTestCase.java b/naming/src/test/java/org/jboss/as/naming/NamingSubsystemTestCase.java
new file mode 100644
index 00000000000..2a9833098d4
--- /dev/null
+++ b/naming/src/test/java/org/jboss/as/naming/NamingSubsystemTestCase.java
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.naming;
+
+import java.io.IOException;
+
+import org.jboss.as.naming.service.NamingExtension;
+import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
+
+/**
+ *
+ * @author Kabir Khan
+ */
+public class NamingSubsystemTestCase extends AbstractSubsystemBaseTest {
+
+ public NamingSubsystemTestCase() {
+ super(NamingExtension.SUBSYSTEM_NAME, new NamingExtension());
+ }
+
+ @Override
+ protected String getSubsystemXml() throws IOException {
+ return "";
+ }
+
+}
diff --git a/osgi/service/src/test/java/org/jboss/as/osgi/parser/OSGiSubsystemTestCase.java b/osgi/service/src/test/java/org/jboss/as/osgi/parser/OSGiSubsystemTestCase.java
index c4d16e71bdc..b032144469d 100644
--- a/osgi/service/src/test/java/org/jboss/as/osgi/parser/OSGiSubsystemTestCase.java
+++ b/osgi/service/src/test/java/org/jboss/as/osgi/parser/OSGiSubsystemTestCase.java
@@ -26,14 +26,15 @@
import junit.framework.Assert;
+import org.jboss.as.controller.OperationContext;
import org.jboss.as.controller.OperationContext.Type;
import org.jboss.as.controller.PathAddress;
import org.jboss.as.controller.PathElement;
import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
-import org.jboss.as.subsystem.test.AbstractSubsystemTest;
import org.jboss.as.subsystem.test.AdditionalInitialization;
import org.jboss.as.subsystem.test.KernelServices;
+import org.jboss.as.subsystem.test.ModelDescriptionValidator.ValidationConfiguration;
import org.jboss.dmr.ModelNode;
import org.junit.Test;
@@ -189,6 +190,13 @@ public void testReadWriteSubsystem() throws Exception {
protected Type getType() {
return Type.MANAGEMENT;
}
+
+ @Override
+ protected ValidationConfiguration getModelValidationConfiguration() {
+ //TODO fix validation https://issues.jboss.org/browse/AS7-1786
+ return null;
+ }
+
}, SUBSYSTEM_XML_1);
ModelNode model = services.readWholeModel();
@@ -203,6 +211,12 @@ public void testDescribeHandler() throws Exception {
protected Type getType() {
return Type.MANAGEMENT;
}
+
+ @Override
+ protected ValidationConfiguration getModelValidationConfiguration() {
+ //TODO fix validation https://issues.jboss.org/browse/AS7-1786
+ return null;
+ }
}, SUBSYSTEM_XML_1);
ModelNode modelA = servicesA.readWholeModel();
ModelNode describeOp = new ModelNode();
@@ -217,6 +231,12 @@ protected Type getType() {
public Type getType() {
return Type.MANAGEMENT;
}
+
+ @Override
+ protected ValidationConfiguration getModelValidationConfiguration() {
+ //TODO fix validation https://issues.jboss.org/browse/AS7-1786
+ return null;
+ }
}, operations);
ModelNode modelB = servicesB.readWholeModel();
@@ -241,4 +261,21 @@ private void checkData(List operations, int idx, String addrKey, Stri
Assert.assertEquals(addrVal, pe.getValue());
Assert.assertEquals(value, node.get(valKey).asString());
}
+
+ protected AdditionalInitialization createAdditionalInitialization() {
+ return new AdditionalInitialization(){
+ @Override
+ protected OperationContext.Type getType() {
+ return OperationContext.Type.MANAGEMENT;
+ }
+
+
+ @Override
+ protected ValidationConfiguration getModelValidationConfiguration() {
+ //TODO fix validation https://issues.jboss.org/browse/AS7-1786
+ return null;
+ }
+ };
+ }
+
}
diff --git a/platform-mbean/src/main/java/org/jboss/as/platform/mbean/PlatformMBeanDescriptions.java b/platform-mbean/src/main/java/org/jboss/as/platform/mbean/PlatformMBeanDescriptions.java
index c346142284a..bcf69f587d6 100644
--- a/platform-mbean/src/main/java/org/jboss/as/platform/mbean/PlatformMBeanDescriptions.java
+++ b/platform-mbean/src/main/java/org/jboss/as/platform/mbean/PlatformMBeanDescriptions.java
@@ -28,9 +28,9 @@
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DEFAULT;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIPTION;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MAX_OCCURS;
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MIN;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MIN_LENGTH;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MIN_OCCURS;
-import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MIN_VALUE;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.MODEL_DESCRIPTION;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.NAME;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.NILLABLE;
@@ -41,8 +41,100 @@
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.TYPE;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.UNIT;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.VALUE_TYPE;
-
-import static org.jboss.as.platform.mbean.PlatformMBeanConstants.*;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.ALL_THREAD_IDS;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.ARCH;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.AVAILABLE_PROCESSORS;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.BLOCKED_COUNT;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.BLOCKED_TIME;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.BOOT_CLASS_PATH;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.BOOT_CLASS_PATH_SUPPORTED;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.CLASS_NAME;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.CLASS_PATH;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.COLLECTION_COUNT;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.COLLECTION_TIME;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.COLLECTION_USAGE;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.COLLECTION_USAGE_THRESHOLD;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.COLLECTION_USAGE_THRESHOLD_COUNT;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.COLLECTION_USAGE_THRESHOLD_EXCEEDED;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.COLLECTION_USAGE_THRESHOLD_SUPPORTED;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.COMMITTED;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.COMPILATION_TIME_MONITORING_SUPPORTED;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.COUNT;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.CURRENT_THREAD_CPU_TIME;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.CURRENT_THREAD_CPU_TIME_SUPPORTED;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.CURRENT_THREAD_USER_TIME;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.DAEMON_THREAD_COUNT;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.FILE_NAME;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.HEAP_MEMORY_USAGE;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.IDENTITY_HASH_CODE;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.INIT;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.INPUT_ARGUMENTS;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.IN_NATIVE;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.LEVEL_NAME;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.LIBRARY_PATH;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.LINE_NUMBER;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.LOADED_CLASS_COUNT;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.LOCKED_MONITORS;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.LOCKED_STACK_DEPTH;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.LOCKED_STACK_FRAME;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.LOCKED_SYNCHRONIZERS;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.LOCK_INFO;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.LOCK_NAME;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.LOCK_OWNER_ID;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.LOCK_OWNER_NAME;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.LOGGER_NAME;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.LOGGER_NAMES;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.LOGGING;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.MANAGEMENT_SPEC_VERSION;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.MAX;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.MEMORY_MANAGER_NAMES;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.MEMORY_POOL_NAMES;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.MEMORY_USED;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.METHOD_NAME;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.NATIVE_METHOD;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.NON_HEAP_MEMORY_USAGE;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.OBJECT_MONITOR_USAGE_SUPPORTED;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.OBJECT_NAME;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.OBJECT_PENDING_FINALIZATION_COUNT;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.PEAK_THREAD_COUNT;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.PEAK_USAGE;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.SPEC_NAME;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.SPEC_VENDOR;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.SPEC_VERSION;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.STACK_TRACE;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.START_TIME;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.SUSPENDED;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.SYNCHRONIZER_USAGE_SUPPORTED;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.SYSTEM_LOAD_AVERAGE;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.SYSTEM_PROPERTIES;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.THREAD_CONTENTION_MONITORING_ENABLED;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.THREAD_CONTENTION_MONITORING_SUPPORTED;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.THREAD_COUNT;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.THREAD_CPU_TIME_ENABLED;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.THREAD_CPU_TIME_SUPPORTED;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.THREAD_ID;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.THREAD_NAME;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.THREAD_STATE;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.TOTAL_CAPACITY;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.TOTAL_COMPILATION_TIME;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.TOTAL_LOADED_CLASS_COUNT;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.TOTAL_STARTED_THREAD_COUNT;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.UNLOADED_CLASS_COUNT;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.UPTIME;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.USAGE;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.USAGE_THRESHOLD;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.USAGE_THRESHOLD_COUNT;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.USAGE_THRESHOLD_EXCEEDED;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.USAGE_THRESHOLD_SUPPORTED;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.USED;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.VALID;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.VERBOSE;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.VERSION;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.VM_NAME;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.VM_VENDOR;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.VM_VERSION;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.WAITED_COUNT;
+import static org.jboss.as.platform.mbean.PlatformMBeanConstants.WAITED_TIME;
import java.lang.management.MemoryType;
import java.util.Locale;
@@ -305,12 +397,12 @@ public static ModelNode getMemoryPoolResource(Locale locale) {
final ModelNode names = populateAttribute(attrs, MEMORY_MANAGER_NAMES, ModelType.LIST, true, null);
names.get(VALUE_TYPE).set(ModelType.STRING);
final ModelNode usageThresh = populateAttribute(attrs, USAGE_THRESHOLD, ModelType.LONG, false, MeasurementUnit.BYTES);
- usageThresh.get(MIN_VALUE).set(0);
+ usageThresh.get(MIN).set(0);
populateAttribute(attrs, USAGE_THRESHOLD_EXCEEDED, ModelType.BOOLEAN, false, null);
populateAttribute(attrs, USAGE_THRESHOLD_COUNT, ModelType.LONG, false, MeasurementUnit.NONE);
populateAttribute(attrs, USAGE_THRESHOLD_SUPPORTED, ModelType.BOOLEAN, true, null);
final ModelNode collUsageThresh = populateAttribute(attrs, COLLECTION_USAGE_THRESHOLD, ModelType.LONG, false, MeasurementUnit.BYTES);
- collUsageThresh.get(MIN_VALUE).set(0);
+ collUsageThresh.get(MIN).set(0);
populateAttribute(attrs, COLLECTION_USAGE_THRESHOLD_EXCEEDED, ModelType.BOOLEAN, false, null);
populateAttribute(attrs, COLLECTION_USAGE_THRESHOLD_COUNT, ModelType.LONG, false, MeasurementUnit.NONE);
populateAttribute(attrs, COLLECTION_USAGE_THRESHOLD_SUPPORTED, ModelType.BOOLEAN, true, null);
@@ -461,7 +553,7 @@ public static ModelNode getGetThreadInfoDescripton(Locale locale) {
node.get(REQUEST_PROPERTIES, PlatformMBeanConstants.MAX_DEPTH, DESCRIPTION).set(bundle.getString(PlatformMBeanConstants.THREADING + "." + PlatformMBeanConstants.MAX_DEPTH));
node.get(REQUEST_PROPERTIES, PlatformMBeanConstants.MAX_DEPTH, TYPE).set(ModelType.INT);
- node.get(REQUEST_PROPERTIES, PlatformMBeanConstants.MAX_DEPTH, MIN_VALUE).set(1);
+ node.get(REQUEST_PROPERTIES, PlatformMBeanConstants.MAX_DEPTH, MIN).set(1);
node.get(REQUEST_PROPERTIES, PlatformMBeanConstants.MAX_DEPTH, REQUIRED).set(false);
node.get(REQUEST_PROPERTIES, PlatformMBeanConstants.MAX_DEPTH, DEFAULT).set(0);
@@ -487,7 +579,7 @@ public static ModelNode getGetThreadInfosDescripton(Locale locale) {
node.get(REQUEST_PROPERTIES, PlatformMBeanConstants.MAX_DEPTH, DESCRIPTION).set(bundle.getString(PlatformMBeanConstants.THREADING + "." + PlatformMBeanConstants.MAX_DEPTH));
node.get(REQUEST_PROPERTIES, PlatformMBeanConstants.MAX_DEPTH, TYPE).set(ModelType.INT);
- node.get(REQUEST_PROPERTIES, PlatformMBeanConstants.MAX_DEPTH, MIN_VALUE).set(1);
+ node.get(REQUEST_PROPERTIES, PlatformMBeanConstants.MAX_DEPTH, MIN).set(1);
node.get(REQUEST_PROPERTIES, PlatformMBeanConstants.MAX_DEPTH, REQUIRED).set(false);
node.get(REQUEST_PROPERTIES, PlatformMBeanConstants.MAX_DEPTH, DEFAULT).set(0);
@@ -577,7 +669,7 @@ private static ModelNode getThreadInfoOperation(final ResourceBundle bundle, fin
node.get(REQUEST_PROPERTIES, PlatformMBeanConstants.ID, DESCRIPTION).set(bundle.getString(PlatformMBeanConstants.THREADING + "." + PlatformMBeanConstants.ID));
node.get(REQUEST_PROPERTIES, PlatformMBeanConstants.ID, TYPE).set(ModelType.LONG);
- node.get(REQUEST_PROPERTIES, PlatformMBeanConstants.ID, MIN_VALUE).set(1);
+ node.get(REQUEST_PROPERTIES, PlatformMBeanConstants.ID, MIN).set(1);
node.get(REQUEST_PROPERTIES, PlatformMBeanConstants.ID, REQUIRED).set(true);
return node;
diff --git a/pojo/pom.xml b/pojo/pom.xml
index 6d83984bc6b..5b4d71fbb3c 100644
--- a/pojo/pom.xml
+++ b/pojo/pom.xml
@@ -76,5 +76,10 @@
junit
test
+
+ org.jboss.as
+ jboss-as-subsystem-test
+ test
+
diff --git a/pojo/src/test/java/org/jboss/as/pojo/PojoSubsystemTestCase.java b/pojo/src/test/java/org/jboss/as/pojo/PojoSubsystemTestCase.java
new file mode 100644
index 00000000000..5e3e6a54312
--- /dev/null
+++ b/pojo/src/test/java/org/jboss/as/pojo/PojoSubsystemTestCase.java
@@ -0,0 +1,63 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.pojo;
+
+import java.io.IOException;
+
+import org.jboss.as.controller.OperationContext;
+import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
+import org.jboss.as.subsystem.test.AdditionalInitialization;
+import org.jboss.as.subsystem.test.ModelDescriptionValidator.ValidationConfiguration;
+
+/**
+ *
+ * @author Kabir Khan
+ */
+public class PojoSubsystemTestCase extends AbstractSubsystemBaseTest {
+
+ public PojoSubsystemTestCase() {
+ super(PojoExtension.SUBSYSTEM_NAME, new PojoExtension());
+ }
+
+ @Override
+ protected String getSubsystemXml() throws IOException {
+ return "";
+ }
+
+
+ protected AdditionalInitialization createAdditionalInitialization() {
+ return new AdditionalInitialization(){
+ @Override
+ protected OperationContext.Type getType() {
+ return OperationContext.Type.MANAGEMENT;
+ }
+
+
+ @Override
+ protected ValidationConfiguration getModelValidationConfiguration() {
+ //TODO fix providers https://issues.jboss.org/browse/AS7-1795
+ return null;
+ }
+ };
+ }
+
+}
diff --git a/sar/pom.xml b/sar/pom.xml
index 7259ad41972..f85991bc833 100644
--- a/sar/pom.xml
+++ b/sar/pom.xml
@@ -75,5 +75,10 @@
junit
test
+
+ org.jboss.as
+ jboss-as-subsystem-test
+ test
+
diff --git a/sar/src/test/java/org/jboss/as/service/SarSubsystemTestCase.java b/sar/src/test/java/org/jboss/as/service/SarSubsystemTestCase.java
new file mode 100644
index 00000000000..d662a4c9b78
--- /dev/null
+++ b/sar/src/test/java/org/jboss/as/service/SarSubsystemTestCase.java
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.service;
+
+import java.io.IOException;
+
+import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
+
+/**
+ *
+ * @author Kabir Khan
+ */
+public class SarSubsystemTestCase extends AbstractSubsystemBaseTest {
+
+ public SarSubsystemTestCase() {
+ super(SarExtension.SUBSYSTEM_NAME, new SarExtension());
+ }
+
+ @Override
+ protected String getSubsystemXml() throws IOException {
+ return "";
+ }
+
+}
diff --git a/security/src/test/java/org/jboss/as/security/test/SecurityDomainModelv11UnitTestCase.java b/security/src/test/java/org/jboss/as/security/test/SecurityDomainModelv11UnitTestCase.java
index 9e74296f348..3052a44834f 100644
--- a/security/src/test/java/org/jboss/as/security/test/SecurityDomainModelv11UnitTestCase.java
+++ b/security/src/test/java/org/jboss/as/security/test/SecurityDomainModelv11UnitTestCase.java
@@ -20,17 +20,18 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.as.security.test;
-
+
import org.jboss.as.controller.OperationContext;
import org.jboss.as.security.SecurityExtension;
import org.jboss.as.subsystem.test.AbstractSubsystemTest;
import org.jboss.as.subsystem.test.AdditionalInitialization;
import org.jboss.as.subsystem.test.KernelServices;
+import org.jboss.as.subsystem.test.ModelDescriptionValidator.ValidationConfiguration;
import org.jboss.dmr.ModelNode;
import org.junit.Test;
public class SecurityDomainModelv11UnitTestCase extends AbstractSubsystemTest {
-
+
public SecurityDomainModelv11UnitTestCase() {
super(SecurityExtension.SUBSYSTEM_NAME, new SecurityExtension());
}
@@ -45,6 +46,12 @@ public void testParseAndMarshalModel() throws Exception {
protected OperationContext.Type getType() {
return OperationContext.Type.MANAGEMENT;
}
+
+ @Override
+ protected ValidationConfiguration getModelValidationConfiguration() {
+ //TODO get rid of this method https://issues.jboss.org/browse/AS7-1763
+ return null;
+ }
};
KernelServices servicesA = super.installInController(additionalInit, subsystemXml);
@@ -61,5 +68,5 @@ protected OperationContext.Type getType() {
//Make sure the models from the two controllers are identical
super.compare(modelA, modelB);
- }
+ }
}
\ No newline at end of file
diff --git a/security/src/test/java/org/jboss/as/security/test/SecurityDomainModelv1UnitTestCase.java b/security/src/test/java/org/jboss/as/security/test/SecurityDomainModelv1UnitTestCase.java
index d9571a592de..a20081c81f7 100644
--- a/security/src/test/java/org/jboss/as/security/test/SecurityDomainModelv1UnitTestCase.java
+++ b/security/src/test/java/org/jboss/as/security/test/SecurityDomainModelv1UnitTestCase.java
@@ -20,17 +20,18 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.as.security.test;
-
+
import org.jboss.as.controller.OperationContext;
import org.jboss.as.security.SecurityExtension;
import org.jboss.as.subsystem.test.AbstractSubsystemTest;
import org.jboss.as.subsystem.test.AdditionalInitialization;
import org.jboss.as.subsystem.test.KernelServices;
+import org.jboss.as.subsystem.test.ModelDescriptionValidator.ValidationConfiguration;
import org.jboss.dmr.ModelNode;
import org.junit.Test;
public class SecurityDomainModelv1UnitTestCase extends AbstractSubsystemTest {
-
+
public SecurityDomainModelv1UnitTestCase() {
super(SecurityExtension.SUBSYSTEM_NAME, new SecurityExtension());
}
@@ -45,6 +46,12 @@ public void testParseAndMarshalModel() throws Exception {
protected OperationContext.Type getType() {
return OperationContext.Type.MANAGEMENT;
}
+
+ @Override
+ protected ValidationConfiguration getModelValidationConfiguration() {
+ //TODO get rid of this method https://issues.jboss.org/browse/AS7-1763
+ return null;
+ }
};
KernelServices servicesA = super.installInController(additionalInit, subsystemXml);
@@ -62,7 +69,7 @@ protected OperationContext.Type getType() {
//Make sure the models from the two controllers are identical
super.compare(modelA, modelB);
}
-
+
@Test
public void testParseAndMarshalModelWithJASPI() throws Exception {
//Parse the subsystem xml and install into the first controller
@@ -73,6 +80,12 @@ public void testParseAndMarshalModelWithJASPI() throws Exception {
protected OperationContext.Type getType() {
return OperationContext.Type.MANAGEMENT;
}
+
+ @Override
+ protected ValidationConfiguration getModelValidationConfiguration() {
+ //TODO get rid of this method https://issues.jboss.org/browse/AS7-1763
+ return null;
+ }
};
KernelServices servicesA = super.installInController(additionalInit, subsystemXml);
diff --git a/subsystem-test/src/main/java/org/jboss/as/subsystem/test/AbstractSubsystemBaseTest.java b/subsystem-test/src/main/java/org/jboss/as/subsystem/test/AbstractSubsystemBaseTest.java
index 5a6b25f9f19..547903e7a9f 100644
--- a/subsystem-test/src/main/java/org/jboss/as/subsystem/test/AbstractSubsystemBaseTest.java
+++ b/subsystem-test/src/main/java/org/jboss/as/subsystem/test/AbstractSubsystemBaseTest.java
@@ -22,15 +22,16 @@
package org.jboss.as.subsystem.test;
+import java.io.IOException;
+import java.util.List;
+
import org.jboss.as.controller.Extension;
import org.jboss.as.controller.OperationContext;
import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
+import org.jboss.as.subsystem.test.ModelDescriptionValidator.ValidationConfiguration;
import org.jboss.dmr.ModelNode;
import org.junit.Test;
-import java.io.IOException;
-import java.util.List;
-
/**
* A test routine every subsystem should go through.
*
diff --git a/transactions/pom.xml b/transactions/pom.xml
index 3bb71b8e787..4b780a5589b 100644
--- a/transactions/pom.xml
+++ b/transactions/pom.xml
@@ -88,6 +88,11 @@
org.jboss.spec.javax.transaction
jboss-transaction-api_1.1_spec
+
+ org.jboss.as
+ jboss-as-subsystem-test
+ test
+
diff --git a/transactions/src/test/java/org/jboss/as/txn/TransactionSubsystemTestCase.java b/transactions/src/test/java/org/jboss/as/txn/TransactionSubsystemTestCase.java
new file mode 100644
index 00000000000..3d37bbf2436
--- /dev/null
+++ b/transactions/src/test/java/org/jboss/as/txn/TransactionSubsystemTestCase.java
@@ -0,0 +1,71 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.txn;
+
+import java.io.IOException;
+
+import org.jboss.as.controller.OperationContext;
+import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
+import org.jboss.as.subsystem.test.AdditionalInitialization;
+import org.jboss.as.subsystem.test.ModelDescriptionValidator.ValidationConfiguration;
+
+/**
+ *
+ * @author Kabir Khan
+ */
+public class TransactionSubsystemTestCase extends AbstractSubsystemBaseTest {
+
+ public TransactionSubsystemTestCase() {
+ super(TransactionExtension.SUBSYSTEM_NAME, new TransactionExtension());
+ }
+
+ @Override
+ protected String getSubsystemXml() throws IOException {
+ //This is just copied from standalone.xml testing more combinations would be good
+ return
+ "" +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ " " +
+ "";
+ }
+
+ protected AdditionalInitialization createAdditionalInitialization() {
+ return new AdditionalInitialization(){
+ @Override
+ protected OperationContext.Type getType() {
+ return OperationContext.Type.MANAGEMENT;
+ }
+
+
+ @Override
+ protected ValidationConfiguration getModelValidationConfiguration() {
+ //TODO fix providers https://issues.jboss.org/browse/AS7-1797
+ return null;
+ }
+ };
+ }
+}
diff --git a/webservices/server-integration/pom.xml b/webservices/server-integration/pom.xml
index 42d2bd39e69..eb89d804af1 100644
--- a/webservices/server-integration/pom.xml
+++ b/webservices/server-integration/pom.xml
@@ -105,6 +105,12 @@
org.jboss.ws.cxf
jbossws-cxf-client
+
+
+ org.jboss.as
+ jboss-as-subsystem-test
+ test
+
diff --git a/webservices/server-integration/src/test/java/org/jboss/as/webservices/subsystem/WebServicesSubsystemTestCase.java b/webservices/server-integration/src/test/java/org/jboss/as/webservices/subsystem/WebServicesSubsystemTestCase.java
new file mode 100644
index 00000000000..a5c8689e268
--- /dev/null
+++ b/webservices/server-integration/src/test/java/org/jboss/as/webservices/subsystem/WebServicesSubsystemTestCase.java
@@ -0,0 +1,97 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.webservices.subsystem;
+
+import java.io.IOException;
+
+import org.jboss.as.controller.OperationContext;
+import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
+import org.jboss.as.subsystem.test.AdditionalInitialization;
+import org.jboss.as.subsystem.test.ModelDescriptionValidator.ValidationConfiguration;
+import org.jboss.as.webservices.dmr.WSExtension;
+import org.junit.Ignore;
+
+/**
+ *
+ * @author Kabir Khan
+ */
+@Ignore("AS7-1804")
+public class WebServicesSubsystemTestCase extends AbstractSubsystemBaseTest {
+
+ public WebServicesSubsystemTestCase() {
+ super(WSExtension.SUBSYSTEM_NAME, new WSExtension());
+ }
+
+ @Override
+ protected String getSubsystemXml() throws IOException {
+ //This is copied from standalone-preview.xml. Testing more combinations would be good
+ return
+ "" +
+ " true" +
+ " localhost" +
+ " " +
+ " " +
+ " Standard-Endpoint-Config" +
+ " " +
+ " " +
+ " Recording-Endpoint-Config" +
+ " " +
+ " " +
+ " ##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM" +
+ " " +
+ " RecordingHandler" +
+ " org.jboss.ws.common.invocation.RecordingServerHandler" +
+ " " +
+ " " +
+ " " +
+ " " +
+ "";
+
+ }
+
+ protected AdditionalInitialization createAdditionalInitialization() {
+ return new AdditionalInitialization(){
+ @Override
+ protected OperationContext.Type getType() {
+ return OperationContext.Type.MANAGEMENT;
+ }
+
+
+ @Override
+ protected ValidationConfiguration getModelValidationConfiguration() {
+ //TODO fix providers https://issues.jboss.org/browse/AS7-1804
+ return null;
+ }
+
+
+ @Override
+ protected boolean isValidateOperations() {
+ //TODO fix providers https://issues.jboss.org/browse/AS7-1804
+ return false;
+ }
+ };
+ }
+
+}
diff --git a/weld/pom.xml b/weld/pom.xml
index e607766da98..5da91577b83 100644
--- a/weld/pom.xml
+++ b/weld/pom.xml
@@ -183,5 +183,11 @@
junit
test
+
+
+ org.jboss.as
+ jboss-as-subsystem-test
+ test
+
diff --git a/weld/src/test/java/org/jboss/as/weld/WeldSubsystemTestCase.java b/weld/src/test/java/org/jboss/as/weld/WeldSubsystemTestCase.java
new file mode 100644
index 00000000000..663e819aac9
--- /dev/null
+++ b/weld/src/test/java/org/jboss/as/weld/WeldSubsystemTestCase.java
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.weld;
+
+import java.io.IOException;
+
+import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
+
+/**
+ *
+ * @author Kabir Khan
+ */
+public class WeldSubsystemTestCase extends AbstractSubsystemBaseTest {
+
+ public WeldSubsystemTestCase() {
+ super(WeldExtension.SUBSYSTEM_NAME, new WeldExtension());
+ }
+
+ @Override
+ protected String getSubsystemXml() throws IOException {
+ //This is just copied from standalone.xml testing more combinations would be good
+ return
+ "";
+ }
+}
diff --git a/xts/pom.xml b/xts/pom.xml
index b9a8f11eeec..27031d62379 100644
--- a/xts/pom.xml
+++ b/xts/pom.xml
@@ -84,5 +84,10 @@
org.jboss.ws
jbossws-spi
+
+ org.jboss.as
+ jboss-as-subsystem-test
+ test
+
diff --git a/xts/src/main/java/org/jboss/as/xts/Descriptions.java b/xts/src/main/java/org/jboss/as/xts/Descriptions.java
index 5c63677f677..457b6f005bb 100644
--- a/xts/src/main/java/org/jboss/as/xts/Descriptions.java
+++ b/xts/src/main/java/org/jboss/as/xts/Descriptions.java
@@ -1,12 +1,12 @@
package org.jboss.as.xts;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
import org.jboss.dmr.ModelNode;
import org.jboss.dmr.ModelType;
-import java.util.Locale;
-import java.util.ResourceBundle;
-
public class Descriptions {
static final String RESOURCE_NAME = Descriptions.class.getPackage().getName() + ".LocalDescriptions";
@@ -38,9 +38,7 @@ static ModelNode getSubsystemAdd(Locale locale) {
final ModelNode op = new ModelNode();
op.get(ModelDescriptionConstants.DESCRIPTION).set(bundle.getString("xts.add"));
- op.get(ModelDescriptionConstants.HEAD_COMMENT_ALLOWED).set(true);
- op.get(ModelDescriptionConstants.TAIL_COMMENT_ALLOWED).set(true);
- op.get(ModelDescriptionConstants.NAMESPACE).set(org.jboss.as.xts.Namespace.XTS_1_0.getUriString());
+ op.get(ModelDescriptionConstants.OPERATION_NAME).set(ModelDescriptionConstants.ADD);
// xts-environment
op.get(ModelDescriptionConstants.REQUEST_PROPERTIES, CommonAttributes.XTS_ENVIRONMENT, ModelDescriptionConstants.DESCRIPTION).set(bundle.getString("xts-environment"));
op.get(ModelDescriptionConstants.REQUEST_PROPERTIES, CommonAttributes.XTS_ENVIRONMENT, ModelDescriptionConstants.TYPE).set(ModelType.OBJECT);
diff --git a/xts/src/test/java/org/jboss/as/xts/XTSSubsystemTestCase.java b/xts/src/test/java/org/jboss/as/xts/XTSSubsystemTestCase.java
new file mode 100644
index 00000000000..69f35a33575
--- /dev/null
+++ b/xts/src/test/java/org/jboss/as/xts/XTSSubsystemTestCase.java
@@ -0,0 +1,48 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2011, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.as.xts;
+
+import java.io.IOException;
+
+import org.jboss.as.subsystem.test.AbstractSubsystemBaseTest;
+import org.junit.Ignore;
+
+/**
+ *
+ * @author Kabir Khan
+ */
+@Ignore("AS7-1799")
+public class XTSSubsystemTestCase extends AbstractSubsystemBaseTest {
+
+ public XTSSubsystemTestCase() {
+ super(XTSExtension.SUBSYSTEM_NAME, new XTSExtension());
+ }
+
+ @Override
+ protected String getSubsystemXml() throws IOException {
+ return
+ "" +
+ " " +
+ "";
+ }
+
+}