JBoss Cache SVN: r7061 - core/tags/3.0.0.CR3/src/main/java/org/jboss/cache.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-11-03 12:28:16 -0500 (Mon, 03 Nov 2008)
New Revision: 7061
Modified:
core/tags/3.0.0.CR3/src/main/java/org/jboss/cache/Version.java
Log:
Modified: core/tags/3.0.0.CR3/src/main/java/org/jboss/cache/Version.java
===================================================================
--- core/tags/3.0.0.CR3/src/main/java/org/jboss/cache/Version.java 2008-11-03 17:22:01 UTC (rev 7060)
+++ core/tags/3.0.0.CR3/src/main/java/org/jboss/cache/Version.java 2008-11-03 17:28:16 UTC (rev 7061)
@@ -35,7 +35,7 @@
public static final String version = "3.0.0.CR3";
public static final String codename = "Naga";
//public static final String cvs = "$Id: Version.java 4592 2007-10-10 16:44:36Z manik.surtani(a)jboss.com $";
- static final byte[] version_id = {'0','3','0','0','C','R','3'}
+ static final byte[] version_id = {'0','3','0','0','C','R','3'};
private static final int MAJOR_SHIFT = 11;
private static final int MINOR_SHIFT = 6;
16 years, 11 months
JBoss Cache SVN: r7060 - in core/tags/3.0.0.CR3: src/main/java/org/jboss/cache and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-11-03 12:22:01 -0500 (Mon, 03 Nov 2008)
New Revision: 7060
Modified:
core/tags/3.0.0.CR3/pom.xml
core/tags/3.0.0.CR3/src/main/java/org/jboss/cache/Version.java
Log:
JBoss Cache Release Script: Updating 3.0.0.CR3
Modified: core/tags/3.0.0.CR3/pom.xml
===================================================================
--- core/tags/3.0.0.CR3/pom.xml 2008-11-03 17:13:23 UTC (rev 7059)
+++ core/tags/3.0.0.CR3/pom.xml 2008-11-03 17:22:01 UTC (rev 7060)
@@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<properties>
- <jbosscache-core-version>3.0.0-SNAPSHOT</jbosscache-core-version>
+ <jbosscache-core-version>3.0.0.CR3</jbosscache-core-version>
<!-- By default only run tests in the "unit" group -->
<defaultTestGroup>unit</defaultTestGroup>
<!-- By default only generate Javadocs when we install the module. -->
@@ -443,7 +443,7 @@
<activeByDefault>false</activeByDefault>
</activation>
<properties>
- <jbosscache-core-version>3.0.0-SNAPSHOT-JBossAS</jbosscache-core-version>
+ <jbosscache-core-version>3.0.0.CR3-JBossAS</jbosscache-core-version>
</properties>
<dependencies>
<dependency>
Modified: core/tags/3.0.0.CR3/src/main/java/org/jboss/cache/Version.java
===================================================================
--- core/tags/3.0.0.CR3/src/main/java/org/jboss/cache/Version.java 2008-11-03 17:13:23 UTC (rev 7059)
+++ core/tags/3.0.0.CR3/src/main/java/org/jboss/cache/Version.java 2008-11-03 17:22:01 UTC (rev 7060)
@@ -32,10 +32,10 @@
@Immutable
public class Version
{
- public static final String version = "3.0.0-SNAPSHOT";
+ public static final String version = "3.0.0.CR3";
public static final String codename = "Naga";
//public static final String cvs = "$Id: Version.java 4592 2007-10-10 16:44:36Z manik.surtani(a)jboss.com $";
- static final byte[] version_id = {'0', '3', '0', '0', 'S'};
+ static final byte[] version_id = {'0','3','0','0','C','R','3'}
private static final int MAJOR_SHIFT = 11;
private static final int MINOR_SHIFT = 6;
16 years, 11 months
JBoss Cache SVN: r7059 - core/trunk.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-11-03 12:13:23 -0500 (Mon, 03 Nov 2008)
New Revision: 7059
Modified:
core/trunk/release.sh
Log:
Modified: core/trunk/release.sh
===================================================================
--- core/trunk/release.sh 2008-11-03 17:10:52 UTC (rev 7058)
+++ core/trunk/release.sh 2008-11-03 17:13:23 UTC (rev 7059)
@@ -60,7 +60,7 @@
build()
{
- mvn clean release -Dmaven.test.skip.exec=true -PDocs
+ mvn clean deploy -Dmaven.test.skip.exec=true -PDocs
}
checkIntoRepository()
16 years, 11 months
JBoss Cache SVN: r7058 - core/tags.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-11-03 12:10:52 -0500 (Mon, 03 Nov 2008)
New Revision: 7058
Added:
core/tags/3.0.0.CR3/
Log:
JBoss Cache Release Script: Tagging 3.0.0.CR3
Copied: core/tags/3.0.0.CR3 (from rev 7057, core/trunk)
16 years, 11 months
JBoss Cache SVN: r7057 - core/trunk/src/test/java/org/jboss/cache/profiling.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-11-03 12:09:55 -0500 (Mon, 03 Nov 2008)
New Revision: 7057
Modified:
core/trunk/src/test/java/org/jboss/cache/profiling/MemConsumptionTest.java
Log:
Modified: core/trunk/src/test/java/org/jboss/cache/profiling/MemConsumptionTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/profiling/MemConsumptionTest.java 2008-11-03 16:32:39 UTC (rev 7056)
+++ core/trunk/src/test/java/org/jboss/cache/profiling/MemConsumptionTest.java 2008-11-03 17:09:55 UTC (rev 7057)
@@ -22,6 +22,7 @@
package org.jboss.cache.profiling;
import org.jboss.cache.Cache;
+import org.jboss.cache.CacheException;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.util.TestingUtil;
@@ -35,24 +36,39 @@
@Test(groups = "profiling")
public class MemConsumptionTest
{
- // adjust the next 3 numbers
+ // adjust the next 4 values
int numNodes = 1000000;
int payloadSize = 20; // bytes
int keySize = 10; // bytes
+ PayloadType payloadType = PayloadType.STRINGS;
+ enum PayloadType {STRINGS, BYTE_ARRAYS}
+
+ int bytesPerCharacter = 2;
+
Random r = new Random();
public void testMemConsumption() throws IOException
- {
- int kBytesCached = (2 * numNodes * (payloadSize + keySize)) / 1024;
+ {
+ int kBytesCached = (bytesPerCharacter * numNodes * (payloadSize + keySize)) / 1024;
System.out.println("Bytes to be cached: " + NumberFormat.getIntegerInstance().format(kBytesCached) + " kb");
- Cache<String, String> c = new DefaultCacheFactory<String, String>().createCache(false); // default LOCAL cache
-// c.getConfiguration().setConcurrencyLevel(numNodes);
+ Cache c = new DefaultCacheFactory().createCache(false); // default LOCAL cache
c.start();
for (int i = 0; i < numNodes; i++)
{
- c.put(Fqn.fromString("/node" + i), generateRandomString(keySize), generateRandomString(payloadSize));
+ switch (payloadType)
+ {
+ case STRINGS:
+ c.put(Fqn.fromString("/node" + i), generateRandomString(keySize), generateRandomString(payloadSize));
+ break;
+ case BYTE_ARRAYS:
+ c.put(Fqn.fromString("/node" + i), generateUniqueKey(i, keySize), generateBytePayload(payloadSize));
+ break;
+ default:
+ throw new CacheException("Unknown payload type");
+ }
+
if (i % 1000 == 0) System.out.println("Added " + i + " entries");
}
16 years, 11 months
JBoss Cache SVN: r7056 - core/trunk/src/test/java/org/jboss/cache/multiplexer.
by jbosscache-commits@lists.jboss.org
Author: dpospisi(a)redhat.com
Date: 2008-11-03 11:32:39 -0500 (Mon, 03 Nov 2008)
New Revision: 7056
Modified:
core/trunk/src/test/java/org/jboss/cache/multiplexer/AsyncReplTest.java
Log:
Fix in org.jboss.cache.multiplexer.AsyncReplTest for parallel execution.
Modified: core/trunk/src/test/java/org/jboss/cache/multiplexer/AsyncReplTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/multiplexer/AsyncReplTest.java 2008-11-03 15:07:46 UTC (rev 7055)
+++ core/trunk/src/test/java/org/jboss/cache/multiplexer/AsyncReplTest.java 2008-11-03 16:32:39 UTC (rev 7056)
@@ -79,4 +79,8 @@
AssertJUnit.assertTrue("Cache is using multiplexer", cache.getConfiguration().isUsingMultiplexer());
}
+ @Override // workaround for JBCACHE-1434
+ public void testStateTransfer() {
+ super.testStateTransfer();
+ }
}
\ No newline at end of file
16 years, 11 months
JBoss Cache SVN: r7055 - core/trunk/src/test/java/org/jboss/cache/config/parsing.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-11-03 10:07:46 -0500 (Mon, 03 Nov 2008)
New Revision: 7055
Modified:
core/trunk/src/test/java/org/jboss/cache/config/parsing/CustomInterceptorsElementParserTest.java
core/trunk/src/test/java/org/jboss/cache/config/parsing/XmlConfigurationParserTest.java
Log:
Fixed broken tests
Modified: core/trunk/src/test/java/org/jboss/cache/config/parsing/CustomInterceptorsElementParserTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/config/parsing/CustomInterceptorsElementParserTest.java 2008-11-03 14:36:58 UTC (rev 7054)
+++ core/trunk/src/test/java/org/jboss/cache/config/parsing/CustomInterceptorsElementParserTest.java 2008-11-03 15:07:46 UTC (rev 7055)
@@ -51,9 +51,9 @@
String xml =
" <customInterceptors>\n" +
" <interceptor position=\"first\" class=\"org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor\">\n" +
- " <attribute name=\"attrOne\">value1</attribute>\n" +
- " <attribute name=\"attrTwo\">value2</attribute>\n" +
- " <attribute name=\"attrThree\">value3</attribute>\n" +
+ " <property name=\"attrOne\" value=\"value1\"></property>\n" +
+ " <property name=\"attrTwo\" value=\"value2\"></property>\n" +
+ " <property name=\"attrThree\" value=\"value3\"></property>\n" +
" </interceptor>\n" +
" <interceptor position=\"last\" class=\"org.jboss.cache.config.parsing.custominterceptors.BbbCustomInterceptor\"/>\n" +
" <interceptor index=\"3\" class=\"org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor\"/>\n" +
@@ -101,7 +101,7 @@
String xml =
" <customInterceptors>\n" +
" <interceptor position=\"first\" class=\"org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor\">\n" +
- " <attribute name=\"nonexistenAttribute\">value3</attribute>\n" +
+ " <property name=\"nonexistenAttribute\" value=\"value3\"></property>\n" +
" </interceptor>\n" +
" </customInterceptors>";
Element el = XmlConfigHelper.stringToElementInCoreNS(xml);
@@ -123,7 +123,7 @@
String xml =
" <customInterceptors>\n" +
" <interceptor position=\"first\" class=\"org.jboss.cache.config.parsing.custominterceptors.AaaCustomInterceptor\">\n" +
- " <attribute name=\"notExists\">value1</attribute>\n" +
+ " <property name=\"notExists\" value=\"value1\"></property>\n" +
" </interceptor>\n" +
" </customInterceptors>";
Element el = XmlConfigHelper.stringToElementInCoreNS(xml);
Modified: core/trunk/src/test/java/org/jboss/cache/config/parsing/XmlConfigurationParserTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/config/parsing/XmlConfigurationParserTest.java 2008-11-03 14:36:58 UTC (rev 7054)
+++ core/trunk/src/test/java/org/jboss/cache/config/parsing/XmlConfigurationParserTest.java 2008-11-03 15:07:46 UTC (rev 7055)
@@ -232,7 +232,7 @@
LRUAlgorithmConfig secondConfiguration = (LRUAlgorithmConfig) second.getEvictionAlgorithmConfig();
assert secondConfiguration.getMaxAge() == -1;
assert secondConfiguration.getTimeToLive() == 1002;
- assert secondConfiguration.getMaxNodes() == 0;
+ assert secondConfiguration.getMaxNodes() == -1;
EvictionRegionConfig third = regionConfigs.get(1);
MRUAlgorithmConfig thirdConfiguration = (MRUAlgorithmConfig) third.getEvictionAlgorithmConfig();
16 years, 11 months
JBoss Cache SVN: r7054 - core/trunk/src/test/java/org/jboss/cache.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-11-03 09:36:58 -0500 (Mon, 03 Nov 2008)
New Revision: 7054
Modified:
core/trunk/src/test/java/org/jboss/cache/UnitTestCacheFactory.java
Log:
added code to determine the test class
Modified: core/trunk/src/test/java/org/jboss/cache/UnitTestCacheFactory.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/UnitTestCacheFactory.java 2008-11-03 14:28:51 UTC (rev 7053)
+++ core/trunk/src/test/java/org/jboss/cache/UnitTestCacheFactory.java 2008-11-03 14:36:58 UTC (rev 7054)
@@ -219,6 +219,24 @@
*/
public void mangleConfiguration(Configuration configuration)
{
+ StackTraceElement[] traceElements = Thread.getAllStackTraces().get(Thread.currentThread());
+ Class clazz = null;
+ for (StackTraceElement traceElement : traceElements)
+ {
+ String className = traceElement.getClassName();
+ if (className.startsWith("java.lang.Thread")) continue;
+ if (className.startsWith("org.jboss"))
+ {
+ try
+ {
+ clazz = Class.forName(traceElement.getClassName());
+ } catch (ClassNotFoundException e)
+ {
+ throw new Error(traceElement.getClassName() + " should be in class path");
+ }
+ }
+ }
+ System.out.println("Test class is = " + clazz);
configuration.setClusterConfig(mangleClusterConfiguration(configuration.getClusterConfig()));
// Check if the cluster name contains thread id. If not, append.
16 years, 11 months
JBoss Cache SVN: r7053 - in core/trunk/src: main/java/org/jboss/cache/config and 4 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-11-03 09:28:51 -0500 (Mon, 03 Nov 2008)
New Revision: 7053
Added:
core/trunk/src/main/java/org/jboss/cache/config/LegacyConfigurationException.java
Modified:
core/trunk/src/main/java/org/jboss/cache/DefaultCacheFactory.java
core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlParserBase.java
core/trunk/src/main/java/org/jboss/cache/config/parsing/element/BuddyElementParser.java
core/trunk/src/main/java/org/jboss/cache/config/parsing/element/EvictionElementParser.java
core/trunk/src/main/java/org/jboss/cache/config/parsing/element/LoadersElementParser.java
core/trunk/src/main/java/org/jboss/cache/jmx/CacheJmxWrapper.java
core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/LegacyConfigurationTest.java
Log:
JBCACHE-1425 - CacheJmxWrapper only accepts new 3.x format config elements
Modified: core/trunk/src/main/java/org/jboss/cache/DefaultCacheFactory.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/DefaultCacheFactory.java 2008-11-02 18:13:25 UTC (rev 7052)
+++ core/trunk/src/main/java/org/jboss/cache/DefaultCacheFactory.java 2008-11-03 14:28:51 UTC (rev 7053)
@@ -24,6 +24,7 @@
import org.jboss.cache.annotations.Compat;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.ConfigurationException;
+import org.jboss.cache.config.LegacyConfigurationException;
import org.jboss.cache.config.parsing.XmlConfigurationParser;
import org.jboss.cache.config.parsing.XmlConfigurationParser2x;
import org.jboss.cache.factories.ComponentFactory;
@@ -84,7 +85,7 @@
{
c = parser.parseFile(configFileName);
}
- catch (ConfigurationException e)
+ catch (LegacyConfigurationException e)
{
XmlConfigurationParser2x oldParser = new XmlConfigurationParser2x();
c = oldParser.parseFile(configFileName);
Added: core/trunk/src/main/java/org/jboss/cache/config/LegacyConfigurationException.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/LegacyConfigurationException.java (rev 0)
+++ core/trunk/src/main/java/org/jboss/cache/config/LegacyConfigurationException.java 2008-11-03 14:28:51 UTC (rev 7053)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.cache.config;
+
+/**
+ * Thrown when a legacy configuration XML element is passed into a modern 3.0 parser
+ *
+ * @author Manik Surtani (<a href="mailto:manik AT jboss DOT org">manik AT jboss DOT org</a>)
+ * @since 3.0
+ */
+public class LegacyConfigurationException extends ConfigurationException
+{
+ public LegacyConfigurationException(Exception e)
+ {
+ super(e);
+ }
+
+ public LegacyConfigurationException(String string)
+ {
+ super(string);
+ }
+
+ public LegacyConfigurationException(String string, String erroneousAttribute)
+ {
+ super(string, erroneousAttribute);
+ }
+
+ public LegacyConfigurationException(String string, Throwable throwable)
+ {
+ super(string, throwable);
+ }
+}
Modified: core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlParserBase.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlParserBase.java 2008-11-02 18:13:25 UTC (rev 7052)
+++ core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlParserBase.java 2008-11-03 14:28:51 UTC (rev 7053)
@@ -1,26 +1,27 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, 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 2000 - 2008, 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.cache.config.parsing;
+import org.jboss.cache.config.LegacyConfigurationException;
import org.jboss.util.StringPropertyReplacer;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
@@ -33,7 +34,6 @@
*/
public abstract class XmlParserBase
{
-
/**
* @see Integer#parseInt(String)
*/
@@ -99,4 +99,11 @@
String value = element.getAttribute(attrName);
return value == null ? null : StringPropertyReplacer.replaceProperties(value);
}
+
+ protected void assertNotLegacyElement(Element e)
+ {
+ // is this a legacy element?!?
+ String name = e.getNodeName();
+ if ("config".equals(name)) throw new LegacyConfigurationException("Legacy element encountered when using parser " + getClass().getSimpleName());
+ }
}
Modified: core/trunk/src/main/java/org/jboss/cache/config/parsing/element/BuddyElementParser.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/parsing/element/BuddyElementParser.java 2008-11-02 18:13:25 UTC (rev 7052)
+++ core/trunk/src/main/java/org/jboss/cache/config/parsing/element/BuddyElementParser.java 2008-11-03 14:28:51 UTC (rev 7053)
@@ -1,24 +1,24 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, 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 2000 - 2008, 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.cache.config.parsing.element;
import org.jboss.cache.buddyreplication.NextMemberBuddyLocator;
@@ -43,6 +43,8 @@
{
public BuddyReplicationConfig parseBuddyElement(Element element)
{
+ assertNotLegacyElement(element);
+
BuddyReplicationConfig brc = new BuddyReplicationConfig();
String enabled = getAttributeValue(element, "enabled");
brc.setEnabled(getBoolean(enabled));
Modified: core/trunk/src/main/java/org/jboss/cache/config/parsing/element/EvictionElementParser.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/parsing/element/EvictionElementParser.java 2008-11-02 18:13:25 UTC (rev 7052)
+++ core/trunk/src/main/java/org/jboss/cache/config/parsing/element/EvictionElementParser.java 2008-11-03 14:28:51 UTC (rev 7053)
@@ -51,7 +51,10 @@
{
public EvictionConfig parseEvictionElement(Element evictionElement)
{
+ assertNotLegacyElement(evictionElement);
+
EvictionConfig evictionConfig = new EvictionConfig();
+
String wakeUpInterval = getAttributeValue(evictionElement, "wakeUpInterval");
if (existsAttribute(wakeUpInterval))
{
Modified: core/trunk/src/main/java/org/jboss/cache/config/parsing/element/LoadersElementParser.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/parsing/element/LoadersElementParser.java 2008-11-02 18:13:25 UTC (rev 7052)
+++ core/trunk/src/main/java/org/jboss/cache/config/parsing/element/LoadersElementParser.java 2008-11-03 14:28:51 UTC (rev 7053)
@@ -1,24 +1,24 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, 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 2000 - 2008, 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.cache.config.parsing.element;
import org.jboss.cache.config.CacheLoaderConfig;
@@ -44,6 +44,8 @@
{
public CacheLoaderConfig parseLoadersElement(Element element)
{
+ assertNotLegacyElement(element);
+
CacheLoaderConfig cacheLoaderConfig = new CacheLoaderConfig();
String passivation = getAttributeValue(element, "passivation");
if (existsAttribute(passivation)) cacheLoaderConfig.setPassivation(getBoolean(passivation));
Modified: core/trunk/src/main/java/org/jboss/cache/jmx/CacheJmxWrapper.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/jmx/CacheJmxWrapper.java 2008-11-02 18:13:25 UTC (rev 7052)
+++ core/trunk/src/main/java/org/jboss/cache/jmx/CacheJmxWrapper.java 2008-11-03 14:28:51 UTC (rev 7053)
@@ -34,8 +34,10 @@
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.ConfigurationException;
import org.jboss.cache.config.EvictionConfig;
+import org.jboss.cache.config.LegacyConfigurationException;
import org.jboss.cache.config.RuntimeConfig;
import org.jboss.cache.config.parsing.JGroupsStackParser;
+import org.jboss.cache.config.parsing.XmlConfigurationParser2x;
import org.jboss.cache.config.parsing.element.BuddyElementParser;
import org.jboss.cache.config.parsing.element.EvictionElementParser;
import org.jboss.cache.config.parsing.element.LoadersElementParser;
@@ -392,7 +394,14 @@
BuddyReplicationConfig brc = null;
if (config != null)
{
- brc = buddyElementParser.parseBuddyElement(config);
+ try
+ {
+ brc = buddyElementParser.parseBuddyElement(config);
+ }
+ catch (LegacyConfigurationException lce)
+ {
+ brc = XmlConfigurationParser2x.parseBuddyReplicationConfig(config);
+ }
}
getConfiguration().setBuddyReplicationConfig(brc);
this.buddyReplConfig = config;
@@ -403,7 +412,14 @@
CacheLoaderConfig clc = null;
if (cacheLoaderConfig != null)
{
- clc = loadersElementParser.parseLoadersElement(cacheLoaderConfig);
+ try
+ {
+ clc = loadersElementParser.parseLoadersElement(cacheLoaderConfig);
+ }
+ catch (LegacyConfigurationException lce)
+ {
+ clc = XmlConfigurationParser2x.parseCacheLoaderConfig(cacheLoaderConfig);
+ }
}
getConfiguration().setCacheLoaderConfig(clc);
this.cacheLoaderConfig = cacheLoaderConfig;
@@ -453,7 +469,14 @@
EvictionConfig ec = null;
if (config != null)
{
- ec = evictionElementParser.parseEvictionElement(config);
+ try
+ {
+ ec = evictionElementParser.parseEvictionElement(config);
+ }
+ catch (LegacyConfigurationException ce)
+ {
+ ec = XmlConfigurationParser2x.parseEvictionConfig(config);
+ }
}
getConfiguration().setEvictionConfig(ec);
this.evictionConfig = config;
Modified: core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/LegacyConfigurationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/LegacyConfigurationTest.java 2008-11-02 18:13:25 UTC (rev 7052)
+++ core/trunk/src/test/java/org/jboss/cache/jmx/deprecated/LegacyConfigurationTest.java 2008-11-03 14:28:51 UTC (rev 7053)
@@ -34,7 +34,12 @@
import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.config.RuntimeConfig;
import org.jboss.cache.config.parsing.XmlConfigHelper;
-import org.jboss.cache.eviction.*;
+import org.jboss.cache.eviction.FIFOAlgorithm;
+import org.jboss.cache.eviction.FIFOAlgorithmConfig;
+import org.jboss.cache.eviction.LRUAlgorithm;
+import org.jboss.cache.eviction.LRUAlgorithmConfig;
+import org.jboss.cache.eviction.MRUAlgorithm;
+import org.jboss.cache.eviction.MRUAlgorithmConfig;
import org.jboss.cache.jmx.CacheJmxWrapper;
import org.jboss.cache.jmx.CacheJmxWrapperMBean;
import org.jboss.cache.loader.FileCacheLoader;
@@ -68,20 +73,30 @@
@Test(groups = "functional", sequential = true)
public class LegacyConfigurationTest extends CacheJmxWrapperTestBase
{
- @SuppressWarnings({"deprecation", "unchecked"})
public void testLocalCache() throws Exception
{
+ doTest(false);
+ }
+
+ public void testLocalCacheWithLegacyXML() throws Exception
+ {
+ doTest(true);
+ }
+
+ @SuppressWarnings({"deprecation", "unchecked"})
+ private void doTest(boolean legacy) throws Exception
+ {
CacheJmxWrapperMBean<String, String> wrapper = new CacheJmxWrapper();
registerWrapper(wrapper);
wrapper = (CacheJmxWrapperMBean<String, String>) MBeanServerInvocationHandler.newProxyInstance(mBeanServer, mBeanName, CacheJmxWrapperMBean.class, false);
- wrapper.setBuddyReplicationConfig(getBuddyReplicationConfig());
- wrapper.setCacheLoaderConfig(getCacheLoaderConfig());
+ wrapper.setBuddyReplicationConfig(getBuddyReplicationConfig(legacy));
+ wrapper.setCacheLoaderConfig(getCacheLoaderConfig(legacy));
wrapper.setCacheMode("REPL_SYNC");
wrapper.setClusterName("LocalTest");
wrapper.setClusterConfig(getClusterConfig());
- wrapper.setEvictionPolicyConfig(getEvictionPolicyConfig());
+ wrapper.setEvictionPolicyConfig(getEvictionPolicyConfig(legacy));
wrapper.setFetchInMemoryState(false);
wrapper.setInitialStateRetrievalTimeout(100);
wrapper.setInactiveOnStartup(true);
@@ -140,7 +155,7 @@
assertEquals("ClusterConfig", getClusterConfig().toString(), wrapper.getClusterConfig().toString());
- assertEquals("BuddyReplicationConfig", getBuddyReplicationConfig().toString(), wrapper.getBuddyReplicationConfig().toString());
+ assertEquals("BuddyReplicationConfig", getBuddyReplicationConfig(legacy).toString(), wrapper.getBuddyReplicationConfig().toString());
BuddyReplicationConfig brc = c.getBuddyReplicationConfig();
assertEquals("BR enabled", true, brc.isEnabled());
assertEquals("BR auto grav", false, brc.isAutoDataGravitation());
@@ -153,7 +168,7 @@
Properties props = blc.getBuddyLocatorProperties();
assertEquals("BR props", "2", props.get("numBuddies"));
- assertEquals("CacheLoaderConfig", getCacheLoaderConfig().toString(), wrapper.getCacheLoaderConfig().toString());
+ assertEquals("CacheLoaderConfig", getCacheLoaderConfig(legacy).toString(), wrapper.getCacheLoaderConfig().toString());
CacheLoaderConfig clc = c.getCacheLoaderConfig();
assertEquals("CL passivation", false, clc.isPassivation());
assertEquals("CL passivation", true, clc.isShared());
@@ -176,7 +191,7 @@
assertEquals("CL1 singleton", false, iclc.getSingletonStoreConfig().isSingletonStoreEnabled());
assertEquals("CL1 singleton class", SingletonStoreCacheLoader.class.getName(), iclc.getSingletonStoreConfig().getSingletonStoreClass());
- assertEquals("EvictionPolicyConfig", getEvictionPolicyConfig().toString(), wrapper.getEvictionPolicyConfig().toString());
+ assertEquals("EvictionPolicyConfig", getEvictionPolicyConfig(legacy).toString(), wrapper.getEvictionPolicyConfig().toString());
EvictionConfig ec = c.getEvictionConfig();
assertEquals("EC queue size", 1000, ec.getDefaultEvictionRegionConfig().getEventQueueSize());
assertEquals("EC wakeup", 5000, ec.getWakeupInterval());
@@ -199,8 +214,8 @@
assertEquals("ERC3 queue size", 1000, erc.getEventQueueSize());
LRUAlgorithmConfig lru = (LRUAlgorithmConfig) erc.getEvictionAlgorithmConfig();
assertEquals("EPC3 maxnodes", 10000, lru.getMaxNodes());
- assertEquals("EPC3 maxage", 10, lru.getMaxAge());
- assertEquals("EPC3 ttl", 8, lru.getTimeToLive());
+ assertEquals("EPC3 maxage", 10000, lru.getMaxAge());
+ assertEquals("EPC3 ttl", 8000, lru.getTimeToLive());
}
@@ -256,10 +271,27 @@
}
- protected static Element getBuddyReplicationConfig() throws Exception
+ protected static Element getBuddyReplicationConfig(boolean legacy) throws Exception
{
-
- String xmlStr =
+ if (legacy)
+ {
+ String xmlStr = "<config>\n" +
+ " <buddyReplicationEnabled>true</buddyReplicationEnabled>\n" +
+ " <buddyLocatorClass>org.jboss.cache.buddyreplication.TestBuddyLocator</buddyLocatorClass>\n" +
+ " <buddyLocatorProperties>\n" +
+ " numBuddies = 2\n" +
+ " </buddyLocatorProperties>\n" +
+ " <buddyPoolName>testpool</buddyPoolName>\n" +
+ " <buddyCommunicationTimeout>600000</buddyCommunicationTimeout>\n" +
+ " <dataGravitationRemoveOnFind>false</dataGravitationRemoveOnFind>\n" +
+ " <dataGravitationSearchBackupTrees>false</dataGravitationSearchBackupTrees>\n" +
+ " <autoDataGravitation>false</autoDataGravitation>\n" +
+ " </config>";
+ return XmlConfigHelper.stringToElement(xmlStr);
+ }
+ else
+ {
+ String xmlStr =
" <buddy enabled=\"true\" poolName=\"testpool\" communicationTimeout=\"600000\">\n" +
" <dataGravitation auto=\"false\" removeOnFind=\"false\" searchBackupTrees=\"false\"/>\n" +
" <locator class=\"org.jboss.cache.buddyreplication.TestBuddyLocator\">\n" +
@@ -268,56 +300,122 @@
" </properties>\n" +
" </locator>\n" +
" </buddy>";
- return XmlConfigHelper.stringToElementInCoreNS(xmlStr);
+ return XmlConfigHelper.stringToElementInCoreNS(xmlStr);
+ }
}
- protected static Element getCacheLoaderConfig() throws Exception
+ protected static Element getCacheLoaderConfig(boolean legacy) throws Exception
{
- String xmlStr =
- " <loaders passivation=\"false\" shared=\"true\">\n" +
- " <preload>\n" +
- " <node fqn=\"/foo\"/>\n" +
- " </preload>\n" +
- " <loader class=\"org.jboss.cache.loader.FileCacheLoader\" async=\"false\" fetchPersistentState=\"true\"\n" +
- " ignoreModifications=\"true\" purgeOnStartup=\"true\">\n" +
- " <properties>\n" +
- " location=/tmp\n " +
- " </properties>\n" +
- " <singletonStore enabled=\"true\" /> \n" +
- " </loader>\n" +
- " <loader class=\"org.jboss.cache.loader.jdbm.JdbmCacheLoader\" async=\"true\" fetchPersistentState=\"false\"\n" +
- " ignoreModifications=\"false\" purgeOnStartup=\"false\">\n" +
- " <properties>\n" +
- " location=/home/bstansberry\n" +
- " </properties>\n" +
- " <singletonStore enabled=\"false\" /> \n" +
- " </loader>\n" +
- " </loaders>";
- return XmlConfigHelper.stringToElementInCoreNS(xmlStr);
+ if (legacy)
+ {
+ String xmlStr = "<config>\n" +
+ " <passivation>false</passivation>\n" +
+ " <preload>/foo</preload>\n" +
+ " <shared>true</shared>\n" +
+ " <cacheloader>\n" +
+ " <class>org.jboss.cache.loader.FileCacheLoader</class>\n" +
+ " <properties>\n" +
+ " location=/tmp\n " +
+ " </properties>\n" +
+ " <async>false</async>\n" +
+ " <fetchPersistentState>true</fetchPersistentState>\n" +
+ " <ignoreModifications>true</ignoreModifications>\n" +
+ " <purgeOnStartup>true</purgeOnStartup>\n" +
+ " <singletonStore>\n" +
+ " <enabled>true</enabled>\n" +
+ " </singletonStore>\n" +
+ " </cacheloader> \n " +
+ " <cacheloader>\n" +
+ " <class>org.jboss.cache.loader.jdbm.JdbmCacheLoader</class>\n" +
+ " <properties>\n" +
+ " location=/home/bstansberry\n " +
+ " </properties>\n" +
+ " <async>true</async>\n" +
+ " <fetchPersistentState>false</fetchPersistentState>\n" +
+ " <ignoreModifications>false</ignoreModifications>\n" +
+ " <purgeOnStartup>false</purgeOnStartup>\n" +
+ " <singletonStore>\n" +
+ " <enabled>false</enabled>\n" +
+ " </singletonStore>\n" +
+ " </cacheloader>\n" +
+ " </config>";
+ return XmlConfigHelper.stringToElement(xmlStr);
+
+ }
+ else
+ {
+ String xmlStr =
+ " <loaders passivation=\"false\" shared=\"true\">\n" +
+ " <preload>\n" +
+ " <node fqn=\"/foo\"/>\n" +
+ " </preload>\n" +
+ " <loader class=\"org.jboss.cache.loader.FileCacheLoader\" async=\"false\" fetchPersistentState=\"true\"\n" +
+ " ignoreModifications=\"true\" purgeOnStartup=\"true\">\n" +
+ " <properties>\n" +
+ " location=/tmp\n " +
+ " </properties>\n" +
+ " <singletonStore enabled=\"true\" /> \n" +
+ " </loader>\n" +
+ " <loader class=\"org.jboss.cache.loader.jdbm.JdbmCacheLoader\" async=\"true\" fetchPersistentState=\"false\"\n" +
+ " ignoreModifications=\"false\" purgeOnStartup=\"false\">\n" +
+ " <properties>\n" +
+ " location=/home/bstansberry\n" +
+ " </properties>\n" +
+ " <singletonStore enabled=\"false\" /> \n" +
+ " </loader>\n" +
+ " </loaders>";
+ return XmlConfigHelper.stringToElementInCoreNS(xmlStr);
+ }
}
- protected static Element getEvictionPolicyConfig() throws Exception
+ protected static Element getEvictionPolicyConfig(boolean legacy) throws Exception
{
-
- String xmlStr =
- " <eviction wakeUpInterval=\"5000\">\n" +
- " <default eventQueueSize=\"1000\" algorithmClass=\"org.jboss.cache.eviction.LRUAlgorithm\">\n" +
- " <attribute name=\"maxNodes\">5000</attribute>\n" +
- " <attribute name=\"timeToLive\">1000000</attribute>\n" +
- " </default>\n" +
- "<region name=\"/org/jboss/data\" algorithmClass=\"org.jboss.cache.eviction.FIFOAlgorithm\">\n" +
- " <attribute name=\"maxNodes\">5000</attribute>\n" +
- "</region>\n" +
- "<region name=\"/test/\" algorithmClass=\"org.jboss.cache.eviction.MRUAlgorithm\">\n" +
- " <attribute name=\"maxNodes\">10000</attribute>\n" +
- "</region>\n" +
- "<region name=\"/maxAgeTest/\">\n" +
- " <attribute name=\"maxNodes\">10000</attribute>\n" +
- " <attribute name=\"timeToLive\">8</attribute>\n" +
- " <attribute name=\"maxAge\">10</attribute>\n" +
- "</region>\n" +
- " </eviction>";
- return XmlConfigHelper.stringToElementInCoreNS(xmlStr);
+ if (legacy)
+ {
+ String xmlStr = " <config>\n" +
+ " <attribute name=\"wakeUpIntervalSeconds\">5</attribute>\n" +
+ " <attribute name=\"eventQueueSize\">1000</attribute>\n" +
+ " <attribute name=\"policyClass\">org.jboss.cache.eviction.LRUPolicy</attribute>\n" +
+ " <region name=\"/_default_\">\n" +
+ " <attribute name=\"maxNodes\">5000</attribute>\n" +
+ " <attribute name=\"timeToLiveSeconds\">1000</attribute>\n" +
+ " </region>\n" +
+ " <region name=\"/org/jboss/data\" policyClass=\"org.jboss.cache.eviction.FIFOPolicy\">\n" +
+ " <attribute name=\"maxNodes\">5000</attribute>\n" +
+ " </region>\n" +
+ " <region name=\"/test\" policyClass=\"org.jboss.cache.eviction.MRUPolicy\">\n" +
+ " <attribute name=\"maxNodes\">10000</attribute>\n" +
+ " </region>\n" +
+ " <region name=\"/maxAgeTest\">\n" +
+ " <attribute name=\"maxNodes\">10000</attribute>\n" +
+ " <attribute name=\"timeToLiveSeconds\">8</attribute>\n" +
+ " <attribute name=\"maxAgeSeconds\">10</attribute>\n" +
+ " </region>\n" +
+ " </config>";
+ return XmlConfigHelper.stringToElement(xmlStr);
+ }
+ else
+ {
+ String xmlStr =
+ " <eviction wakeUpInterval=\"5000\">\n" +
+ " <default eventQueueSize=\"1000\" algorithmClass=\"org.jboss.cache.eviction.LRUAlgorithm\">\n" +
+ " <property name=\"maxNodes\" value=\"5000\"></property>\n" +
+ " <property name=\"timeToLive\" value=\"1000000\"></property>\n" +
+ " </default>\n" +
+ "<region name=\"/org/jboss/data\" algorithmClass=\"org.jboss.cache.eviction.FIFOAlgorithm\">\n" +
+ " <property name=\"maxNodes\" value=\"5000\"></property>\n" +
+ "</region>\n" +
+ "<region name=\"/test/\" algorithmClass=\"org.jboss.cache.eviction.MRUAlgorithm\">\n" +
+ " <property name=\"maxNodes\" value=\"10000\"></property>\n" +
+ "</region>\n" +
+ "<region name=\"/maxAgeTest/\">\n" +
+ " <property name=\"maxNodes\" value=\"10000\"></property>\n" +
+ " <property name=\"timeToLive\" value=\"8000\"></property>\n" +
+ " <property name=\"maxAge\" value=\"10000\"></property>\n" +
+ "</region>\n" +
+ " </eviction>";
+ return XmlConfigHelper.stringToElementInCoreNS(xmlStr);
+ }
}
protected static Element getClusterConfig() throws Exception
16 years, 11 months
JBoss Cache SVN: r7052 - pojo/trunk/src/main/java/org/jboss/cache/pojo/impl.
by jbosscache-commits@lists.jboss.org
Author: bstansberry(a)jboss.com
Date: 2008-11-02 13:13:25 -0500 (Sun, 02 Nov 2008)
New Revision: 7052
Modified:
pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/AdvisedPojoHandler.java
pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/CollectionClassHandler.java
pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/InternalHelper.java
pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/ObjectGraphHandler.java
pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/PojoCacheDelegate.java
pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/SerializableObjectHandler.java
Log:
Convert per-request DEBUG logging to TRACE
Modified: pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/AdvisedPojoHandler.java
===================================================================
--- pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/AdvisedPojoHandler.java 2008-11-02 17:47:24 UTC (rev 7051)
+++ pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/AdvisedPojoHandler.java 2008-11-02 18:13:25 UTC (rev 7052)
@@ -195,9 +195,9 @@
}
// Need to make sure this is behind put such that obj.toString is done correctly.
- if (log.isDebugEnabled())
+ if (log.isTraceEnabled())
{
- log.debug("internalPut(): inserting with fqn: " + fqn);
+ log.trace("internalPut(): inserting with fqn: " + fqn);
}
}
@@ -236,9 +236,9 @@
// Remember to remove the interceptor from in-memory object but make sure it belongs to me first.
if (interceptor != null)
{
- if (log.isDebugEnabled())
+ if (log.isTraceEnabled())
{
- log.debug("regularRemoveObject(): removed cache interceptor fqn: " + fqn + " interceptor: " + interceptor);
+ log.trace("regularRemoveObject(): removed cache interceptor fqn: " + fqn + " interceptor: " + interceptor);
}
util_.detachInterceptor(advisor, interceptor);
}
Modified: pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/CollectionClassHandler.java
===================================================================
--- pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/CollectionClassHandler.java 2008-11-02 17:47:24 UTC (rev 7051)
+++ pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/CollectionClassHandler.java 2008-11-02 18:13:25 UTC (rev 7052)
@@ -107,9 +107,9 @@
if (obj instanceof Map)
{
- if (log.isDebugEnabled())
+ if (log.isTraceEnabled())
{
- log.debug("collectionPutObject(): aspectized obj is a Map type of size: " + ((Map) obj).size());
+ log.trace("collectionPutObject(): aspectized obj is a Map type of size: " + ((Map) obj).size());
}
// Let's replace it with a proxy if necessary
@@ -140,9 +140,9 @@
}
else if (obj instanceof List)
{
- if (log.isDebugEnabled())
+ if (log.isTraceEnabled())
{
- log.debug("collectionPutObject(): aspectized obj is a List type of size: "
+ log.trace("collectionPutObject(): aspectized obj is a List type of size: "
+ ((List) obj).size());
}
@@ -174,9 +174,9 @@
}
else if (obj instanceof Set)
{
- if (log.isDebugEnabled())
+ if (log.isTraceEnabled())
{
- log.debug("collectionPutObject(): aspectized obj is a Set type of size: "
+ log.trace("collectionPutObject(): aspectized obj is a Set type of size: "
+ ((Set) obj).size());
}
Modified: pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/InternalHelper.java
===================================================================
--- pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/InternalHelper.java 2008-11-02 17:47:24 UTC (rev 7051)
+++ pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/InternalHelper.java 2008-11-02 18:13:25 UTC (rev 7052)
@@ -329,8 +329,8 @@
{
final int RETRY = 5;
- if (log.isDebugEnabled())
- log.debug("lockPojo(): id:" + id);
+ if (log.isTraceEnabled())
+ log.trace("lockPojo(): id:" + id);
boolean isNeeded = true;
int retry = 0;
Modified: pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/ObjectGraphHandler.java
===================================================================
--- pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/ObjectGraphHandler.java 2008-11-02 17:47:24 UTC (rev 7051)
+++ pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/ObjectGraphHandler.java 2008-11-02 18:13:25 UTC (rev 7052)
@@ -84,9 +84,9 @@
protected Object remove(Fqn<?> fqn, Reference reference, Object pojo)
throws CacheException
{
- if (log.isDebugEnabled())
+ if (log.isTraceEnabled())
{
- log.debug("remove(): removing object fqn: " + reference
+ log.trace("remove(): removing object fqn: " + reference
+ " Will just de-reference it.");
}
removeFromReference(fqn, reference);
Modified: pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/PojoCacheDelegate.java
===================================================================
--- pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/PojoCacheDelegate.java 2008-11-02 17:47:24 UTC (rev 7051)
+++ pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/PojoCacheDelegate.java 2008-11-02 18:13:25 UTC (rev 7052)
@@ -68,9 +68,9 @@
if (pojo != null)
{
// we already have an advised instance
- if (log.isDebugEnabled())
+ if (log.isTraceEnabled())
{
- log.debug("getObject(): id: " + fqn + " retrieved from existing instance directly. ");
+ log.trace("getObject(): id: " + fqn + " retrieved from existing instance directly. ");
}
return pojo;
}
@@ -105,9 +105,9 @@
boolean allowArray = source instanceof ArrayInterceptable;
if (oldValue == obj && skipDuplicateAttach(obj, allowArray))
{
- if (log.isDebugEnabled())
+ if (log.isTraceEnabled())
{
- log.debug("putObject(): id: " + fqn + " pojo is already in the cache. Return right away.");
+ log.trace("putObject(): id: " + fqn + " pojo is already in the cache. Return right away.");
}
return obj;
}
@@ -132,8 +132,8 @@
else
{
internalFqn = createInternalFqn(fqn, obj);
- if (log.isDebugEnabled())
- log.debug("attach(): id: " + fqn + " will store the pojo in the internal area: " + internalFqn);
+ if (log.isTraceEnabled())
+ log.trace("attach(): id: " + fqn + " will store the pojo in the internal area: " + internalFqn);
handler.put(internalFqn, reference, obj);
@@ -186,9 +186,9 @@
// store PojoReference
pojoReference.setFqn(internalFqn);
internal_.putPojoReference(fqn, pojoReference, field);
- if (log.isDebugEnabled())
+ if (log.isTraceEnabled())
{
- log.debug("put(): inserting PojoReference with id: " + fqn);
+ log.trace("put(): inserting PojoReference with id: " + fqn);
}
// store obj in the internal fqn
return internalFqn;
@@ -203,7 +203,7 @@
Node base = cache.getRoot().getChild(f);
if (base == null)
{
- log.debug("The node retrieved is null from fqn: " + f);
+ log.trace("The node retrieved is null from fqn: " + f);
return;
}
base.addChild(child);
@@ -236,9 +236,9 @@
- if (log.isDebugEnabled())
+ if (log.isTraceEnabled())
{
- log.debug("removeObject(): removing object from id: " + fqn
+ log.trace("removeObject(): removing object from id: " + fqn
+ " with the corresponding internal id: " + internalFqn);
}
@@ -278,9 +278,9 @@
}
findChildObjects(fqn, map);
- if (log.isDebugEnabled())
+ if (log.isTraceEnabled())
{
- log.debug("_findObjects(): id: " + fqn + " size of pojos found: " + map.size());
+ log.trace("_findObjects(): id: " + fqn + " size of pojos found: " + map.size());
}
return map;
}
@@ -298,8 +298,8 @@
return null;
}
- if (log.isDebugEnabled())
- log.debug("getObject(): id: " + fqn + " with a corresponding internal id: " + internalFqn);
+ if (log.isTraceEnabled())
+ log.trace("getObject(): id: " + fqn + " with a corresponding internal id: " + internalFqn);
/**
* Reconstruct the managed POJO
Modified: pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/SerializableObjectHandler.java
===================================================================
--- pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/SerializableObjectHandler.java 2008-11-02 17:47:24 UTC (rev 7051)
+++ pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/SerializableObjectHandler.java 2008-11-02 18:13:25 UTC (rev 7052)
@@ -62,9 +62,9 @@
protected void put(Fqn<?> fqn, Reference reference, Object obj) throws CacheException
{
// Note that JBoss Serialization can serialize any type now.
- if (log_.isDebugEnabled())
+ if (log_.isTraceEnabled())
{
- log_.debug("put(): obj (" + obj.getClass() + ") is non-advisable but serialize it anyway. "
+ log_.trace("put(): obj (" + obj.getClass() + ") is non-advisable but serialize it anyway. "
+ "Note that if it is non-serializable we require to use JBoss Serialization.");
}
16 years, 11 months