[jboss-cvs] JBossAS SVN: r74698 - in trunk: connector/src/main/org/jboss/resource/metadata/mcf and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jun 17 11:38:03 EDT 2008
Author: alesj
Date: 2008-06-17 11:38:03 -0400 (Tue, 17 Jun 2008)
New Revision: 74698
Modified:
trunk/connector/src/main/org/jboss/resource/deployers/management/DsDataSourceTemplateInfo.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java
trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAConnectorMetaDataKey.java
trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java
trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
Log:
Fixing ProfileService tests.
TODO in composite (map) compare.
Modified: trunk/connector/src/main/org/jboss/resource/deployers/management/DsDataSourceTemplateInfo.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployers/management/DsDataSourceTemplateInfo.java 2008-06-17 15:05:46 UTC (rev 74697)
+++ trunk/connector/src/main/org/jboss/resource/deployers/management/DsDataSourceTemplateInfo.java 2008-06-17 15:38:03 UTC (rev 74698)
@@ -202,6 +202,7 @@
addManagedProperty("query-timeout", "", false, SimpleMetaType.INTEGER, new Integer(0), mo);
addManagedProperty("url-delimiter", "", false, SimpleMetaType.STRING, mo);
addManagedProperty("url-selector-strategy-class-name", "", false, SimpleMetaType.STRING, mo);
+ addManagedProperty("use-try-lock", "", false, SimpleMetaType.LONG, mo);
}
private void addCommonProperties(ManagedObjectImpl mo)
@@ -218,7 +219,7 @@
addManagedProperty("idle-timeout-minutes", "The idle timeout in minutes", true, SimpleMetaType.INTEGER, new Integer(30), mo);
addManagedProperty("prefill", "Whether to prefill the pool", true, SimpleMetaType.BOOLEAN, mo);
addManagedProperty("background-validation", "Whether to use backgroup validation", true, SimpleMetaType.BOOLEAN, Boolean.FALSE, mo);
- addManagedProperty("background-validation-minutes", "", false, SimpleMetaType.INTEGER, new Integer(0), mo);
+ addManagedProperty("background-validation-millis", "", false, SimpleMetaType.LONG, new Long(0), mo);
addManagedProperty("validate-on-match", "", true, SimpleMetaType.BOOLEAN, Boolean.TRUE, mo);
addManagedProperty("use-strict-min", "", true, SimpleMetaType.BOOLEAN, mo);
addManagedProperty("no-tx-separate-pools", "", true, SimpleMetaType.BOOLEAN, mo);
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java 2008-06-17 15:05:46 UTC (rev 74697)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java 2008-06-17 15:38:03 UTC (rev 74698)
@@ -1,24 +1,24 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.
- */
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.resource.metadata.mcf;
import java.io.Serializable;
@@ -92,10 +92,13 @@
@XmlElement(name="prefill")
private Boolean prefill = Boolean.FALSE;
-
- @XmlElement(name="background-validation-millis")
- private long backgroundValidationMillis;
+ @XmlElement(name="background-validation")
+ private boolean backgroundValidation;
+
+ @XmlElement(name="background-validation-millis")
+ private long backgroundValidationMillis;
+
@XmlElement(name="validate-on-match")
private boolean validateOnMatch = true;
@@ -446,21 +449,31 @@
public Boolean getPrefill()
{
- return this.prefill;
-
+ return this.prefill;
}
-
- public void setBackgroundValidationMillis(long interval)
- {
- this.backgroundValidationMillis = interval;
- }
-
- @ManagementProperty(name="background-validation-millis", includeInTemplate=true)
- public long getBackgroundValidationMillis()
- {
- return this.backgroundValidationMillis;
- }
+ @ManagementProperty(name="background-validation", includeInTemplate=true)
+ public boolean isBackgroundValidation()
+ {
+ return backgroundValidation;
+ }
+
+ public void setBackgroundValidation(boolean backgroundValidation)
+ {
+ this.backgroundValidation = backgroundValidation;
+ }
+
+ public void setBackgroundValidationMillis(long interval)
+ {
+ this.backgroundValidationMillis = interval;
+ }
+
+ @ManagementProperty(name="background-validation-millis", includeInTemplate=true)
+ public long getBackgroundValidationMillis()
+ {
+ return this.backgroundValidationMillis;
+ }
+
public void setValidateOnMatch(boolean validateOnMatch)
{
this.validateOnMatch = validateOnMatch;
Modified: trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAConnectorMetaDataKey.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAConnectorMetaDataKey.java 2008-06-17 15:05:46 UTC (rev 74697)
+++ trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAConnectorMetaDataKey.java 2008-06-17 15:38:03 UTC (rev 74698)
@@ -41,6 +41,8 @@
public String getName()
{
+ if (name == null)
+ throw new IllegalArgumentException("Null name");
return name;
}
@@ -61,20 +63,20 @@
}
JCAConnectorMetaDataKey other = (JCAConnectorMetaDataKey)obj;
- return other.getName().equals(this.getName());
+ return other.getName().equals(getName());
}
@Override
public int hashCode()
{
- return name.hashCode();
+ return getName().hashCode();
}
@Override
public String toString()
{
- return "[JCAConnectorMetaDataKey: " + this.getName();
+ return "[JCAConnectorMetaDataKey: " + getName() + "]";
}
}
Modified: trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java
===================================================================
--- trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java 2008-06-17 15:05:46 UTC (rev 74697)
+++ trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java 2008-06-17 15:38:03 UTC (rev 74698)
@@ -23,7 +23,6 @@
import java.io.Serializable;
import java.lang.annotation.Annotation;
-import java.net.URL;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashMap;
@@ -47,17 +46,14 @@
import org.jboss.deployers.spi.management.DeploymentTemplate;
import org.jboss.deployers.spi.management.ManagementView;
import org.jboss.deployers.spi.management.RuntimeComponentDispatcher;
-import org.jboss.deployers.spi.management.deploy.DeploymentProgress;
-import org.jboss.deployers.spi.management.deploy.DeploymentStatus;
-import org.jboss.deployers.spi.management.deploy.DeploymentID;
import org.jboss.deployers.vfs.spi.client.VFSDeployment;
import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
import org.jboss.logging.Logger;
import org.jboss.managed.api.ComponentType;
+import org.jboss.managed.api.DeploymentTemplateInfo;
import org.jboss.managed.api.ManagedComponent;
import org.jboss.managed.api.ManagedDeployment;
import org.jboss.managed.api.ManagedDeployment.DeploymentPhase;
-import org.jboss.managed.api.DeploymentTemplateInfo;
import org.jboss.managed.api.ManagedObject;
import org.jboss.managed.api.ManagedOperation;
import org.jboss.managed.api.ManagedParameter;
@@ -78,12 +74,10 @@
import org.jboss.metatype.api.values.CollectionValue;
import org.jboss.metatype.api.values.GenericValue;
import org.jboss.metatype.api.values.MetaValue;
+import org.jboss.metatype.api.values.MetaValueFactory;
import org.jboss.metatype.api.values.SimpleValue;
import org.jboss.metatype.api.values.SimpleValueSupport;
-import org.jboss.metatype.api.values.MetaValueFactory;
import org.jboss.profileservice.management.plugins.BasicDeploymentTemplateInfo;
-import org.jboss.profileservice.management.upload.DeploymentProgressImpl;
-import org.jboss.profileservice.management.upload.SerializableDeploymentID;
import org.jboss.profileservice.spi.AttachmentsSerializer;
import org.jboss.profileservice.spi.NoSuchDeploymentException;
import org.jboss.profileservice.spi.NoSuchProfileException;
@@ -750,6 +744,9 @@
continue;
ManagedObject mo = prop.getManagedObject();
+ if (mo == null)
+ throw new IllegalArgumentException("Null managed object: " + prop);
+
ManagedObject ctxMO = mos.get(mo.getName());
if( ctxMO == null )
{
Modified: trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java 2008-06-17 15:05:46 UTC (rev 74697)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java 2008-06-17 15:38:03 UTC (rev 74698)
@@ -158,7 +158,7 @@
"jboss-xa-jdbc.rar",
"jbossjca-service.xml",
"jbossws.sar/",
- "jms-ds.xml",
+// "jms-ds.xml",
"jms-ra.rar",
"jmx-console.war/",
"jmx-invoker-service.xml",
@@ -653,8 +653,7 @@
String jndiName = "TestNoTxDs";
Map<String, Serializable> propValues = new HashMap<String, Serializable>();
addNonXaDsProperties(propValues, jndiName, "jboss-local-jdbc.rar", "javax.sql.DataSource");
- createComponentTest("NoTxDataSourceTemplate", propValues, "testNoTxDs",
- KnownComponentTypes.DataSourceTypes.NoTx.getType(), jndiName);
+ createComponentTest("NoTxDataSourceTemplate", propValues, "testNoTxDs", KnownComponentTypes.DataSourceTypes.NoTx.getType(), jndiName);
}
public void testRemoveNoTxDataSource()
@@ -686,8 +685,7 @@
//ApplicationManagedSecurityMetaData secDomain = new ApplicationManagedSecurityMetaData();
//props.get("security-domain").setValue(secDomain);
- createComponentTest("NoTxConnectionFactoryTemplate", propValues, "testNoTxCf",
- new ComponentType("ConnectionFactory", "NoTx"), jndiName);
+ createComponentTest("NoTxConnectionFactoryTemplate", propValues, "testNoTxCf", new ComponentType("ConnectionFactory", "NoTx"), jndiName);
}
/**
@@ -743,6 +741,7 @@
propValues.put("query-timeout", new Integer(100));
propValues.put("url-delimiter", "+");
propValues.put("url-selector-strategy-class-name", "org.jboss.test.jca.support.MyURLSelector");
+ propValues.put("use-try-lock", new Long(5000));
}
private void addCommonCfProperties(Map<String, Serializable> propValues,
@@ -751,7 +750,7 @@
String conDef)
{
propValues.put("jndi-name", jndiName);
- //propValues.put("rar-name", rarName);
+ propValues.put("rar-name", rarName);
propValues.put("use-java-context", Boolean.TRUE);
propValues.put("connection-definition", conDef);
//propValues.put("jmx-invoker-name", "jboss:service=invoker,type=jrmp");
@@ -761,7 +760,7 @@
propValues.put("idle-timeout-minutes", new Integer(111));
propValues.put("prefill", Boolean.TRUE);
propValues.put("background-validation", Boolean.TRUE);
- propValues.put("background-validation-minutes", new Integer(10));
+ propValues.put("background-validation-millis", new Long(5000));
propValues.put("validate-on-match", Boolean.FALSE);
propValues.put("use-strict-min", Boolean.TRUE);
propValues.put("no-tx-separate-pools", Boolean.TRUE);
@@ -816,6 +815,10 @@
// Compare simple types to the java expected type
if(prop.getMetaType().isSimple())
assertEquals(prop.getName(), expectedValue, ((SimpleValue)propValue).getValue());
+ else if (prop.getMetaType().isComposite())
+ {
+ // TODO / FIXME - compare composits
+ }
else
{
// Compare the MetaValues
More information about the jboss-cvs-commits
mailing list