[jboss-cvs] JBossAS SVN: r90453 - in branches/JBPAPP_5_0: connector/src/main/org/jboss/resource/metadata/mcf and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Jun 18 23:14:20 EDT 2009
Author: scott.stark at jboss.org
Date: 2009-06-18 23:14:19 -0400 (Thu, 18 Jun 2009)
New Revision: 90453
Modified:
branches/JBPAPP_5_0/connector/src/main/org/jboss/resource/deployers/management/AbstractConnectionFactoryICF.java
branches/JBPAPP_5_0/connector/src/main/org/jboss/resource/deployers/management/AbstractNonXADataSourceICF.java
branches/JBPAPP_5_0/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java
branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
Log:
JBAS-6777, further corrections to the interleaving property usage
Modified: branches/JBPAPP_5_0/connector/src/main/org/jboss/resource/deployers/management/AbstractConnectionFactoryICF.java
===================================================================
--- branches/JBPAPP_5_0/connector/src/main/org/jboss/resource/deployers/management/AbstractConnectionFactoryICF.java 2009-06-19 00:09:27 UTC (rev 90452)
+++ branches/JBPAPP_5_0/connector/src/main/org/jboss/resource/deployers/management/AbstractConnectionFactoryICF.java 2009-06-19 03:14:19 UTC (rev 90453)
@@ -72,7 +72,7 @@
PropertyInfo propertyInfo = property.getField(Fields.PROPERTY_INFO, PropertyInfo.class);
if(propertyInfo == null)
propertyInfo = beanInfo.getProperty(propertyName);
-
+
// Check if the property is readable
if(propertyInfo != null && propertyInfo.isReadable() == false)
return null;
Modified: branches/JBPAPP_5_0/connector/src/main/org/jboss/resource/deployers/management/AbstractNonXADataSourceICF.java
===================================================================
--- branches/JBPAPP_5_0/connector/src/main/org/jboss/resource/deployers/management/AbstractNonXADataSourceICF.java 2009-06-19 00:09:27 UTC (rev 90452)
+++ branches/JBPAPP_5_0/connector/src/main/org/jboss/resource/deployers/management/AbstractNonXADataSourceICF.java 2009-06-19 03:14:19 UTC (rev 90453)
@@ -76,11 +76,6 @@
}
value = mapValue;
}
- else if("interleaving".equals(property.getName()))
- {
- Boolean interleaving = attachment.isInterleaving();
- value = SimpleValueSupport.wrap(interleaving);
- }
else
{
value = super.getValue(beanInfo, property, metaData, attachment);
Modified: branches/JBPAPP_5_0/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java
===================================================================
--- branches/JBPAPP_5_0/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java 2009-06-19 00:09:27 UTC (rev 90452)
+++ branches/JBPAPP_5_0/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java 2009-06-19 03:14:19 UTC (rev 90453)
@@ -256,7 +256,6 @@
{
return useJavaContext;
}
-
/**
* Set the useJavaContext.
*
@@ -503,7 +502,6 @@
{
return backgroundValidation;
}
-
public void setBackgroundValidation(boolean backgroundValidation)
{
this.backgroundValidation = backgroundValidation;
@@ -530,7 +528,6 @@
{
return this.validateOnMatch;
}
-
@ManagementProperty(name="isSameRM-override-value", includeInTemplate=true)
public Boolean getIsSameRMOverrideValue()
{
@@ -541,9 +538,9 @@
{
this.isSameRMOverrideValue = isSameRMOverrideValue;
}
-
@Deprecated
- @ManagementProperty(name="track-connection-by-tx", includeInTemplate=true)
+ @ManagementProperty(name="track-connection-by-tx", includeInTemplate=true,
+ use={ViewUse.CONFIGURATION})
public Boolean getTrackConnectionByTransaction()
{
return !isInterleaving();
@@ -560,13 +557,16 @@
setInterleaving(!Boolean.TRUE.equals(trackConnectionByTransaction));
}
- @ManagementProperty(name="interleaving", includeInTemplate=true,
- use={ViewUse.CONFIGURATION})
public Boolean isInterleaving()
{
return interleaving == Boolean.TRUE && !Boolean.TRUE.equals(getLocalTransactions());
}
-
+ @ManagementProperty(name="interleaving", includeInTemplate=true,
+ use={ViewUse.CONFIGURATION})
+ public Boolean getInterleaving()
+ {
+ return isInterleaving();
+ }
public void setInterleaving(Boolean interleaving)
{
this.interleaving = interleaving;
Modified: branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java
===================================================================
--- branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java 2009-06-19 00:09:27 UTC (rev 90452)
+++ branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java 2009-06-19 03:14:19 UTC (rev 90453)
@@ -694,6 +694,7 @@
propValues.put("xa-datasource-class", SimpleValueSupport.wrap("org.hsqldb.jdbcDriver"));
propValues.put("xa-resource-timeout", SimpleValueSupport.wrap(new Integer(256)));
+ propValues.put("interleaving", SimpleValueSupport.wrap(true));
HashMap<String, String> xaPropValues = new HashMap<String, String>();
xaPropValues.put("URL", "jdbc:hsqldb");
@@ -739,6 +740,7 @@
propValues.put("config-property", metaValue);
propValues.put("xa-transaction", SimpleValueSupport.wrap(Boolean.FALSE));
+ propValues.put("interleaving", SimpleValueSupport.wrap(Boolean.TRUE));
propValues.put("xa-resource-timeout", SimpleValueSupport.wrap(new Integer(256)));
// todo: how to set the specific domain?
@@ -747,6 +749,16 @@
createComponentTest("TxConnectionFactoryTemplate", propValues, "testTxCf",
new ComponentType("ConnectionFactory", "Tx"), jndiName);
+ // Query the interleaving
+ ManagementView mgtView = getManagementView();
+ ComponentType type = new ComponentType("ConnectionFactory", "Tx");
+ ManagedComponent txcf = mgtView.getComponent(jndiName, type);
+ assertNotNull(txcf);
+ ManagedProperty interleaving = txcf.getProperty("interleaving");
+ assertNotNull("interleaving", interleaving);
+ MetaValue interleavingMV = interleaving.getValue();
+ assertNotNull("interleaving.value", interleavingMV);
+
}
/**
@@ -781,6 +793,7 @@
propValues.put("xa-transaction", SimpleValueSupport.wrap(Boolean.TRUE));
propValues.put("xa-resource-timeout", SimpleValueSupport.wrap(new Integer(256)));
+ propValues.put("interleaving", SimpleValueSupport.wrap(Boolean.TRUE));
// todo: how to set the specific domain?
//ApplicationManagedSecurityMetaData secDomain = new ApplicationManagedSecurityMetaData();
@@ -788,6 +801,16 @@
createComponentTest("TxConnectionFactoryTemplate", propValues, "testTxXACf",
new ComponentType("ConnectionFactory", "Tx"), jndiName);
+ // Query the interleaving
+ ManagementView mgtView = getManagementView();
+ ComponentType type = new ComponentType("ConnectionFactory", "Tx");
+ ManagedComponent txcf = mgtView.getComponent(jndiName, type);
+ assertNotNull(txcf);
+ ManagedProperty interleaving = txcf.getProperty("interleaving");
+ assertNotNull("interleaving", interleaving);
+ MetaValue interleavingMV = interleaving.getValue();
+ assertNotNull("interleaving.value", interleavingMV);
+ assertEquals(SimpleValueSupport.wrap(Boolean.TRUE), interleavingMV);
}
/**
@@ -837,7 +860,6 @@
MetaValue metaValue = this.compositeValueMap(xaProps);
propValues.put("config-property", metaValue);
- propValues.put("track-connection-by-tx", SimpleValueSupport.wrap(Boolean.TRUE));
propValues.put("config-property",
new MapCompositeValueSupport(new HashMap<String, MetaValue>(),
new MapCompositeMetaType(SimpleMetaType.STRING)));
@@ -970,7 +992,6 @@
propValues.put("no-tx-separate-pools", SimpleValueSupport.wrap(Boolean.TRUE));
propValues.put("statistics-formatter", SimpleValueSupport.wrap("org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter"));
propValues.put("isSameRM-override-value", SimpleValueSupport.wrap(Boolean.FALSE));
- propValues.put("track-connection-by-tx", SimpleValueSupport.wrap(Boolean.TRUE));
propValues.put("type-mapping", SimpleValueSupport.wrap("Hypersonic SQL"));
// todo: config-property
// todo: security-domain
@@ -1019,8 +1040,8 @@
for(String propName : propValues.keySet())
{
ManagedProperty prop = dsMC.getProperty(propName);
- log.debug("Checking: "+prop);
- assertNotNull(prop);
+ log.debug("Checking: "+propName);
+ assertNotNull(propName, prop);
Object propValue = prop.getValue();
Object expectedValue = propValues.get(propName);
if(propValue instanceof MetaValue)
More information about the jboss-cvs-commits
mailing list