JBoss Cache SVN: r6980 - in core/branches/flat: src/main/java/org/jboss/starobrno/loader and 11 other directories.
by jbosscache-commits@lists.jboss.org
Author: dpospisi(a)redhat.com
Date: 2008-10-17 13:17:17 -0400 (Fri, 17 Oct 2008)
New Revision: 6980
Added:
core/branches/flat/src/test/java/org/jboss/starobrno/UnitTestCacheFactory.java
core/branches/flat/src/test/java/org/jboss/starobrno/UnitTestCacheManager.java
core/branches/flat/src/test/java/org/jboss/starobrno/util/UnitTestTestNGListener.java
Modified:
core/branches/flat/pom.xml
core/branches/flat/src/main/java/org/jboss/starobrno/loader/FileCacheLoaderConfig.java
core/branches/flat/src/main/java/org/jboss/starobrno/manager/CacheManager.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/CacheAPITest.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/CacheSPITest.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/batch/BatchWithTM.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/batch/BatchWithoutTM.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/LockTestBase.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/repeatable_read/RepeatableReadLockTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/repeatable_read/WriteSkewTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/notifications/AsyncNotificationTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/notifications/CacheListenerTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/notifications/ConcurrentNotificationTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/notifications/NotifierAnnotationsTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/notifications/NotifierTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/notifications/NotifyNodeInvalidatedTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/profiling/AbstractProfileTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/profiling/MemConsumptionTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/profiling/ProfileTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/replication/AsyncReplTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/replication/ExceptionTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/replication/ReplicationExceptionTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncCacheListenerTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncReplTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/tx/LocalModeTxTest.java
Log:
Updated testsuite to run in parallel mode.
Modified: core/branches/flat/pom.xml
===================================================================
--- core/branches/flat/pom.xml 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/pom.xml 2008-10-17 17:17:17 UTC (rev 6980)
@@ -113,10 +113,36 @@
<version>2.3</version>
<scope>test</scope>
</dependency>
+ <!-- 5.8 is needed for propper parallel test execution -->
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>5.8</version>
+ <scope>test</scope>
+ <classifier>jdk15</classifier>
+ </dependency>
</dependencies>
<build>
<plugins>
+ <!-- ensure parallel test execution -->
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.3-JBOSS</version>
+ <configuration>
+ <parallel>methods</parallel>
+ <threadCount>10</threadCount>
+ <forkMode>none</forkMode>
+ <trimStackTrace>false</trimStackTrace>
+ <properties>
+ <property>
+ <name>listener</name>
+ <value>org.jboss.starobrno.util.UnitTestTestNGListener</value>
+ </property>
+ </properties>
+ </configuration>
+ </plugin>
+ <plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-1</version>
<executions>
@@ -349,6 +375,16 @@
</plugin>
</plugins>
</build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.4.3-JBOSS</version>
+ </plugin>
+ </plugins>
+ </reporting>
+
</profile>
<profile>
@@ -396,7 +432,6 @@
<profile>
<id>JBossAS</id>
<activation>
- <activeByDefault>false</activeByDefault>
</activation>
<properties>
<jbosscache-core-version>3.0.0-SNAPSHOT-JBossAS</jbosscache-core-version>
Modified: core/branches/flat/src/main/java/org/jboss/starobrno/loader/FileCacheLoaderConfig.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/loader/FileCacheLoaderConfig.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/main/java/org/jboss/starobrno/loader/FileCacheLoaderConfig.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -21,11 +21,11 @@
*/
package org.jboss.starobrno.loader;
-import org.jboss.cache.util.Util;
import org.jboss.starobrno.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
import org.jboss.starobrno.config.Dynamic;
import java.util.Properties;
+import org.jboss.starobrno.util.Util;
public class FileCacheLoaderConfig extends IndividualCacheLoaderConfig
{
Modified: core/branches/flat/src/main/java/org/jboss/starobrno/manager/CacheManager.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/manager/CacheManager.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/main/java/org/jboss/starobrno/manager/CacheManager.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -37,7 +37,7 @@
*/
public class CacheManager implements Lifecycle
{
- Configuration c;
+ protected Configuration c;
private final ConcurrentMap<String, Cache> caches = new ConcurrentHashMap<String, Cache>();
public CacheManager(Configuration c)
@@ -79,7 +79,7 @@
if (c != null) c.stop();
}
- private Cache createNewCache()
+ protected Cache createNewCache()
{
// for now latch on to the existing cache creation mechanisms
DefaultCacheFactory dcf = new DefaultCacheFactory();
Added: core/branches/flat/src/test/java/org/jboss/starobrno/UnitTestCacheFactory.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/UnitTestCacheFactory.java (rev 0)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/UnitTestCacheFactory.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -0,0 +1,359 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.starobrno;
+
+import org.jboss.cache.*;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.io.InputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import org.jboss.starobrno.config.Configuration;
+import org.jboss.starobrno.config.ConfigurationException;
+import org.jboss.starobrno.config.parsing.XmlConfigurationParser;
+import org.jboss.starobrno.util.TestingUtil;
+import org.jgroups.conf.XmlConfigurator;
+
+/**
+ * @author <a href="mailto:dpospisi@redhat.com">Dominik Pospisil (dpospisi(a)redhat.com)</a>
+ */
+public class UnitTestCacheFactory<K, V> implements CacheFactory<K, V>
+{
+
+ private final Log log = LogFactory.getLog(UnitTestCacheFactory.class);
+
+
+ /**
+ * Holds unique mcast_addr for each thread used for JGroups channel construction.
+ */
+ private static final ThreadLocal<String> threadMcastIP = new ThreadLocal<String>()
+ {
+ private final AtomicInteger uniqueAddr = new AtomicInteger(11);
+
+ @Override
+ protected String initialValue()
+ {
+ return "228.10.10." + uniqueAddr.getAndIncrement();
+ }
+ };
+
+ /**
+ * Holds unique mcast_port for each thread used for JGroups channel construction.
+ */
+ private static final ThreadLocal<Integer> threadMcastPort = new ThreadLocal<Integer>()
+ {
+ private final AtomicInteger uniquePort = new AtomicInteger(45589);
+
+ @Override
+ protected Integer initialValue()
+ {
+ return uniquePort.getAndIncrement();
+ }
+ };
+
+ /**
+ * For each thread holds list of caches created using this factory.
+ */
+ private static final ThreadLocal<List<Cache>> threadCaches =
+ new ThreadLocal<List<Cache>>()
+ {
+ @Override
+ protected List<Cache> initialValue()
+ {
+ return new ArrayList<Cache>();
+ }
+ };
+
+ private final static List<Cache> allCaches = new ArrayList<Cache>();
+
+ /**
+ * For each thread holds the name of the test class which executed createCache factory method.
+ */
+ private static final ThreadLocal<String> threadTestName = new ThreadLocal<String>();
+
+ // factory methods
+
+ public Cache<K, V> createCache() throws ConfigurationException
+ {
+ return createCache(true);
+ }
+
+ public Cache<K, V> createCache(boolean start) throws ConfigurationException
+ {
+ return createCache(new Configuration(), start);
+ }
+
+ public Cache<K, V> createCache(String configFileName) throws ConfigurationException
+ {
+ return createCache(configFileName, true);
+ }
+
+ public Cache<K, V> createCache(String configFileName, boolean start) throws ConfigurationException
+ {
+ XmlConfigurationParser parser = new XmlConfigurationParser();
+ Configuration c;
+ c = parser.parseFile(configFileName);
+ return createCache(c, start);
+ }
+
+ public Cache<K, V> createCache(Configuration configuration) throws ConfigurationException
+ {
+ return createCache(configuration, true);
+ }
+
+ public Cache<K, V> createCache(InputStream is) throws ConfigurationException
+ {
+ return createCache(is, true);
+ }
+
+ public Cache<K, V> createCache(InputStream is, boolean start) throws ConfigurationException
+ {
+ XmlConfigurationParser parser = new XmlConfigurationParser();
+ Configuration c = parser.parseStream(is);
+ return createCache(c, start);
+ }
+
+ public Cache<K, V> createCache(Configuration configuration, boolean start) throws ConfigurationException
+ {
+ // - Do not print out this exception - since tests are ALSO run from IDEs on the main thread. - MANIK
+// if (!Thread.currentThread().getName().contains("pool"))
+// {
+// System.out.println("CreateCache called from wrong thread: " + Thread.currentThread().getName());
+// }
+
+ checkCaches();
+
+ switch (configuration.getCacheMode())
+ {
+ case LOCAL:
+ // local cache, no channel used
+ break;
+ case REPL_SYNC:
+ case REPL_ASYNC:
+ case INVALIDATION_ASYNC:
+ case INVALIDATION_SYNC:
+ // replicated cache, update channel setup
+ mangleConfiguration(configuration);
+ break;
+ default:
+ log.info("Unknown cache mode!");
+ }
+
+ Cache<K, V> cache = new DefaultCacheFactory<K, V>().createCache(configuration, start);
+
+ List<Cache> caches = threadCaches.get();
+ caches.add(cache);
+
+ synchronized (allCaches)
+ {
+ allCaches.add(cache);
+ }
+ return cache;
+
+ }
+
+ /**
+ * Destroys all caches created by this factory in the current thread.
+ *
+ * @return true if some cleanup was actually performed
+ */
+ public boolean cleanUp()
+ {
+ List<Cache> caches = new ArrayList<Cache>(threadCaches.get());
+ boolean ret = false;
+
+ for (Cache cache : caches)
+ {
+ TestingUtil.killCaches(cache);
+ ret = true;
+ }
+ return ret;
+ }
+
+ public void removeCache(Cache c)
+ {
+
+ // - Do not print out this exception - since tests are ALSO run from IDEs on the main thread. - MANIK
+// if (!Thread.currentThread().getName().contains("pool"))
+// {
+// System.out.println("RemoveCache called from wrong thread.");
+// }
+
+ List<Cache> caches = threadCaches.get();
+ synchronized (allCaches)
+ {
+ if (caches.contains(c))
+ {
+ caches.remove(c);
+ allCaches.remove(c);
+ }
+ else if (allCaches.contains(c))
+ {
+ System.out.println("[" + Thread.currentThread().getName() + "] WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Remove cache called from different thread.");
+ Thread.dumpStack();
+ }
+ }
+ }
+
+ /**
+ * Updates cluster configuration to ensure mutual thread isolation.
+ *
+ * @param configuration Configuration to update.
+ */
+ public void mangleConfiguration(Configuration configuration)
+ {
+
+ configuration.setClusterConfig(mangleClusterConfiguration(configuration.getClusterConfig()));
+ // Check if the cluster name contains thread id. If not, append.
+ // We can not just append the threadId, since some of the tests are crating instances
+ // using configurations derived from configurations returned by this factory.
+
+ String clusterName = configuration.getClusterName();
+
+ // append thread id
+ if (clusterName.indexOf(Thread.currentThread().getName()) == -1)
+ {
+ clusterName = clusterName + "-" + Thread.currentThread().getName();
+// System.out.println(getThreadId() + " Setting cluster name " + newClusterName);
+ }
+
+// String testName = extractTestName();
+
+ // prepend test name
+ /*
+ if (clusterName.indexOf(testName) == -1) {
+ clusterName = testName + "-" + clusterName;
+ }
+ */
+
+ configuration.setClusterName(clusterName);
+
+ }
+
+ /**
+ * Updates cluster configuration to ensure mutual thread isolation.
+ */
+ public String mangleClusterConfiguration(String clusterConfig)
+ {
+ if (clusterConfig == null)
+ {
+ // No explicit cluster configuration found. we need to resolve the default config
+ // now in orded to be able to update it before the cache (and the channel) starts.
+
+ clusterConfig = getDefaultClusterConfiguration();
+ }
+
+ // replace mcast_addr
+ Pattern pattern = Pattern.compile("mcast_addr=[^;]*");
+ Matcher m = pattern.matcher(clusterConfig);
+ if (m.find())
+ {
+ String origAddr = m.group().substring(m.group().indexOf("=") + 1);
+ String newAddr = threadMcastIP.get();
+// System.out.println(getThreadId() + " Replacing mcast_addr " + origAddr + " with " + newAddr);
+ clusterConfig = m.replaceFirst("mcast_addr=" + newAddr);
+ }
+ else
+ {
+ Thread.dumpStack();
+ System.exit(1);
+ }
+
+ // replace mcast_port
+ pattern = Pattern.compile("mcast_port=[^;]*");
+ m = pattern.matcher(clusterConfig);
+ if (m.find())
+ {
+// String origPort = m.group().substring(m.group().indexOf("=") + 1);
+ String newPort = threadMcastPort.get().toString();
+ // System.out.println(getThreadId() + " Replacing mcast_port " + origPort + " with " + newPort);
+ clusterConfig = m.replaceFirst("mcast_port=" + newPort);
+ }
+
+ return clusterConfig;
+ }
+
+// private String getThreadId()
+// {
+// return "[" + Thread.currentThread().getName() + "]";
+// }
+
+ private void checkCaches()
+ {
+ String lastTestName = threadTestName.get();
+ String currentTestName = extractTestName();
+
+ if ((lastTestName != null) && (!lastTestName.equals(currentTestName)))
+ {
+
+ String threadId = "[" + Thread.currentThread().getName() + "] ";
+
+ // we are running new test class
+ // check if there is a cache(s) instance left & kill it if possitive
+
+ if (cleanUp())
+ {
+ System.out.print(threadId + "WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ");
+ System.out.print(threadId + " A test method in " + lastTestName + " did not clean all cache instances properly. ");
+ System.out.println(threadId + " Use UnitTestCacheFactory.cleanUp() or TestngUtil.killCaches(...) ");
+ }
+
+ }
+ threadTestName.set(currentTestName);
+ }
+
+ private String extractTestName()
+ {
+ StackTraceElement[] stack = Thread.currentThread().getStackTrace();
+ if (stack.length == 0) return null;
+ for (int i = stack.length - 1; i > 0; i--)
+ {
+ StackTraceElement e = stack[i];
+ String className = e.getClassName();
+ if (className.indexOf("org.jboss.cache") != -1) return className; //+ "." + e.getMethodName();
+ }
+ return null;
+ }
+
+ private String getDefaultClusterConfiguration() {
+ return getClusterConfigFromFile(new Configuration().getDefaultClusterConfig());
+ }
+
+ /**
+ * Helper method that takes a <b>JGroups</b> configuration file and creates an old-style JGroups config {@link String} that can be used
+ * in {@link org.jboss.cache.config.Configuration#setClusterConfig(String)}. Note that expressions
+ * in the file - such as <tt>${jgroups.udp.mcast_port:45588}</tt> are expanded out accordingly.
+ *
+ * @param url url to the cfg file
+ * @return a String
+ */
+ public static String getClusterConfigFromFile(URL url)
+ {
+ try
+ {
+ XmlConfigurator conf = XmlConfigurator.getInstance(url);
+ String tmp = conf.getProtocolStackString();
+ // parse this string for ${} substitutions
+ // Highly crappy approach!!
+ tmp = tmp.replace("${jgroups.udp.mcast_addr:228.10.10.10}", "228.10.10.10");
+ tmp = tmp.replace("${jgroups.udp.mcast_port:45588}", "45588");
+ tmp = tmp.replace("${jgroups.udp.ip_ttl:2}", "2");
+// System.out.println("config string: " + tmp);
+ return tmp;
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Problems with url " + url, e);
+ }
+ }
+
+}
Added: core/branches/flat/src/test/java/org/jboss/starobrno/UnitTestCacheManager.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/UnitTestCacheManager.java (rev 0)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/UnitTestCacheManager.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -0,0 +1,27 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.jboss.starobrno;
+
+import org.jboss.starobrno.config.Configuration;
+import org.jboss.starobrno.manager.CacheManager;
+
+/**
+ *
+ * @author dpospisi
+ */
+public class UnitTestCacheManager extends CacheManager
+{
+ public UnitTestCacheManager(Configuration c) {
+ super(c);
+ }
+
+ @Override
+ protected Cache createNewCache()
+ {
+ UnitTestCacheFactory dcf = new UnitTestCacheFactory();
+ return dcf.createCache(c);
+ }
+}
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/CacheAPITest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/CacheAPITest.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/CacheAPITest.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -1,7 +1,6 @@
package org.jboss.starobrno.api;
import org.jboss.cache.CacheFactory;
-import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.transaction.GenericTransactionManagerLookup;
import org.jboss.starobrno.CacheSPI;
import org.jboss.starobrno.config.Configuration;
@@ -13,10 +12,9 @@
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-import java.util.ArrayList;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
+import org.jboss.starobrno.UnitTestCacheFactory;
/**
* Tests the {@link org.jboss.cache.Cache} public API at a high level
@@ -27,19 +25,18 @@
@Test(groups = {"functional", "pessimistic"})
public class CacheAPITest
{
- private CacheSPI<String, String> cache;
- final List<String> events = new ArrayList<String>();
+ private ThreadLocal<CacheSPI<String, String>> cacheTL = new ThreadLocal<CacheSPI<String, String>>();
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception
{
// start a single cache instance
- CacheFactory<String, String> cf = new DefaultCacheFactory<String, String>();
- cache = (CacheSPI<String, String>) cf.createCache("configs/local-tx.xml", false);
+ CacheFactory<String, String> cf = new UnitTestCacheFactory<String, String>();
+ CacheSPI<String, String> cache = (CacheSPI<String, String>) cf.createCache("configs/local-tx.xml", false);
cache.getConfiguration().setEvictionConfig(null);
configure(cache.getConfiguration());
cache.start();
- events.clear();
+ cacheTL.set(cache);
}
protected void configure(Configuration c)
@@ -50,7 +47,9 @@
@AfterMethod(alwaysRun = true)
public void tearDown()
{
+ CacheSPI<String, String> cache = cacheTL.get();
TestingUtil.killCaches(cache);
+ cacheTL.set(null);
}
/**
@@ -58,6 +57,7 @@
*/
public void testConfiguration()
{
+ CacheSPI<String, String> cache = cacheTL.get();
Configuration c = cache.getConfiguration();
assertEquals(Configuration.CacheMode.LOCAL, c.getCacheMode());
assertEquals(GenericTransactionManagerLookup.class.getName(), c.getTransactionManagerLookupClass());
@@ -79,6 +79,7 @@
public void testGetMembersInLocalMode()
{
+ CacheSPI<String, String> cache = cacheTL.get();
assert cache.getRPCManager() == null : "Cache members should be null if running in LOCAL mode";
}
@@ -91,6 +92,7 @@
*/
public void testConvenienceMethods()
{
+ CacheSPI<String, String> cache = cacheTL.get();
String key = "key", value = "value";
Map<String, String> data = new HashMap<String, String>();
data.put(key, value);
@@ -115,6 +117,7 @@
*/
public void testEvict()
{
+ CacheSPI<String, String> cache = cacheTL.get();
String key1 = "keyOne", key2 = "keyTwo", value = "value";
cache.put(key1, value);
@@ -140,6 +143,7 @@
public void testStopClearsData() throws Exception
{
+ CacheSPI<String, String> cache = cacheTL.get();
String key = "key", value = "value";
cache.put(key, value);
assert cache.get(key).equals(value);
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/CacheSPITest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/CacheSPITest.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/CacheSPITest.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -1,6 +1,5 @@
package org.jboss.starobrno.api;
-import org.jboss.cache.DefaultCacheFactory;
import org.jboss.starobrno.CacheSPI;
import org.jboss.starobrno.config.Configuration;
import org.jboss.starobrno.config.Configuration.CacheMode;
@@ -12,12 +11,13 @@
import java.util.List;
import java.util.concurrent.TimeUnit;
+import org.jboss.starobrno.UnitTestCacheFactory;
@Test(groups = {"functional", "pessimistic"})
public class CacheSPITest
{
- private CacheSPI<Object, Object> cache1;
- private CacheSPI<Object, Object> cache2;
+ private ThreadLocal<CacheSPI<Object, Object>> cache1TL = new ThreadLocal<CacheSPI<Object, Object>>();
+ private ThreadLocal<CacheSPI<Object, Object>> cache2TL = new ThreadLocal<CacheSPI<Object, Object>>();
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception
@@ -28,38 +28,30 @@
Configuration conf2 = conf1.clone();
- cache1 = (CacheSPI<Object, Object>) new DefaultCacheFactory<Object, Object>().createCache(conf1, false);
- cache2 = (CacheSPI<Object, Object>) new DefaultCacheFactory<Object, Object>().createCache(conf2, false);
+ CacheSPI<Object, Object> cache1 = (CacheSPI<Object, Object>) new UnitTestCacheFactory<Object, Object>().createCache(conf1, false);
+ CacheSPI<Object, Object> cache2 = (CacheSPI<Object, Object>) new UnitTestCacheFactory<Object, Object>().createCache(conf2, false);
+ cache1TL.set(cache1);
+ cache2TL.set(cache2);
}
@AfterMethod(alwaysRun = true)
public void tearDown() throws Exception
{
- if (cache1 != null)
- {
- try
- {
- cache1.stop();
- }
- catch (Exception e)
- {
- }
- }
+ CacheSPI<Object, Object> cache1 = cache1TL.get();
+ CacheSPI<Object, Object> cache2 = cache2TL.get();
- if (cache2 != null)
- {
- try
- {
- cache2.stop();
- }
- catch (Exception e)
- {
- }
- }
+ TestingUtil.killCaches(cache1, cache2);
+
+ cache1TL.set(null);
+ cache2TL.set(null);
+
}
public void testGetMembers() throws Exception
{
+ CacheSPI<Object, Object> cache1 = cache1TL.get();
+ CacheSPI<Object, Object> cache2 = cache2TL.get();
+
cache1.start();
List memb1 = cache1.getRPCManager().getMembers();
assert 1 == memb1.size();
@@ -82,6 +74,9 @@
public void testIsCoordinator() throws Exception
{
+ CacheSPI<Object, Object> cache1 = cache1TL.get();
+ CacheSPI<Object, Object> cache2 = cache2TL.get();
+
cache1.start();
assert cache1.getRPCManager().isCoordinator();
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/batch/BatchWithTM.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/batch/BatchWithTM.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/batch/BatchWithTM.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -1,7 +1,6 @@
package org.jboss.starobrno.api.batch;
import org.jboss.cache.CacheFactory;
-import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.transaction.DummyTransactionManagerLookup;
import org.jboss.starobrno.Cache;
import org.jboss.starobrno.config.Configuration;
@@ -9,6 +8,7 @@
import org.testng.annotations.Test;
import javax.transaction.TransactionManager;
+import org.jboss.starobrno.UnitTestCacheFactory;
@Test(groups = {"functional", "transaction"})
@@ -113,7 +113,7 @@
private Cache<String, String> createCache()
{
- CacheFactory<String, String> cf = new DefaultCacheFactory<String, String>();
+ CacheFactory<String, String> cf = new UnitTestCacheFactory<String, String>();
Configuration c = new Configuration();
c.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
c.setInvocationBatchingEnabled(true);
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/batch/BatchWithoutTM.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/batch/BatchWithoutTM.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/batch/BatchWithoutTM.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -1,8 +1,8 @@
package org.jboss.starobrno.api.batch;
import org.jboss.cache.CacheFactory;
-import org.jboss.cache.DefaultCacheFactory;
import org.jboss.starobrno.Cache;
+import org.jboss.starobrno.UnitTestCacheFactory;
import org.jboss.starobrno.config.Configuration;
import org.jboss.starobrno.config.ConfigurationException;
import org.jboss.starobrno.util.TestingUtil;
@@ -136,7 +136,7 @@
private Cache<String, String> createCache(boolean enableBatch)
{
- CacheFactory<String, String> cf = new DefaultCacheFactory<String, String>();
+ CacheFactory<String, String> cf = new UnitTestCacheFactory<String, String>();
Configuration c = new Configuration();
c.setInvocationBatchingEnabled(enableBatch);
return cf.createCache(c);
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/LockTestBase.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/LockTestBase.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/LockTestBase.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -2,7 +2,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.lock.IsolationLevel;
import org.jboss.cache.transaction.DummyTransactionManagerLookup;
import org.jboss.starobrno.Cache;
@@ -18,6 +17,7 @@
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
import java.util.Collections;
+import org.jboss.starobrno.UnitTestCacheFactory;
/**
* @author Manik Surtani (<a href="mailto:manik@jboss.org">manik(a)jboss.org</a>)
@@ -26,54 +26,69 @@
@Test(groups = {"functional", "mvcc"})
public abstract class LockTestBase
{
- protected Cache<String, String> cache;
- protected TransactionManager tm;
- protected LockManager lockManager;
- protected InvocationContextContainer icc;
protected boolean repeatableRead = true;
protected boolean lockParentForChildInsertRemove = false;
private Log log = LogFactory.getLog(LockTestBase.class);
+
+ protected class LockTestBaseTL {
+ public Cache<String, String> cache;
+ public TransactionManager tm;
+ public LockManager lockManager;
+ public InvocationContextContainer icc;
+ }
+
+ protected ThreadLocal<LockTestBaseTL> threadLocal = new ThreadLocal<LockTestBaseTL>();
@BeforeMethod
public void setUp()
{
- cache = new DefaultCacheFactory<String, String>().createCache(new Configuration(), false);
- cache.getConfiguration().setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
- cache.getConfiguration().setIsolationLevel(repeatableRead ? IsolationLevel.REPEATABLE_READ : IsolationLevel.READ_COMMITTED);
- cache.getConfiguration().setLockParentForChildInsertRemove(lockParentForChildInsertRemove);
+ LockTestBaseTL tl = new LockTestBaseTL();
+ tl.cache = new UnitTestCacheFactory<String, String>().createCache(new Configuration(), false);
+ tl.cache.getConfiguration().setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
+ tl.cache.getConfiguration().setIsolationLevel(repeatableRead ? IsolationLevel.REPEATABLE_READ : IsolationLevel.READ_COMMITTED);
+ tl.cache.getConfiguration().setLockParentForChildInsertRemove(lockParentForChildInsertRemove);
// reduce lock acquisition timeout so this doesn't take forever to run
- cache.getConfiguration().setLockAcquisitionTimeout(200); // 200 ms
- cache.start();
- lockManager = TestingUtil.extractComponentRegistry(cache).getComponent(LockManager.class);
- icc = TestingUtil.extractComponentRegistry(cache).getComponent(InvocationContextContainer.class);
- tm = TestingUtil.extractComponentRegistry(cache).getComponent(TransactionManager.class);
+ tl.cache.getConfiguration().setLockAcquisitionTimeout(200); // 200 ms
+ tl.cache.start();
+ tl.lockManager = TestingUtil.extractComponentRegistry(tl.cache).getComponent(LockManager.class);
+ tl.icc = TestingUtil.extractComponentRegistry(tl.cache).getComponent(InvocationContextContainer.class);
+ tl.tm = TestingUtil.extractComponentRegistry(tl.cache).getComponent(TransactionManager.class);
+ threadLocal.set(tl);
}
@AfterMethod
public void tearDown()
{
+ LockTestBaseTL tl = threadLocal.get();
log.debug("**** - STARTING TEARDOWN - ****");
- TestingUtil.killCaches(cache);
+ TestingUtil.killCaches(tl.cache);
+ threadLocal.set(null);
}
protected void assertLocked(Object key)
{
- LockAssert.assertLocked(key, lockManager, icc);
+ LockTestBaseTL tl = threadLocal.get();
+ LockAssert.assertLocked(key, tl.lockManager, tl.icc);
}
protected void assertNotLocked(Object key)
{
- LockAssert.assertNotLocked(key, icc);
+ LockTestBaseTL tl = threadLocal.get();
+ LockAssert.assertNotLocked(key, tl.icc);
}
protected void assertNoLocks()
{
- LockAssert.assertNoLocks(lockManager, icc);
+ LockTestBaseTL tl = threadLocal.get();
+ LockAssert.assertNoLocks(tl.lockManager, tl.icc);
}
public void testLocksOnPutKeyVal() throws Exception
{
+ LockTestBaseTL tl = threadLocal.get();
+ Cache<String, String> cache = tl.cache;
+ TransactionManager tm = tl.tm;
tm.begin();
cache.put("k", "v");
assertLocked("k");
@@ -98,6 +113,9 @@
public void testLocksOnPutData() throws Exception
{
+ LockTestBaseTL tl = threadLocal.get();
+ Cache<String, String> cache = tl.cache;
+ TransactionManager tm = tl.tm;
tm.begin();
cache.putAll(Collections.singletonMap("k", "v"));
assertLocked("k");
@@ -116,6 +134,9 @@
public void testLocksOnEvictNode() throws Exception
{
+ LockTestBaseTL tl = threadLocal.get();
+ Cache<String, String> cache = tl.cache;
+ TransactionManager tm = tl.tm;
// init some data on a node
cache.putAll(Collections.singletonMap("k", "v"));
@@ -131,6 +152,9 @@
public void testLocksOnRemoveNonexistentNode() throws Exception
{
+ LockTestBaseTL tl = threadLocal.get();
+ Cache<String, String> cache = tl.cache;
+ TransactionManager tm = tl.tm;
assert !cache.containsKey("k") : "Should not exist";
tm.begin();
@@ -143,6 +167,9 @@
public void testLocksOnEvictNonexistentNode() throws Exception
{
+ LockTestBaseTL tl = threadLocal.get();
+ Cache<String, String> cache = tl.cache;
+ TransactionManager tm = tl.tm;
assert !cache.containsKey("k") : "Should not exist";
tm.begin();
@@ -155,6 +182,9 @@
public void testLocksOnRemoveData() throws Exception
{
+ LockTestBaseTL tl = threadLocal.get();
+ Cache<String, String> cache = tl.cache;
+ TransactionManager tm = tl.tm;
// init some data on a node
cache.put("k", "v");
cache.put("k2", "v2");
@@ -175,6 +205,9 @@
public void testWriteDoesntBlockRead() throws Exception
{
+ LockTestBaseTL tl = threadLocal.get();
+ Cache<String, String> cache = tl.cache;
+ TransactionManager tm = tl.tm;
cache.put("k", "v");
// start a write.
@@ -206,6 +239,9 @@
public void testWriteDoesntBlockReadNonexistent() throws Exception
{
+ LockTestBaseTL tl = threadLocal.get();
+ Cache<String, String> cache = tl.cache;
+ TransactionManager tm = tl.tm;
// start a write.
tm.begin();
cache.put("k", "v");
@@ -238,6 +274,9 @@
public void testConcurrentWriters() throws Exception
{
+ LockTestBaseTL tl = threadLocal.get();
+ Cache<String, String> cache = tl.cache;
+ TransactionManager tm = tl.tm;
tm.begin();
cache.put("k", "v");
Transaction t1 = tm.suspend();
@@ -260,6 +299,9 @@
public void testRollbacks() throws Exception
{
+ LockTestBaseTL tl = threadLocal.get();
+ Cache<String, String> cache = tl.cache;
+ TransactionManager tm = tl.tm;
cache.put("k", "v");
tm.begin();
assert "v".equals(cache.get("k"));
@@ -281,6 +323,9 @@
public void testRollbacksOnNullNode() throws Exception
{
+ LockTestBaseTL tl = threadLocal.get();
+ Cache<String, String> cache = tl.cache;
+ TransactionManager tm = tl.tm;
tm.begin();
assert null == cache.get("k");
Transaction reader = tm.suspend();
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/repeatable_read/RepeatableReadLockTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/repeatable_read/RepeatableReadLockTest.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/repeatable_read/RepeatableReadLockTest.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -4,6 +4,8 @@
import org.testng.annotations.Test;
import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
+import org.jboss.starobrno.Cache;
@Test(groups = {"functional", "mvcc"})
public class RepeatableReadLockTest extends LockTestBase
@@ -15,6 +17,9 @@
public void testRepeatableReadWithRemove() throws Exception
{
+ LockTestBaseTL tl = threadLocal.get();
+ Cache<String, String> cache = tl.cache;
+ TransactionManager tm = tl.tm;
cache.put("k", "v");
tm.begin();
@@ -39,6 +44,10 @@
public void testRepeatableReadWithEvict() throws Exception
{
+ LockTestBaseTL tl = threadLocal.get();
+ Cache<String, String> cache = tl.cache;
+ TransactionManager tm = tl.tm;
+
cache.put("k", "v");
tm.begin();
@@ -63,6 +72,10 @@
public void testRepeatableReadWithNull() throws Exception
{
+ LockTestBaseTL tl = threadLocal.get();
+ Cache<String, String> cache = tl.cache;
+ TransactionManager tm = tl.tm;
+
assert cache.get("k") == null;
tm.begin();
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/repeatable_read/WriteSkewTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/repeatable_read/WriteSkewTest.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/repeatable_read/WriteSkewTest.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -1,6 +1,5 @@
package org.jboss.starobrno.api.mvcc.repeatable_read;
-import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.lock.IsolationLevel;
import org.jboss.cache.transaction.DummyTransactionManagerLookup;
import org.jboss.starobrno.Cache;
@@ -19,8 +18,9 @@
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.CountDownLatch;
+import org.jboss.starobrno.UnitTestCacheFactory;
-@Test(groups = {"functional", "mvcc"})
+@Test(groups = {"functional", "mvcc"}, sequential = true)
public class WriteSkewTest
{
protected Cache<String, String> cache;
@@ -32,7 +32,7 @@
@BeforeMethod
public void setUp()
{
- cache = new DefaultCacheFactory<String, String>().createCache(new Configuration(), false);
+ cache = new UnitTestCacheFactory<String, String>().createCache(new Configuration(), false);
cache.getConfiguration().setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
cache.getConfiguration().setIsolationLevel(repeatableRead ? IsolationLevel.REPEATABLE_READ : IsolationLevel.READ_COMMITTED);
// reduce lock acquisition timeout so this doesn't take forever to run
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/notifications/AsyncNotificationTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/notifications/AsyncNotificationTest.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/notifications/AsyncNotificationTest.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -1,6 +1,5 @@
package org.jboss.starobrno.notifications;
-import org.jboss.cache.DefaultCacheFactory;
import org.jboss.starobrno.Cache;
import org.jboss.starobrno.notifications.annotation.CacheEntryCreated;
import org.jboss.starobrno.notifications.annotation.CacheListener;
@@ -10,6 +9,7 @@
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
+import org.jboss.starobrno.UnitTestCacheFactory;
@Test(groups = "functional")
public class AsyncNotificationTest
@@ -19,7 +19,7 @@
Cache<String, String> c = null;
try
{
- c = new DefaultCacheFactory<String, String>().createCache();
+ c = new UnitTestCacheFactory<String, String>().createCache();
CountDownLatch latch = new CountDownLatch(2);
AbstractListener syncListener = new Listener(latch);
AbstractListener asyncListener = new AsyncListener(latch);
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/notifications/CacheListenerTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/notifications/CacheListenerTest.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/notifications/CacheListenerTest.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -1,6 +1,5 @@
package org.jboss.starobrno.notifications;
-import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.lock.IsolationLevel;
import org.jboss.starobrno.Cache;
import org.jboss.starobrno.config.Configuration;
@@ -21,6 +20,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.jboss.starobrno.UnitTestCacheFactory;
/**
* Note that this is significantly different from the old <b>TreeCacheListenerTest</b> of the JBoss Cache 1.x series, and
@@ -28,7 +28,7 @@
*
* @since 2.0.0
*/
-@Test(groups = "functional")
+@Test(groups = "functional", sequential = true)
public class CacheListenerTest
{
private Cache<Object, Object> cache;
@@ -43,7 +43,7 @@
c.setCacheMode(Configuration.CacheMode.LOCAL);
c.setIsolationLevel(IsolationLevel.REPEATABLE_READ);
c.setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
- cache = new DefaultCacheFactory<Object, Object>().createCache(c);
+ cache = new UnitTestCacheFactory<Object, Object>().createCache(c);
tm = cache.getConfiguration().getRuntimeConfig().getTransactionManager();
eventLog.events.clear();
cache.addCacheListener(eventLog);
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/notifications/ConcurrentNotificationTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/notifications/ConcurrentNotificationTest.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/notifications/ConcurrentNotificationTest.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -3,7 +3,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.CacheFactory;
-import org.jboss.cache.DefaultCacheFactory;
import org.jboss.starobrno.Cache;
import org.jboss.starobrno.notifications.annotation.CacheEntryCreated;
import org.jboss.starobrno.notifications.annotation.CacheEntryModified;
@@ -19,6 +18,7 @@
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicInteger;
+import org.jboss.starobrno.UnitTestCacheFactory;
/**
* @author <a href="mailto:manik@jboss.org">Manik Surtani</a>
@@ -34,7 +34,7 @@
@BeforeMethod(alwaysRun = true)
public void setUp()
{
- CacheFactory<String, String> instance = new DefaultCacheFactory<String, String>();
+ CacheFactory<String, String> instance = new UnitTestCacheFactory<String, String>();
cache = instance.createCache();
listener = new Listener();
cache.addCacheListener(listener);
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/notifications/NotifierAnnotationsTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/notifications/NotifierAnnotationsTest.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/notifications/NotifierAnnotationsTest.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -25,25 +25,29 @@
@Test(groups = {"functional"})
public class NotifierAnnotationsTest
{
- private NotifierImpl n;
+ private ThreadLocal<NotifierImpl> nTL = new ThreadLocal<NotifierImpl>();
@BeforeMethod(alwaysRun = true)
public void setUp()
{
- n = new NotifierImpl();
+ NotifierImpl n = new NotifierImpl();
n.injectDependencies(createNiceMock(CacheSPI.class), new Configuration());
n.start();
+ nTL.set(n);
}
@AfterMethod
public void tearDown()
{
+ NotifierImpl n = nTL.get();
n.stop();
n.destroy();
+ nTL.set(null);
}
public void testControl()
{
+ NotifierImpl n = nTL.get();
Object l = new TestControlListener();
n.addCacheListener(l);
assertEquals(1, n.getCacheListeners().size());
@@ -51,6 +55,7 @@
public void testCacheListenerNoMethods()
{
+ NotifierImpl n = nTL.get();
Object l = new TestCacheListenerNoMethodsListener();
n.addCacheListener(l);
assertEquals("Hello", l.toString());
@@ -59,6 +64,7 @@
public void testNonAnnotatedListener()
{
+ NotifierImpl n = nTL.get();
Object l = new TestNonAnnotatedListener();
try
{
@@ -74,6 +80,7 @@
public void testNonPublicListener()
{
+ NotifierImpl n = nTL.get();
Object l = new TestNonPublicListener();
try
{
@@ -89,6 +96,7 @@
public void testNonPublicListenerMethod()
{
+ NotifierImpl n = nTL.get();
Object l = new TestNonPublicListenerMethodListener();
n.addCacheListener(l);
@@ -99,6 +107,7 @@
public void testNonVoidReturnTypeMethod()
{
+ NotifierImpl n = nTL.get();
Object l = new TestNonVoidReturnTypeMethodListener();
try
{
@@ -114,6 +123,7 @@
public void testIncorrectMethodSignature1()
{
+ NotifierImpl n = nTL.get();
Object l = new TestIncorrectMethodSignature1Listener();
try
{
@@ -129,6 +139,7 @@
public void testIncorrectMethodSignature2()
{
+ NotifierImpl n = nTL.get();
Object l = new TestIncorrectMethodSignature2Listener();
try
{
@@ -144,6 +155,7 @@
public void testIncorrectMethodSignature3()
{
+ NotifierImpl n = nTL.get();
Object l = new TestIncorrectMethodSignature3Listener();
try
{
@@ -159,6 +171,7 @@
public void testUnassignableMethodSignature()
{
+ NotifierImpl n = nTL.get();
Object l = new TestUnassignableMethodSignatureListener();
try
{
@@ -174,6 +187,7 @@
public void testPartlyUnassignableMethodSignature()
{
+ NotifierImpl n = nTL.get();
Object l = new TestPartlyUnassignableMethodSignatureListener();
try
{
@@ -188,6 +202,7 @@
public void testMultipleMethods()
{
+ NotifierImpl n = nTL.get();
Object l = new TestMultipleMethodsListener();
n.addCacheListener(l);
List invocations = n.cacheStartedListeners;
@@ -199,6 +214,7 @@
public void testMultipleAnnotationsOneMethod()
{
+ NotifierImpl n = nTL.get();
Object l = new TestMultipleAnnotationsOneMethodListener();
n.addCacheListener(l);
List invocations = n.cacheStartedListeners;
@@ -210,6 +226,7 @@
public void testMultipleMethodsOneAnnotation()
{
+ NotifierImpl n = nTL.get();
Object l = new TestMultipleMethodsOneAnnotationListener();
n.addCacheListener(l);
List invocations = n.cacheStartedListeners;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/notifications/NotifierTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/notifications/NotifierTest.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/notifications/NotifierTest.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -25,34 +25,47 @@
@Test(groups = "unit")
public class NotifierTest
{
- private NotifierImpl notifier;
- private InvocationContext ctx;
- private AllEventsListener allEventsListener;
- private Fqn fqn = Fqn.fromString("/a/b/c");
+
+ private static final Fqn fqn = Fqn.fromString("/a/b/c");
+ private class NotifierTestTL {
+ private NotifierImpl notifier;
+ private InvocationContext ctx;
+ private AllEventsListener allEventsListener;
+ }
+ private ThreadLocal<NotifierTestTL> threadLocal = new ThreadLocal<NotifierTestTL>();
@BeforeMethod
public void setUp()
{
- notifier = new NotifierImpl();
+ NotifierTestTL tl = new NotifierTestTL();
+ threadLocal.set(tl);
+ tl.notifier = new NotifierImpl();
CacheSPI cacheSPI = createNiceMock(CacheSPI.class);
expect(cacheSPI.getInvocationContext()).andStubReturn(new InvocationContextImpl());
replay(cacheSPI);
- notifier.injectDependencies(cacheSPI, new Configuration());
- notifier.start();
- ctx = new InvocationContextImpl();
- allEventsListener = new AllEventsListener();
- notifier.addCacheListener(allEventsListener);
+ tl.notifier.injectDependencies(cacheSPI, new Configuration());
+ tl.notifier.start();
+ tl.ctx = new InvocationContextImpl();
+ tl.allEventsListener = new AllEventsListener();
+ tl.notifier.addCacheListener(tl.allEventsListener);
}
@AfterMethod
public void tearDown()
{
- notifier.stop();
- notifier.destroy();
+ NotifierTestTL tl = threadLocal.get();
+ tl.notifier.stop();
+ tl.notifier.destroy();
+ threadLocal.set(null);
}
public void testNotifyNodeCreated()
{
+ NotifierTestTL tl = threadLocal.get();
+ NotifierImpl notifier = tl.notifier;
+ InvocationContext ctx = tl.ctx;
+ AllEventsListener allEventsListener = tl.allEventsListener;
+
assert allEventsListener.nodeCreatedEvent == null;
notifier.notifyCacheEntryCreated("K", true, ctx);
assert allEventsListener.nodeCreatedEvent != null;
@@ -62,6 +75,9 @@
public void testShouldNotifyOnNodeModified()
{
+ NotifierTestTL tl = threadLocal.get();
+ NotifierImpl notifier = tl.notifier;
+
assert notifier.shouldNotifyOnNodeModified();
notifier.destroy();
assert !notifier.shouldNotifyOnNodeModified();
@@ -69,6 +85,11 @@
public void testNotifyNodeModified()
{
+ NotifierTestTL tl = threadLocal.get();
+ NotifierImpl notifier = tl.notifier;
+ InvocationContext ctx = tl.ctx;
+ AllEventsListener allEventsListener = tl.allEventsListener;
+
assert allEventsListener.nodeModifiedEvent == null;
notifier.notifyCacheEntryModified("key", true, ctx);
assert allEventsListener.nodeModifiedEvent != null;
@@ -77,6 +98,11 @@
public void testNotifyNodeRemoved()
{
+ NotifierTestTL tl = threadLocal.get();
+ NotifierImpl notifier = tl.notifier;
+ InvocationContext ctx = tl.ctx;
+ AllEventsListener allEventsListener = tl.allEventsListener;
+
assert allEventsListener.nodeRemoveEvent == null;
notifier.notifyCacheEntryRemoved("key", true, ctx);
assert allEventsListener.nodeRemoveEvent != null;
@@ -86,6 +112,11 @@
public void testNotifyNodeVisited()
{
+ NotifierTestTL tl = threadLocal.get();
+ NotifierImpl notifier = tl.notifier;
+ InvocationContext ctx = tl.ctx;
+ AllEventsListener allEventsListener = tl.allEventsListener;
+
assert allEventsListener.nodeVisistedEvent == null;
notifier.notifyCacheEntryVisited(fqn, true, ctx);
assert allEventsListener.nodeVisistedEvent != null;
@@ -94,6 +125,11 @@
public void testNotifyNodeEvicted()
{
+ NotifierTestTL tl = threadLocal.get();
+ NotifierImpl notifier = tl.notifier;
+ InvocationContext ctx = tl.ctx;
+ AllEventsListener allEventsListener = tl.allEventsListener;
+
assert allEventsListener.nodeEvictedEvent == null;
notifier.notifyCacheEntryEvicted("key", true, ctx);
assert allEventsListener.nodeEvictedEvent != null;
@@ -103,6 +139,11 @@
public void testNotifyNodeLoaded()
{
+ NotifierTestTL tl = threadLocal.get();
+ NotifierImpl notifier = tl.notifier;
+ InvocationContext ctx = tl.ctx;
+ AllEventsListener allEventsListener = tl.allEventsListener;
+
assert allEventsListener.nodeLoadedEvent == null;
notifier.notifyCacheEntryLoaded("key", true, ctx);
assert allEventsListener.nodeLoadedEvent != null;
@@ -112,6 +153,11 @@
public void testNotifyNodeActivated()
{
+ NotifierTestTL tl = threadLocal.get();
+ NotifierImpl notifier = tl.notifier;
+ InvocationContext ctx = tl.ctx;
+ AllEventsListener allEventsListener = tl.allEventsListener;
+
assert allEventsListener.nodeActivatedEvent == null;
notifier.notifyCacheEntryActivated("key", true, ctx);
assert allEventsListener.nodeActivatedEvent != null;
@@ -121,6 +167,11 @@
public void testNotifyNodePassivated()
{
+ NotifierTestTL tl = threadLocal.get();
+ NotifierImpl notifier = tl.notifier;
+ InvocationContext ctx = tl.ctx;
+ AllEventsListener allEventsListener = tl.allEventsListener;
+
assert allEventsListener.nodePassivatedEvent == null;
notifier.notifyCacheEntryPassivated("key", true, ctx);
assert allEventsListener.nodePassivatedEvent != null;
@@ -130,6 +181,11 @@
public void testNotifyCacheStarted()
{
+ NotifierTestTL tl = threadLocal.get();
+ NotifierImpl notifier = tl.notifier;
+ InvocationContext ctx = tl.ctx;
+ AllEventsListener allEventsListener = tl.allEventsListener;
+
assert allEventsListener.cacheStartedEvent == null;
notifier.notifyCacheStarted();
assert allEventsListener.cacheStartedEvent != null;
@@ -138,6 +194,11 @@
public void testNotifyCacheStopped()
{
+ NotifierTestTL tl = threadLocal.get();
+ NotifierImpl notifier = tl.notifier;
+ InvocationContext ctx = tl.ctx;
+ AllEventsListener allEventsListener = tl.allEventsListener;
+
assert allEventsListener.cacheStoppedEvent == null;
notifier.notifyCacheStopped();
assert allEventsListener.cacheStoppedEvent != null;
@@ -146,6 +207,11 @@
public void testNotifyViewChange()
{
+ NotifierTestTL tl = threadLocal.get();
+ NotifierImpl notifier = tl.notifier;
+ InvocationContext ctx = tl.ctx;
+ AllEventsListener allEventsListener = tl.allEventsListener;
+
assert allEventsListener.viewChanged == null;
View view = new View();
notifier.notifyViewChange(view, ctx);
@@ -156,6 +222,10 @@
public void testNotifyBuddyGroupChange()
{
+ NotifierTestTL tl = threadLocal.get();
+ NotifierImpl notifier = tl.notifier;
+ AllEventsListener allEventsListener = tl.allEventsListener;
+
assert allEventsListener.buddyGroupChangedEvent == null;
BuddyGroup buddyGroup = new BuddyGroup();
notifier.notifyBuddyGroupChange(buddyGroup, true);
@@ -166,6 +236,11 @@
public void testNotifyTransactionCompleted()
{
+ NotifierTestTL tl = threadLocal.get();
+ NotifierImpl notifier = tl.notifier;
+ InvocationContext ctx = tl.ctx;
+ AllEventsListener allEventsListener = tl.allEventsListener;
+
assert allEventsListener.transactionCompleted == null;
Transaction tx = createNiceMock(Transaction.class);
notifier.notifyTransactionCompleted(tx, false, ctx);
@@ -177,6 +252,11 @@
public void testNotifyTransactionRegistered()
{
+ NotifierTestTL tl = threadLocal.get();
+ NotifierImpl notifier = tl.notifier;
+ InvocationContext ctx = tl.ctx;
+ AllEventsListener allEventsListener = tl.allEventsListener;
+
assert allEventsListener.transactionRegistered == null;
Transaction tx = createNiceMock(Transaction.class);
notifier.notifyTransactionRegistered(tx, ctx);
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/notifications/NotifyNodeInvalidatedTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/notifications/NotifyNodeInvalidatedTest.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/notifications/NotifyNodeInvalidatedTest.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -1,6 +1,5 @@
package org.jboss.starobrno.notifications;
-import org.jboss.cache.DefaultCacheFactory;
import org.jboss.starobrno.Cache;
import org.jboss.starobrno.config.Configuration;
import org.jboss.starobrno.config.Configuration.CacheMode;
@@ -11,6 +10,7 @@
import java.util.ArrayList;
import java.util.List;
+import org.jboss.starobrno.UnitTestCacheFactory;
@Test(groups = "functional")
public class NotifyNodeInvalidatedTest
@@ -22,8 +22,8 @@
{
Configuration cfg = new Configuration();
cfg.setCacheMode(CacheMode.INVALIDATION_SYNC);
- c1 = new DefaultCacheFactory<String, String>().createCache(cfg.clone());
- c2 = new DefaultCacheFactory<String, String>().createCache(cfg.clone());
+ c1 = new UnitTestCacheFactory<String, String>().createCache(cfg.clone());
+ c2 = new UnitTestCacheFactory<String, String>().createCache(cfg.clone());
EventLog eventLog = new EventLog();
c2.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
c2.put("k", "y");
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/profiling/AbstractProfileTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/profiling/AbstractProfileTest.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/profiling/AbstractProfileTest.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -1,6 +1,5 @@
package org.jboss.starobrno.profiling;
-import org.jboss.cache.DefaultCacheFactory;
import org.jboss.starobrno.Cache;
import org.jboss.starobrno.config.Configuration;
import org.jboss.starobrno.util.TestingUtil;
@@ -9,6 +8,7 @@
import org.testng.annotations.Test;
import java.util.Map;
+import org.jboss.starobrno.UnitTestCacheFactory;
@Test(groups = "profiling")
public abstract class AbstractProfileTest
@@ -19,7 +19,7 @@
public void setUp()
{
Configuration cfg = new Configuration();
- cache = new DefaultCacheFactory().createCache(cfg, false);
+ cache = new UnitTestCacheFactory().createCache(cfg, false);
}
@AfterTest
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/profiling/MemConsumptionTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/profiling/MemConsumptionTest.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/profiling/MemConsumptionTest.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -19,9 +19,8 @@
* 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.profiling;
+package org.jboss.starobrno.profiling;
-import org.jboss.cache.DefaultCacheFactory;
import org.jboss.starobrno.Cache;
import org.jboss.starobrno.util.TestingUtil;
import org.testng.annotations.Test;
@@ -31,15 +30,16 @@
import java.util.Arrays;
import java.util.Random;
import java.util.concurrent.TimeUnit;
+import org.jboss.starobrno.UnitTestCacheFactory;
@Test(groups = "profiling")
public class MemConsumptionTest
{
// adjust the next 3 numbers
- int numEntries = 1000000;
- int payloadSize = 20; // bytes
- int keySize = 10; // bytes
- int bytesPerChar = 2;
+ static final int numEntries = 1000000;
+ static final int payloadSize = 20; // bytes
+ static final int keySize = 10; // bytes
+ static final int bytesPerChar = 2;
Random r = new Random();
@@ -49,7 +49,7 @@
System.out.println("Bytes to be cached: " + NumberFormat.getIntegerInstance().format(kBytesCached) + " kb");
// Cache<byte[], byte[]> c = new DefaultCacheFactory<byte[], byte[]>().createCache(); // default LOCAL cache
- Cache<String, String> c = new DefaultCacheFactory<String, String>().createCache(); // default LOCAL cache
+ Cache<String, String> c = new UnitTestCacheFactory<String, String>().createCache(); // default LOCAL cache
// Map<String, String> c = new ConcurrentHashMap<String, String>();
long start = System.nanoTime();
for (int i = 0; i < numEntries; i++)
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/profiling/ProfileTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/profiling/ProfileTest.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/profiling/ProfileTest.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -30,7 +30,7 @@
* @author Manik Surtani (<a href="mailto:manik@jboss.org">manik(a)jboss.org</a>)
* @since 2.1.0
*/
-@Test(groups = "profiling")
+@Test(groups = "profiling", sequential = true)
public class ProfileTest extends AbstractProfileTest
{
/*
@@ -208,7 +208,7 @@
double nOps = (double) (NUM_OPERATIONS / 3);
double avg = ((double) totalNanos) / nOps;
double avgMicros = avg / 1000;
- return avgMicros + " �s";
+ return avgMicros + " �s";
}
private double toMillis(long nanos)
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/replication/AsyncReplTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/replication/AsyncReplTest.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/replication/AsyncReplTest.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -8,7 +8,6 @@
package org.jboss.starobrno.replication;
-import org.jboss.cache.Fqn;
import org.jboss.cache.transaction.DummyTransactionManagerLookup;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
@@ -18,6 +17,7 @@
import javax.transaction.TransactionManager;
import org.jboss.starobrno.CacheSPI;
import org.jboss.starobrno.Cache;
+import org.jboss.starobrno.UnitTestCacheManager;
import org.jboss.starobrno.manager.CacheManager;
import org.jboss.starobrno.config.Configuration;
import org.jboss.starobrno.util.internals.ReplicationListener;
@@ -30,9 +30,9 @@
@Test(groups = {"functional", "jgroups"})
public class AsyncReplTest
{
- private Configuration configuration;
private class AsyncReplTestTL {
+ private Configuration configuration;
private CacheSPI<Object, Object> cache1, cache2;
private CacheManager cacheManager1, cacheManager2;
private ReplicationListener replListener1, replListener2;
@@ -46,17 +46,17 @@
AsyncReplTestTL tl = new AsyncReplTestTL();
threadLocal.set(tl);
- configuration = new Configuration();
- configuration.setCacheMode(Configuration.CacheMode.REPL_ASYNC);
- configuration.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
+ tl.configuration = new Configuration();
+ tl.configuration.setCacheMode(Configuration.CacheMode.REPL_ASYNC);
+ tl.configuration.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
log("creating cache1");
- tl.cacheManager1 = new CacheManager(configuration);
+ tl.cacheManager1 = new UnitTestCacheManager(tl.configuration);
tl.cache1 = (CacheSPI) tl.cacheManager1.createCache("testCache");
tl.replListener1 = new ReplicationListener(tl.cache1);
log("creating cache2");
- tl.cacheManager2 = new CacheManager(configuration);
+ tl.cacheManager2 = new UnitTestCacheManager(tl.configuration);
tl.cache2 = (CacheSPI) tl.cacheManager2.createCache("testCache");
tl.replListener2 = new ReplicationListener(tl.cache2);
}
@@ -147,9 +147,9 @@
CacheSPI<Object, Object> cache3 = null, cache4 = null;
try
{
- configuration.setClusterName("otherTest");
- cache3 = (CacheSPI<Object, Object>) new CacheManager(configuration).createCache("testCache");
- cache4 = (CacheSPI<Object, Object>) new CacheManager(configuration).createCache("testCache");
+ tl.configuration.setClusterName("otherTest");
+ cache3 = (CacheSPI<Object, Object>) new UnitTestCacheManager(tl.configuration).createCache("testCache");
+ cache4 = (CacheSPI<Object, Object>) new UnitTestCacheManager(tl.configuration).createCache("testCache");
replListener2.expectAny();
cache1.put("age", 38);
// because we use async repl, modfication may not yet have been propagated to cache2, so
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/replication/ExceptionTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/replication/ExceptionTest.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/replication/ExceptionTest.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -1,17 +1,16 @@
package org.jboss.starobrno.replication;
import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.manager.CacheManager;
import org.jboss.starobrno.util.TestingUtil;
import org.jboss.starobrno.lock.TimeoutException;
import org.jboss.starobrno.config.Configuration;
import org.jboss.cache.transaction.DummyTransactionManagerLookup;
+import org.jboss.starobrno.UnitTestCacheManager;
/**
* Tests the type of exceptions thrown for Lock Acquisition Timeouts versus Sync Repl Timeouts
@@ -47,7 +46,7 @@
c.setCacheMode(Configuration.CacheMode.REPL_SYNC);
if (jgroupsConfig != null) c.setClusterConfig(jgroupsConfig);
c.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
- Cache cache = new CacheManager(c).createCache("testCache");
+ Cache cache = new UnitTestCacheManager(c).createCache("testCache");
return cache;
}
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/replication/ReplicationExceptionTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/replication/ReplicationExceptionTest.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/replication/ReplicationExceptionTest.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -13,7 +13,6 @@
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.manager.CacheManager;
import org.jboss.starobrno.config.Configuration;
import org.jboss.starobrno.util.TestingUtil;
import org.jboss.cache.transaction.DummyTransactionManager;
@@ -26,6 +25,7 @@
import javax.transaction.TransactionManager;
import java.io.NotSerializableException;
import java.io.Serializable;
+import org.jboss.starobrno.UnitTestCacheManager;
/**
* Teting of replication exception for a Nonerislizable object
@@ -89,8 +89,8 @@
conf1.setLockAcquisitionTimeout(5000);
conf2.setLockAcquisitionTimeout(5000);
- cache1 = (CacheSPI) new CacheManager(conf1).createCache("testCache");
- cache2 = (CacheSPI) new CacheManager(conf2).createCache("testCache");
+ cache1 = (CacheSPI) new UnitTestCacheManager(conf1).createCache("testCache");
+ cache2 = (CacheSPI) new UnitTestCacheManager(conf2).createCache("testCache");
cache1.start();
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncCacheListenerTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncCacheListenerTest.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncCacheListenerTest.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -15,7 +15,6 @@
import org.jboss.starobrno.CacheException;
import org.jboss.starobrno.CacheSPI;
import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.manager.CacheManager;
import org.jboss.starobrno.notifications.annotation.CacheEntryModified;
import org.jboss.starobrno.notifications.annotation.CacheEntryRemoved;
import org.jboss.starobrno.notifications.annotation.CacheListener;
@@ -30,9 +29,9 @@
import javax.naming.Context;
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
-import java.util.HashMap;
import java.util.Map;
import java.util.Set;
+import org.jboss.starobrno.UnitTestCacheManager;
/**
* Test out the TreeCacheListener
@@ -84,8 +83,8 @@
conf.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
conf.setLockAcquisitionTimeout(5000);
- cache1 = (CacheSPI) new CacheManager(conf).createCache("firstCache");
- cache2 = (CacheSPI) new CacheManager(conf).createCache("firstCache");
+ cache1 = (CacheSPI) new UnitTestCacheManager(conf).createCache("firstCache");
+ cache2 = (CacheSPI) new UnitTestCacheManager(conf).createCache("firstCache");
TestingUtil.blockUntilViewReceived(cache2, 2, 1000);
}
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncReplTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncReplTest.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncReplTest.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -11,8 +11,7 @@
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.manager.CacheManager;
+import org.jboss.starobrno.UnitTestCacheManager;
import org.jboss.starobrno.util.TestingUtil;
import org.jboss.starobrno.config.Configuration;
@@ -31,8 +30,8 @@
Cache<Object, Object>[] caches = new Cache[2];
Configuration configuration = new Configuration();
configuration.setCacheMode(Configuration.CacheMode.REPL_SYNC);
- caches[0] = new CacheManager(configuration).createCache("test");
- caches[1] = new CacheManager(configuration).createCache("test");
+ caches[0] = new UnitTestCacheManager(configuration).createCache("test");
+ caches[1] = new UnitTestCacheManager(configuration).createCache("test");
cachesTL.set(caches);
TestingUtil.blockUntilViewsReceived(caches, 5000);
System.out.println("*** Finished setUp()");
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/tx/LocalModeTxTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/tx/LocalModeTxTest.java 2008-10-17 05:11:03 UTC (rev 6979)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/tx/LocalModeTxTest.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -30,6 +30,7 @@
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
+import org.jboss.starobrno.UnitTestCacheManager;
@Test(groups = "functional")
public class LocalModeTxTest
@@ -38,7 +39,7 @@
{
Configuration cfg = new Configuration();
cfg.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
- CacheManager cm = new CacheManager(cfg);
+ CacheManager cm = new UnitTestCacheManager(cfg);
return (CacheSPI<String, String>) cm.createCache("test");
}
Added: core/branches/flat/src/test/java/org/jboss/starobrno/util/UnitTestTestNGListener.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/util/UnitTestTestNGListener.java (rev 0)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/util/UnitTestTestNGListener.java 2008-10-17 17:17:17 UTC (rev 6980)
@@ -0,0 +1,93 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.jboss.starobrno.util;
+
+import org.testng.IClass;
+import org.testng.ITestContext;
+import org.testng.ITestListener;
+import org.testng.ITestResult;
+
+/**
+ *
+ * @author dpospisi
+ */
+public class UnitTestTestNGListener implements ITestListener {
+
+ /**
+ * Holds test classes actually running in all threads.
+ */
+ private ThreadLocal<IClass> threadTestClass = new ThreadLocal<IClass>();
+
+ private int failed = 0;
+ private int succeded = 0;
+ private int skipped = 0;
+
+ public void onTestStart(ITestResult res) {
+ System.out.println(getThreadId() + " Starting test " + getTestDesc(res));
+
+ /*
+ IClass testClass = threadTestClass.get();
+ if ((testClass != null) && (! res.getTestClass().equals(testClass))) {
+
+ System.out.println(getThreadId() + " New test class" + res.getTestClass() + ", was " + testClass);
+
+ // the thread has started testing a new test class
+
+ // clean all possibly running caches created in current thread
+ boolean cleaned = new UnitTestCacheFactory().cleanUp();
+ if (cleaned) {
+ // previous test left a cache
+ System.out.println(getThreadId() +" WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
+ System.out.println(getThreadId() +" A test method in " + testClass.getName() + " did not clean all cache instances properly.");
+ System.out.println(getThreadId() +" Use UnitTestCacheFactory.cleanUp() or TestngUtil.killCaches(...) ");
+ System.out.println(getThreadId() +" WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
+ }
+ }
+ */
+
+ threadTestClass.set(res.getTestClass());
+ }
+
+ synchronized public void onTestSuccess(ITestResult arg0) {
+ System.out.println(getThreadId() + " Test " + getTestDesc(arg0) + " succeded.");
+ succeded++;
+ printStatus();
+ }
+
+ synchronized public void onTestFailure(ITestResult arg0) {
+ System.out.println(getThreadId() + " Test " + getTestDesc(arg0) + " failed.");
+ failed++;
+ printStatus();
+ }
+
+ synchronized public void onTestSkipped(ITestResult arg0) {
+ System.out.println(getThreadId() + " Test " + getTestDesc(arg0) + " skipped.");
+ skipped++;
+ printStatus();
+ }
+
+ public void onTestFailedButWithinSuccessPercentage(ITestResult arg0) {
+ }
+
+ public void onStart(ITestContext arg0) {
+ }
+
+ public void onFinish(ITestContext arg0) {
+ }
+
+ private String getThreadId() {
+ return "["+ Thread.currentThread().getName() + "]";
+ }
+
+ private String getTestDesc(ITestResult res) {
+ return res.getMethod().getMethodName() + "(" + res.getTestClass().getName() + ")";
+ }
+
+ private void printStatus() {
+ System.out.println("Testsuite execution progress: tests succeded " + succeded + ", failed " + failed + ", skipped " + skipped + ".");
+ }
+
+}
16 years
JBoss Cache SVN: r6979 - enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR.
by jbosscache-commits@lists.jboss.org
Author: ldelima(a)redhat.com
Date: 2008-10-17 01:11:03 -0400 (Fri, 17 Oct 2008)
New Revision: 6979
Modified:
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Api.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Architecture.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Configuration.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Instrumentation.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Troubleshooting.po
Log:
proofreading ongoing
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Api.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Api.po 2008-10-17 05:02:31 UTC (rev 6978)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Api.po 2008-10-17 05:11:03 UTC (rev 6979)
@@ -9,7 +9,7 @@
"Project-Id-Version: Api\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:57+0000\n"
-"PO-Revision-Date: 2008-10-09 14:12+1000\n"
+"PO-Revision-Date: 2008-10-17 14:00+1000\n"
"Last-Translator: Leticia de Lima <ldelima(a)redhat.com>\n"
"Language-Team: Brazilian Portuguese <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -85,7 +85,7 @@
"instrumented or implement the <literal>Serializable</literal> interface. An "
"object is instrumented by JBossAop if declared either from an xml file or "
"from annotation. More details on this will come later."
-msgstr "A solicitação para o <literal>pojo</literal> é que isto deve ter sido instruído ou deve implementar aa interface <literal>Serializable</literal>. Um objeto é instrumentado pelo JBossAop, caso declarado tanto a partir de um arquivo xml ou a partir de outra anotação. Você poderá encontrar mais detalhes sobre este assunto mais adiante."
+msgstr "A solicitação para o <literal>pojo</literal> é que isto deve ter sido instruído ou deve implementar a interface <literal>Serializable</literal>. Um objeto é instrumentado pelo JBossAop, caso declarado tanto a partir de um arquivo xml ou a partir de outra anotação. Você poderá encontrar mais detalhes sobre este assunto mais adiante."
#. Tag: para
#: Api.xml:17
@@ -109,7 +109,7 @@
"this POJO has been referenced multiple times, e.g., referenced from other "
"POJO or circular reference, this Api will handle the appropriate reference "
"counting."
-msgstr "Caso o <literal>pojo</literal> possui sub-objetos, por exemplo: ele possui campos que não são um tipo primitivo, esta chamada trará problema ao <literal>putObject</literal> repetitivamente até que todos os objetos tree sejam partilhados (mapeando pela acessibilidade). Além disso, caso você adicione o <literal>pojo</literal> diversas vezes, ele simplesmente retornará a referência do objeto original diretamente. Adicionado a isto, caso o POJO seja referenciado diversas vezes, por exemplo: referenciado a partir de outro POJO ou uma referência circular, este Api manuseará a referência apropriada continuamente."
+msgstr "Caso o <literal>pojo</literal> possuir sub-objetos, por exemplo: ele possua campos que não são um tipo primitivo, esta chamada trará problema ao <literal>putObject</literal> repetitivamente até que todos os objetos tree sejam partilhados (mapeando pela acessibilidade). Além disso, caso você adicione o <literal>pojo</literal> diversas vezes, ele simplesmente retornará a referência do objeto original diretamente. Adicionado a isto, caso o POJO seja referenciado diversas vezes, por exemplo: referenciado a partir de outro POJO ou uma referência circular, este Api manuseará a referência apropriada continuamente."
#. Tag: para
#: Api.xml:23
@@ -169,7 +169,7 @@
"won't get garbage collected by the VM. Note this call will also remove "
"everything stored under <literal>fqn</literal> even if you have put other "
"plain cache data there."
-msgstr "Esta chamada irá desanexar o POJO a partir do gerenciador do cache pela remoção de conteúdos sob fqn e retorno da instância do POJO armazenado (isto será nulo caso ele não existir). Após uma chamada com sucesso, qualquer operação POJO na referência de POJO retornado não é mais interceptado pelo sistema do cache. Basicamente, você usará este Api uma vez que você decida que o POJO sob <literal>fqn</literal> não será mais necessário. Por exemplo: caso um POJO não esteja mais no contexto, você precisará invocar explicitamente este Api, do contrário ele não obeterá o lixo coletado pelo VM. Perceba que esta chamada removerá todo o armazenamento sob <literal>fqn</literal>, mesmo que você tenha adicionado outros dados de cache plano a isto."
+msgstr "Esta chamada irá desanexar o POJO a partir do gerenciador do cache pela remoção de conteúdos sob fqn e retorno da instância do POJO armazenado (isto será nulo caso ele não existir). Após uma chamada com sucesso, qualquer operação POJO na referência de POJO retornado não é mais interceptado pelo sistema do cache. Basicamente, você usará este Api uma vez que você decida que o POJO sob <literal>fqn</literal> não será mais necessário. Por exemplo: caso um POJO não esteja mais no contexto, você precisará invocar explicitamente este Api, do contrário ele não obterá o lixo coletado pelo VM. Perceba que esta chamada removerá todo o armazenamento sob <literal>fqn</literal>, mesmo que você tenha adicionado outros dados de cache plano a isto."
#. Tag: title
#: Api.xml:31
@@ -214,7 +214,7 @@
"the underlying cache store."
msgstr ""
"Esta chamada retornará o conteúdo do objeto atual localizado sob <literal>fqn</"
-"literal>. Esta chamada do método é útil quando você não possuir a exata referência do POJO. Por exemplo: quando você fahar a replicar um nó, você desejará obter a referência do objeto a partir de uma instância de cache replicada. Neste caso, o PojoCache criará um novo objeto Java, caso isto não exista e então adicionar o interceptor do cache de maneira que cada acesso futuro estará no sync com o armazenamento do cache principal."
+"literal>. Esta chamada do método é útil quando você não possuir a exata referência do POJO. Por exemplo: quando você falhar em replicar um nó, você desejará obter a referência do objeto a partir de uma instância de cache replicada. Neste caso, o PojoCache criará um novo objeto Java, caso isto não exista e então adicionará o interceptor do cache de maneira que cada acesso futuro estará no sync com o armazenamento do cache principal."
#. Tag: programlisting
#: Api.xml:36
@@ -263,7 +263,7 @@
"find the POJOs under that base. For example, if you specify the fqn to be "
"root, e.g., <code>\"/\"</code> , then it will return all the managed POJOs "
"under the cache."
-msgstr "Esta chamada retornará todos os POJOs gerenciados sob o cache com o nome Fqn básico. Isto é recursivo, significando que isto partilhará todas as sub-trees para encontrar os POJOs sob aquela basa. Por exemplo: caso você especifique o dqn para ser raiz, por exemplo: <code>\"/\"</code> , isto retornará todos os POJOs gerenciados pelo cache. "
+msgstr "Esta chamada retornará todos os POJOs gerenciados sob o cache com o nome Fqn básico. Isto é recursivo, significando que isto partilhará todas as sub-trees para encontrar os POJOs sob aquela base. Por exemplo: caso você especifique o fqn para ser raiz, por exemplo: <code>\"/\"</code> , isto retornará todos os POJOs gerenciados pelo cache. "
#. Tag: para
#: Api.xml:40
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Architecture.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Architecture.po 2008-10-17 05:02:31 UTC (rev 6978)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Architecture.po 2008-10-17 05:11:03 UTC (rev 6979)
@@ -9,7 +9,7 @@
"Project-Id-Version: Architecture\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:57+0000\n"
-"PO-Revision-Date: 2008-10-17 11:40+1000\n"
+"PO-Revision-Date: 2008-10-17 11:52+1000\n"
"Last-Translator: Leticia de Lima <ldelima(a)redhat.com>\n"
"Language-Team: Brazilian Portuguese <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -700,7 +700,7 @@
"operations."
msgstr ""
"As classes de POJO que herdam do <literal>Set</literal> , <literal>List</"
-"literal> e <literal>Map</literal> são automaticamente tratadas como \"posicionadas\". Isto é, os usuários não precisão tratá-las como \"preparadas\" no arquivo de configuração xml ou através da anotação. Uma vez que nós não somos autorizados a instrumentar a biblioteca de sistema Java, usaremos a abordagem proxy. Quando encontramos qualquer instância de Coleção, iremos <itemizedlist> <listitem> "
+"literal> e <literal>Map</literal> são automaticamente tratadas como \"posicionadas\". Isto é, os usuários não precisão tratá-las como \"preparadas\" no arquivo de configuração xml ou através da anotação. Uma vez que nós não somos autorizados a instrumentar a biblioteca de sistema Java, usaremos a abordagem proxy. Quando encontramos qualquer instância de Coleção, iremos: <itemizedlist> <listitem> "
"<para>Criar a instância do proxy de Coleção e colocá-la no cache (ao invés da referência original). O mapeamento dos elementos de Coleção continuarão rodando repetitivamente conforme esperado.</para> </listitem> <listitem> <para>Caso a instância da Coleção seja um sub-objeto, por exemplo: dentro de outro POJO, limparemos a referência original com o novo proxy para promover o uso com clareza.</para> </listitem> </itemizedlist> Para obter a referência proxy, os usuários podem usar outro <literal>getObject</literal> para recuperar a referência do proxy e usar a referência para desenvolver as operações POJO."
#. Tag: para
@@ -743,7 +743,7 @@
msgid ""
"Here is another snippet to illustrate the dynamic swapping of the Collection "
"reference when it is embedded inside another object:"
-msgstr "Segue abaixo outro trecho que ilustra a alterar a referência da Coleção quando implementado dentro de outro objeto:"
+msgstr "Segue abaixo outro trecho que ilustra a alteração a referência da Coleção quando implementado dentro de outro objeto:"
#. Tag: programlisting
#: Architecture.xml:167
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Configuration.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Configuration.po 2008-10-17 05:02:31 UTC (rev 6978)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Configuration.po 2008-10-17 05:11:03 UTC (rev 6979)
@@ -9,7 +9,7 @@
"Project-Id-Version: Configuration\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:57+0000\n"
-"PO-Revision-Date: 2008-10-13 09:34+1000\n"
+"PO-Revision-Date: 2008-10-17 14:07+1000\n"
"Last-Translator: Leticia de Lima <ldelima(a)redhat.com>\n"
"Language-Team: Brazilian Portuguese <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -104,6 +104,6 @@
"persistent all time unless a specific user-based <literal>removeObject</"
"literal> is called."
msgstr ""
-"Para solucionar este problema, nós solicitamos que a política de remoção seja usada em combinação com o carregador do cache para a persistência dos dados. Isto pode ser inteiramente persistido ou passivado. (por exemplo: apenas persiste quando é removido). Desta forma, quando o nó não estiver disponível ele será recuperado a partir do armazenamento persistente. O problema é que o POJO não será transitório. Por exemplo: isto é persistente a todo momento a não ser que um <literal>removeObject</"
+"Para solucionar este problema, nós solicitamos que a política de remoção seja usada em combinação com o carregador do cache para a persistência dos dados. Isto pode ser inteiramente persistido ou passivado. (por exemplo: ele apenas persiste quando é removido). Desta forma, quando o nó não estiver disponível ele será recuperado a partir do armazenamento persistente. O problema é que o POJO não será transitório. Por exemplo: isto é persistente a todo momento a não ser que um <literal>removeObject</"
"literal> do usuário baseado for chamado. "
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Instrumentation.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Instrumentation.po 2008-10-17 05:02:31 UTC (rev 6978)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Instrumentation.po 2008-10-17 05:11:03 UTC (rev 6979)
@@ -9,7 +9,7 @@
"Project-Id-Version: Instrumentation\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:57+0000\n"
-"PO-Revision-Date: 2008-10-15 15:40+1000\n"
+"PO-Revision-Date: 2008-10-17 15:04+1000\n"
"Last-Translator: Leticia de Lima <ldelima(a)redhat.com>\n"
"Language-Team: Brazilian Portuguese <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -43,7 +43,7 @@
"For the first step, since we are using the dynamic Aop feature, a POJO is "
"only required to be declared \"prepare\". Basically, there are two ways to "
"do this: either via explicit xml or annotation (new since release 1.2.3.)"
-msgstr "O primeiro passo, uma vez que nós estamos usando o recurso Aop dinâmico, um POJO é apenas solicitado a estar declaramente \"preparado\". Basicamente, existem duas maneiras para realizar isto: tanto através do xml explícito ou anotação (novo desde a versão 1.2.3)."
+msgstr "O primeiro passo, uma vez que nós estamos usando o recurso Aop dinâmico, é solicitado ao POJO a estar declaradamente \"preparado\" apenas. Basicamente, existem duas maneiras para realizar isto: tanto através do xml explícito ou anotação (novo desde a versão 1.2.3)."
#. Tag: para
#: Instrumentation.xml:12
@@ -52,7 +52,7 @@
"As for the second step, either we can ask JBossAop to do load-time (through "
"a special class loader, so-called loadtime mode) or compile-time "
"instrumentation (use of an aopc pre-compiler, so-called precompiled mode)"
-msgstr "O segundo passo, nós podemos tanto perguntar ao JBossAop a realizar o período do carregamento (através do carregamento da classe especial, então chamado de modo do período de carregamento) ou a instrumentação do período de compilação (o uso de um pré-compilador aopc, então chamado modo pré-compilado)."
+msgstr "O segundo passo, nós poderemos tanto pedir ao JBossAop a realizar o período do carregamento (através do carregamento da classe especial, então chamado de modo do período de carregamento) ou a instrumentação do período de compilação (o uso de um pré-compilador aopc, então chamado modo pré-compilado)."
#. Tag: title
#: Instrumentation.xml:15
@@ -79,7 +79,7 @@
msgstr ""
"Para declarar um POJO através do arquivo de configuração XML, você precisará de um arquivo <literal>META-"
"INF/jboss-aop.xml</literal> localizado sob a class patch. O JBossAOP "
-"framework irá ler este arquivo durante a inicialização para fazer necessária a manipulação do código byte para aviso e introdução. Do contrário, você pode pré-compilá-lo usando o pré-compilador chamado <literal>aopc</literal>, em que isto consiste numa configuração de expressão regular para especificar os pontos de intercepção (ou <literal>jointpoint</literal> numa linguagem aop). O jointpoint pode ser construtor, chamada de método ou campo. Você precisará declarar qualquer de seu POJO a estar \"preparado\", de forma que o AOP framework sabe começar a interceptar tanto o método, campo ou as invocações do construtor usando o Aop dinâmico."
+"framework irá ler este arquivo durante a inicialização para fazer necessária a manipulação do código byte para aviso e introdução. Do contrário, você pode pré-compilá-lo usando o pré-compilador chamado <literal>aopc</literal>, que consiste numa configuração de expressão regular para especificar os pontos de intercepção (ou <literal>jointpoint</literal> numa linguagem aop). O jointpoint pode ser construtor, chamada de método ou campo. Você precisará declarar qualquer de seu POJO a estar \"preparado\", de forma que o AOP framework sabe começar a interceptar tanto o método, campo ou as invocações do construtor usando o Aop dinâmico."
#. Tag: para
#: Instrumentation.xml:19
@@ -90,7 +90,7 @@
"it is the state that we are interested in. So you should only need to change "
"your POJO class name. For details of the pointcut language, please refer to "
"JBossAop."
-msgstr "Para o PojoCache, nós apenas permitimos todos os campos (ambos de leitura e gravação) a serem interceptados. Isto é, não nos preocupamos com a intercepção do nível do método uma vez que isto é o estado que estamos interessados. Desta maneira, você deve apenas alterar o seu nome de classe do POJO. Para maiores informações na linguagem pointcut, por favor refira-se ao JBossAop."
+msgstr "Para o PojoCache, nós apenas permitimos que todos os campos (ambos de leitura e gravação) a serem interceptados. Isto é, não nos preocupamos com a intercepção do nível do método uma vez que isto é o estado que estamos interessados. Desta maneira, você deve apenas alterar o seu nome de classe do POJO. Para maiores informações na linguagem pointcut, por favor refira-se ao JBossAop."
#. Tag: para
#: Instrumentation.xml:22
@@ -182,7 +182,7 @@
"declare them with these modifiers, e.g., transient."
msgstr ""
"Nós não interferimos nos modificadores de campo do <literal>static</literal>, "
-"<literal>final</literal> e <literal>transient</literal>. Isto é, o campo com estes modificadores não estão armazenados no cache e não é replicado também. Caso você não deseje que o seu campo seja gerenciado pelo cache, você poderá declará-los com estes modificadores, por exemplo: transitório."
+"<literal>final</literal> e <literal>transient</literal>. Isto é, o campo com estes modificadores não está armazenado no cache e não é replicado também. Caso você não deseje que o seu campo seja gerenciado pelo cache, você poderá declará-los com estes modificadores, por exemplo: transitório."
#. Tag: title
#: Instrumentation.xml:46
@@ -199,7 +199,7 @@
"since there will be no need for external metadata xml descriptor. In order "
"to support Java 1.4 as well, JBossAop has also used a xdoclet type "
"annotation syntax, and as a result will need an annotation pre-compiler."
-msgstr "A anotação é um novo recurso em Java 5.0 que quando declarado pode conter meta-dados no período de compilação e execução. Ele é perfeita para a declaração aop, uma vez que não há necessidade de descriptor xml de meta-dados externos. Com o objetivo de suportar o Java 1.4, o JBossAop também utiliza a sintaxe da anotação do tipo xdoclet e como resultado necessitará de pré-compilador da anotação. "
+msgstr "A anotação é um novo recurso em Java 5.0 que quando declarada pode conter meta-dados no período de compilação e execução. Ela é perfeita para a declaração aop, uma vez que não há necessidade de descriptor xml de meta-dados externos. Com o objetivo de suportar o Java 1.4, o JBossAop também utiliza a sintaxe da anotação do tipo xdoclet e como resultado necessitará de pré-compilador da anotação. "
#. Tag: para
#: Instrumentation.xml:50
@@ -207,7 +207,7 @@
msgid ""
"Note that PojoCache starts to support the use of annotation since release "
"1.2.3 with Java 1.4, and release 1.3 with Java 5.0."
-msgstr "Perceba que o PojoCache inicializa o suporte de uso da anotação desde a liberação 1.2.3 com Java 1.4 e liberação 1.3 com Java 5.0."
+msgstr "Perceba que o PojoCache inicializa o suporte de uso da anotação desde a liberação 1.2.3 com o Java 1.4 e liberação 1.3 com o Java 5.0."
#. Tag: title
#: Instrumentation.xml:53
@@ -364,7 +364,7 @@
"won't put this field into cache management (and therefore no replication)."
msgstr ""
"Na liberação 1.4, adicionamos duas anotações do nível do campo adicional para o comportamento personalizado. A primeira é <code>@org.jboss.cache.aop.annotation."
-"Transient</code>. Quando aplicada a uma variável do campo, isto possui o mesmo efeito da palavre chave <code>transient</code> da linguagem Java. Isto quer dizer, o PojoCache não colocará este campo num gerenciamento do cache (e, portanto, não haverá replicação)."
+"Transient</code>. Quando aplicada a uma variável do campo, isto possui o mesmo efeito da palavra chave <code>transient</code> da linguagem Java. Isto quer dizer, o PojoCache não colocará este campo num gerenciamento do cache (e, portanto, não haverá replicação)."
#. Tag: para
#: Instrumentation.xml:85
@@ -471,7 +471,7 @@
"time. This is a convenient feature to make the aop less intrusive."
msgstr ""
"Conforme mencionado, um usuário pode usar o pré-compilador aop (<literal>aopc</"
-"literal>) para pré-compilar as classes do POJO de forma que durante o período de execução, não exista a necessidades do carregador da classe do sistema. O pré-compilador irá realizar a leitura no <literal>jboss-aop.xml</literal>"
+"literal>) para pré-compilar as classes do POJO, de forma que durante o período de execução não existam as necessidades do carregador da classe do sistema. O pré-compilador irá realizar a leitura no <literal>jboss-aop.xml</literal>"
#. Tag: para
#: Instrumentation.xml:96
@@ -481,7 +481,7 @@
"targets that we are listing here. User can refer to the <literal>build.xml</"
"literal> in the distribution for full details."
msgstr ""
-"Segue abaixo um trecho Ant que define a biblioteca necessária para as várias destinações Ant que são listadas aqui. O usuário pode referir-se ao <literal>build.xml</"
+"Segue abaixo um trecho Ant que define a biblioteca necessária para as várias destinações Ant, das quais são listadas aqui. O usuário pode referir-se ao <literal>build.xml</"
"literal> na distribuição, para maiores detalhes."
#. Tag: programlisting
@@ -512,7 +512,7 @@
msgid ""
"Ant target for running load-time instrumentation using specialized class "
"loader"
-msgstr "A destinação Ant para excecução da instrumentação do período de carregamento usando o carregador da classe"
+msgstr "A destinação Ant para execução da instrumentação do período de carregamento usando o carregador da classe"
#. Tag: para
#: Instrumentation.xml:100
@@ -525,7 +525,7 @@
"Note that since JBossAop 1.3, a new "
"<literal>GenerateInstrumentedClassLoader</literal> has been used since the "
"previous <literal>SystemClassLoader</literal> is error prone."
-msgstr "Segue abaixo o trecho do código para a destinação Ant que realiza a instrumentação de período de carregamento através do carregador de classe especial. Basicamente, a <literal>one.test.aop</literal> de destinação Ant, usando o carregador bootclass gerado pela <literal>generateClassLoader</literal> de destinação Ant para rodar um teste indiviudal."
+msgstr "Segue abaixo o trecho do código para a destinação Ant que realiza a instrumentação de período de carregamento através do carregador de classe especial. Basicamente, a <literal>one.test.aop</literal> de destinação Ant, usando o carregador bootclass gerado pela <literal>generateClassLoader</literal> de destinação Ant para rodar um teste individual."
#. Tag: programlisting
#: Instrumentation.xml:103
@@ -728,7 +728,7 @@
#: Instrumentation.xml:123
#, no-c-format
msgid "Ant target for annotation compiler"
-msgstr "A destinação para outra compilaçãp da anotação"
+msgstr "A destinação para outra compilação da anotação"
#. Tag: para
#: Instrumentation.xml:124
@@ -738,7 +738,7 @@
"run this step if you are using the JDK1.4 annotation. After this step is "
"successfully run, you decide either to use compile-time or load-time mode of "
"weaving."
-msgstr "Segue abaixo o trecho do código para a destinação Ant <literal>annoc</literal>. Você deverá executar este passo se você estiver usando a anotação JDK1.4. Após este passo rodar com sucesso, você decidirá tanto por usar o período de compilação ou o modo do período de carregamento da ondulação."
+msgstr "Segue abaixo o trecho do código para a destinação Ant <literal>annoc</literal>. Você deverá executar este passo se você estiver usando a anotação JDK1.4. Após este passo ser executado com sucesso, você decidirá tanto por usar o período de compilação ou o modo do período de carregamento da ondulação."
#. Tag: programlisting
#: Instrumentation.xml:127
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Troubleshooting.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Troubleshooting.po 2008-10-17 05:02:31 UTC (rev 6978)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Troubleshooting.po 2008-10-17 05:11:03 UTC (rev 6979)
@@ -9,7 +9,7 @@
"Project-Id-Version: Troubleshooting\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:57+0000\n"
-"PO-Revision-Date: 2008-10-13 16:01+1000\n"
+"PO-Revision-Date: 2008-10-17 15:08+1000\n"
"Last-Translator: Leticia de Lima <ldelima(a)redhat.com>\n"
"Language-Team: Brazilian Portuguese <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -31,8 +31,8 @@
"page=PojoCacheTroubleshooting\">PojoCache wiki troubleshooting page</ulink>. "
"Please refer it first. We will keep adding troubleshooting tips there."
msgstr ""
-"Nós mantivemos uma <ulink url=\"http://wiki.jboss.org/wiki/Wiki.jsp?"
-"page=PojoCacheTroubleshooting\">PojoCache wiki troubleshooting page</ulink>. Por facor consulte isto primeiramente. Nós continuaremos adicionando dicas de troubleshooting nesta página."
+"Por favor consulte primeiramente a página: <ulink url=\"http://wiki.jboss.org/wiki/Wiki.jsp?"
+"page=PojoCacheTroubleshooting\">PojoCache wiki troubleshooting page</ulink>, em que mantivemos. Nós continuaremos adicionando dicas de troubleshooting nesta página."
#. Tag: para
#: Troubleshooting.xml:9
16 years
JBoss Cache SVN: r6978 - enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES.
by jbosscache-commits@lists.jboss.org
Author: mospina
Date: 2008-10-17 01:02:31 -0400 (Fri, 17 Oct 2008)
New Revision: 6978
Modified:
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Basic_api.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Book_Info.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Cache_loaders.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Colophon.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Compatibility.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Configuration.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Eviction_policies.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Jboss_integration.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Replication.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/State_transfer.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Transactions.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Treecache_marshaller.po
Log:
translation completed
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Basic_api.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Basic_api.po 2008-10-17 01:49:09 UTC (rev 6977)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Basic_api.po 2008-10-17 05:02:31 UTC (rev 6978)
@@ -1,18 +1,20 @@
+# translation of Basic_api.po to
# Language /tmp/mike/JBEAP420/Cache translations for JBEAP package.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
# Automatically generated, 2007.
#
msgid ""
msgstr ""
-"Project-Id-Version: JBEAP 420\n"
+"Project-Id-Version: Basic_api\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:43+0000\n"
-"PO-Revision-Date: 2001-02-09 01:25+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2008-10-17 12:17+1000\n"
+"Last-Translator: Angela Garcia\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
#: Basic_api.xml:5
@@ -44,6 +46,19 @@
"tree.stopService();\n"
"tree.destroyService(); // not necessary, but is same as MBean lifecycle"
msgstr ""
+"TreeCache tree = new TreeCache();\n"
+"tree.setClusterName(\"demo-cluster\");\n"
+"tree.setClusterProperties(\"default.xml\"); // uses defaults if not "
+"provided\n"
+"tree.setCacheMode(TreeCache.REPL_SYNC);\n"
+"tree.createService(); // not necessary, but is same as MBean lifecycle\n"
+"tree.startService(); // kick start tree cache\n"
+"tree.put(\"/a/b/c\", \"name\", \"Ben\");\n"
+"tree.put(\"/a/b/c/d\", \"uid\", new Integer(322649));\n"
+"Integer tmp = (Integer) tree.get(\"/a/b/c/d\", \"uid\");\n"
+"tree.remove(\"/a/b\");\n"
+"tree.stopService();\n"
+"tree.destroyService(); // not necessary, but is same as MBean lifecycle"
#. Tag: para
#: Basic_api.xml:10
@@ -171,6 +186,8 @@
"String n1 = \"/300/322649\";\n"
"Fqn n2 = new Fqn(new Object{new Integer(300), new Integer(322649)});"
msgstr ""
+"String n1 = \"/300/322649\";\n"
+"Fqn n2 = new Fqn(new Object{new Integer(300), new Integer(322649)});"
#. Tag: para
#: Basic_api.xml:55
@@ -237,3 +254,4 @@
"Since the API may change at any time, we recommend the Javadoc for up-to-"
"date information."
msgstr ""
+
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Book_Info.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Book_Info.po 2008-10-17 01:49:09 UTC (rev 6977)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Book_Info.po 2008-10-17 05:02:31 UTC (rev 6978)
@@ -1,39 +1,42 @@
+# translation of Book_Info.po to
# Language /tmp/mike/JBEAP420/Cache translations for JBEAP package.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
# Automatically generated, 2007.
#
msgid ""
msgstr ""
-"Project-Id-Version: JBEAP 420\n"
+"Project-Id-Version: Book_Info\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:43+0000\n"
-"PO-Revision-Date: 2001-02-09 01:25+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2008-10-17 14:21+1000\n"
+"Last-Translator: Angela Garcia\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
#: Book_Info.xml:5
#, no-c-format
msgid "JBoss Cache Tree Cache Guide"
-msgstr ""
+msgstr "Manual de JBoss Cache Tree Cache"
#. Tag: subtitle
#: Book_Info.xml:6
#, no-c-format
msgid "for Use with JBoss Enterprise Application Platform 4.3"
-msgstr ""
+msgstr "para uso con JBoss Enterprise Application Platform 4.3"
#. Tag: para
#: Book_Info.xml:12
#, no-c-format
msgid "This book is about the JBoss Cache Tree Cache."
-msgstr ""
+msgstr "Este libro aborda JBoss Cache Tree Cache."
#. Tag: holder
#: Book_Info.xml:26
#, no-c-format
msgid "&HOLDER;"
-msgstr ""
+msgstr "&HOLDER;"
+
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Cache_loaders.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Cache_loaders.po 2008-10-17 01:49:09 UTC (rev 6977)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Cache_loaders.po 2008-10-17 05:02:31 UTC (rev 6978)
@@ -1,24 +1,26 @@
+# translation of Cache_loaders.po to
# Language /tmp/mike/JBEAP420/Cache translations for JBEAP package.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
# Automatically generated, 2007.
#
msgid ""
msgstr ""
-"Project-Id-Version: JBEAP 420\n"
+"Project-Id-Version: Cache_loaders\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:43+0000\n"
-"PO-Revision-Date: 2001-02-09 01:25+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2008-10-17 11:35+1000\n"
+"Last-Translator: Angela Garcia\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
#: Cache_loaders.xml:5
#, no-c-format
msgid "Cache Loaders"
-msgstr ""
+msgstr "Cargadores de caché"
#. Tag: para
#: Cache_loaders.xml:6
@@ -27,7 +29,7 @@
"JBoss Cache can use a <emphasis>cache loader</emphasis> to back up the in-"
"memory cache to a backend datastore. If JBoss Cache is configured with a "
"cache loader, then the following features are provided:"
-msgstr ""
+msgstr "JBoss Cache puede utilizar un <emphasis>cargador de caché</emphasis> para respaldar el caché en le memoria en un almacenamiento de datos backend. Si JBoss Cache se configura con un cargador de caché entonces se proporcionan las siguientes características:"
#. Tag: para
#: Cache_loaders.xml:9
@@ -255,6 +257,176 @@
" void storeEntireState(byte[] state) throws Exception;\n"
"}"
msgstr ""
+"public interface CacheLoader extends Service {\n"
+"\n"
+" /**\n"
+" * Sets the configuration. Will be called before {@link #create()} and "
+"{@link #start()}\n"
+" * @param props A set of properties specific to a given CacheLoader\n"
+" */\n"
+" void setConfig(Properties props);\n"
+"\n"
+" void setCache(TreeCache c);\n"
+"\n"
+"\n"
+" /**\n"
+" * Returns a list of children names, all names are <em>relative</"
+"em>. Returns null if \n"
+" * the parent node is not found.\n"
+" * The returned set must not be modified, e.g. use Collections."
+"unmodifiableSet(s) to \n"
+" * return the result\n"
+" * @param fqn The FQN of the parent\n"
+" * @return Set<String>. A list of children. Returns null if no "
+"children nodes are present,\n"
+" * or the parent is not present\n"
+" */\n"
+" Set getChildrenNames(Fqn fqn) throws Exception;\n"
+"\n"
+"\n"
+" /**\n"
+" * Returns the value for a given key. Returns null if the node doesn't "
+"exist, or the value \n"
+" * is not bound\n"
+" */\n"
+" Object get(Fqn name, Object key) throws Exception;\n"
+"\n"
+"\n"
+" /**\n"
+" * Returns all keys and values from the persistent store, given a fully "
+"qualified name.\n"
+" * \n"
+" * NOTE that the expected return value of this method has changed from "
+"JBossCache 1.2.x \n"
+" * and before! This will affect cache loaders written prior to "
+"JBossCache 1.3.0 and such \n"
+" * implementations should be checked for compliance with the behaviour "
+"expected.\n"
+" * \n"
+" * @param name\n"
+" * @return Map<Object,Object> of keys and values for the given "
+"node. Returns null if the \n"
+" * node is not found. If the node is found but has no attributes, this "
+"method returns \n"
+" * an empty Map.\n"
+" * @throws Exception\n"
+" */\n"
+" Map get(Fqn name) throws Exception;\n"
+"\n"
+"\n"
+"\n"
+" /**\n"
+" * Checks whether the CacheLoader has a node with Fqn\n"
+" * @return True if node exists, false otherwise\n"
+" */\n"
+" boolean exists(Fqn name) throws Exception;\n"
+"\n"
+"\n"
+" /**\n"
+" * Inserts key and value into the attributes hashmap of the given node. "
+"If the node does \n"
+" * not exist, all parent nodes from the root down are created "
+"automatically\n"
+" */\n"
+" void put(Fqn name, Object key, Object value) throws Exception;\n"
+"\n"
+" /**\n"
+" * Inserts all elements of attributes into the attributes hashmap of the "
+"given node, \n"
+" * overwriting existing attributes, but not clearing the existing hashmap "
+"before\n"
+" * insertion (making it a union of existing and new attributes)\n"
+" * If the node does not exist, all parent nodes from the root down are "
+"created \n"
+" * automatically\n"
+" * @param name The fully qualified name of the node\n"
+" * @param attributes A Map of attributes. Can be null\n"
+" */\n"
+" void put(Fqn name, Map attributes) throws Exception;\n"
+"\n"
+" /**\n"
+" * Inserts all modifications to the backend store. Overwrite whatever is "
+"already in\n"
+" * the datastore.\n"
+" * @param modifications A List<Modification> of modifications\n"
+" * @throws Exception\n"
+" */\n"
+" void put(List modifications) throws Exception;\n"
+"\n"
+" /** Removes the given key and value from the attributes of the given "
+"node. \n"
+" * No-op if node doesn't exist */\n"
+" void remove(Fqn name, Object key) throws Exception;\n"
+"\n"
+" /**\n"
+" * Removes the given node. If the node is the root of a subtree, this "
+"will recursively \n"
+" * remove all subnodes, depth-first\n"
+" */\n"
+" void remove(Fqn name) throws Exception;\n"
+"\n"
+" /** Removes all attributes from a given node, but doesn't delete the node "
+"itself */\n"
+" void removeData(Fqn name) throws Exception;\n"
+"\n"
+"\n"
+" /**\n"
+" * Prepare the modifications. For example, for a DB-based CacheLoader:\n"
+" * \n"
+" * Create a local (JDBC) transaction\n"
+" * Associate the local transaction with tx (tx is the key)\n"
+" * Execute the coresponding SQL statements against the DB (statements "
+"derived from \n"
+" *modifications)\n"
+" * \n"
+" * For non-transactional CacheLoader (e.g. file-based), this could be a "
+"null operation\n"
+" * @param tx The transaction, just used as a hashmap key\n"
+" * @param modifications List<Modification>, a list of all "
+"modifications within the given \n"
+" * transaction\n"
+" * @param one_phase Persist immediately and (for example) commit the "
+"local JDBC \n"
+" * transaction as well. When true, we won't get a {@link #commit(Object)} "
+"or \n"
+" * {@link #rollback(Object)} method call later\n"
+" */\n"
+" void prepare(Object tx, List modifications, boolean one_phase) throws "
+"Exception;\n"
+"\n"
+" /**\n"
+" * Commit the transaction. A DB-based CacheLoader would look up the local "
+"JDBC transaction \n"
+" * associated with tx and commit that transaction\n"
+" * Non-transactional CacheLoaders could simply write the data that was "
+"previously saved \n"
+" * transiently under the given tx key, to (for example) a file system "
+"(note this only holds if \n"
+" * the previous prepare() did not define one_phase=true\n"
+" */\n"
+" void commit(Object tx) throws Exception;\n"
+"\n"
+" /**\n"
+" * Roll the transaction back. A DB-based CacheLoader would look up the "
+"local JDBC \n"
+" * transaction associated with tx and roll back that transaction\n"
+" */\n"
+" void rollback(Object tx);\n"
+"\n"
+" /**\n"
+" * Fetch the entire state for this cache from secondary storage (disk, "
+"DB) and return\n"
+" * it as a byte buffer. This is for initialization of a new cache from a "
+"remote cache. \n"
+" * The new cache would then call storeEntireState()\n"
+" * todo: define binary format for exchanging state\n"
+" */\n"
+" byte[] loadEntireState() throws Exception;\n"
+"\n"
+" /** Store the given state in secondary storage. Overwrite whatever is "
+"currently in storage */\n"
+" void storeEntireState(byte[] state) throws Exception;\n"
+"}"
#. Tag: para
#: Cache_loaders.xml:26
@@ -343,6 +515,65 @@
"\n"
"}"
msgstr ""
+"public interface ExtendedCacheLoader extends CacheLoader\n"
+"{\n"
+" /**\n"
+" * Fetch a portion of the state for this cache from secondary storage \n"
+" * (disk, DB) and return it as a byte buffer.\n"
+" * This is for activation of a portion of new cache from a remote "
+"cache. \n"
+" * The new cache would then call {@link #storeState(byte[], Fqn)}.\n"
+" * \n"
+" * @param subtree Fqn naming the root (i.e. highest level parent) node "
+"of\n"
+" * the subtree for which state is requested.\n"
+" * \n"
+" * @see org.jboss.cache.TreeCache#activateRegion(String)\n"
+" */\n"
+" byte[] loadState(Fqn subtree) throws Exception;\n"
+" \n"
+" /**\n"
+" * Store the given portion of the cache tree's state in secondary "
+"storage. \n"
+" * Overwrite whatever is currently in secondary storage. If the "
+"transferred \n"
+" * state has Fqns equal to or children of parameter <code>subtree</"
+"code>, \n"
+" * then no special behavior is required. Otherwise, ensure that\n"
+" * the state is integrated under the given 'subtree'. Typically\n"
+" * in the latter case 'subtree' would be the Fqn of the buddy \n"
+" * backup region for a buddy group; e.g.\n"
+" * \n"
+" * If the the transferred state had Fqns starting with \"/a\" and\n"
+" * 'subtree' was \"/_BUDDY_BACKUP_/192.168.1.2:5555\" then the\n"
+" * state should be stored in the local persistent store under\n"
+" * \"/_BUDDY_BACKUP_/192.168.1.2:5555/a\"\n"
+" * \n"
+" * @param state the state to store\n"
+" * @param subtree Fqn naming the root (i.e. highest level parent) node "
+"of\n"
+" * the subtree included in 'state'. If the Fqns \n"
+" * of the data included in 'state' are not \n"
+" * already children of 'subtree', then their\n"
+" * Fqns should be altered to make them children of \n"
+" * 'subtree' before they are persisted.\n"
+" */ \n"
+" void storeState(byte[] state, Fqn subtree) throws Exception;\n"
+" \n"
+" /**\n"
+" * Sets the {@link RegionManager} this object should use to manage \n"
+" * marshalling/unmarshalling of different regions using different\n"
+" * classloaders.\n"
+" *\n"
+" * NOTE: This method is only intended to be used by the TreeCache "
+"instance \n"
+" * this cache loader is associated with.\n"
+" * \n"
+" * @param manager the region manager to use, or <code>null</code>.\n"
+" */\n"
+" void setRegionManager(RegionManager manager);\n"
+"\n"
+"}"
#. Tag: para
#: Cache_loaders.xml:33
@@ -399,6 +630,15 @@
" void destroy();\n"
"}"
msgstr ""
+"public interface Service {\n"
+" void create() throws Exception;\n"
+"\n"
+" void start() throws Exception;\n"
+"\n"
+" void stop();\n"
+"\n"
+" void destroy();\n"
+"}"
#. Tag: para
#: Cache_loaders.xml:45
@@ -577,6 +817,69 @@
"\n"
" </mbean>"
msgstr ""
+"<!-- ==================================================================== "
+"-->\n"
+" <!-- Defines TreeCache "
+"configuration -->\n"
+" <!-- "
+"==================================================================== -->\n"
+"\n"
+" <mbean code=\"org.jboss.cache.TreeCache\" name=\"jboss.cache:"
+"service=TreeCache\">\n"
+"\n"
+" <!-- New 1.3.x cache loader config block -->\n"
+" <attribute name=\"CacheLoaderConfiguration\">\n"
+" <config>\n"
+" <!-- if passivation is true, only the first cache loader "
+"is used; \n"
+" the rest are ignored -->\n"
+" <passivation>false</passivation>\n"
+" <!-- comma delimited FQNs to preload -->\n"
+" <preload>/</preload>\n"
+" <!-- are the cache loaders shared in a cluster? -->\n"
+" <shared>false</shared>\n"
+"\n"
+" <!-- we can now have multiple cache loaders, which get "
+"chained -->\n"
+" <!-- the 'cacheloader' element may be repeated -->\n"
+" <cacheloader>\n"
+" <class>org.jboss.cache.loader.JDBCCacheLoader</"
+"class>\n"
+" <!-- same as the old CacheLoaderConfig attribute --"
+">\n"
+" <properties>\n"
+" cache.jdbc.driver=com.mysql.jdbc.Driver\n"
+" cache.jdbc.url=jdbc:mysql://localhost:3306/jbossdb\n"
+" cache.jdbc.user=root\n"
+" cache.jdbc.password=\n"
+" </properties>\n"
+" <!-- whether the cache loader writes are asynchronous "
+"-->\n"
+" <async>false</async>\n"
+" <!-- only one cache loader in the chain may set "
+"fetchPersistentState \n"
+" to true.\n"
+" An exception is thrown if more than one cache loader "
+"sets this \n"
+" to true. -->\n"
+" <fetchPersistentState>true</"
+"fetchPersistentState>\n"
+" <!-- determines whether this cache loader ignores "
+"writes - defaults \n"
+" to false. -->\n"
+" <ignoreModifications>false</"
+"ignoreModifications>\n"
+" <!-- if set to true, purges the contents of this "
+"cache loader when \n"
+" the cache starts up.\n"
+" Defaults to false. -->\n"
+" <purgeOnStartup>false</purgeOnStartup>\n"
+" </cacheloader>\n"
+"\n"
+" </config>\n"
+" </attribute>\n"
+"\n"
+" </mbean>"
#. Tag: para
#: Cache_loaders.xml:77
@@ -621,6 +924,33 @@
"attribute>\n"
" </mbean>"
msgstr ""
+"<!-- ==================================================================== "
+"-->\n"
+" <!-- Defines TreeCache "
+"configuration -->\n"
+" <!-- "
+"==================================================================== -->\n"
+"\n"
+" <mbean code=\"org.jboss.cache.TreeCache\" name=\"jboss.cache:"
+"service=TreeCache\">\n"
+" <attribute name=\"CacheLoaderClass\">org.jboss.cache.loader."
+"bdbje.BdbjeCacheLoader\n"
+" </attribute>\n"
+" <!-- attribute name=\"CacheLoaderClass\">org.jboss.cache.loader."
+"FileCacheLoader\n"
+" </attribute -->\n"
+" <attribute name=\"CacheLoaderConfig\" replace=\"false\">\n"
+" location=c:\\tmp\\bdbje\n"
+" </attribute>\n"
+" <attribute name=\"CacheLoaderShared\">true</attribute>\n"
+" <attribute name=\"CacheLoaderPreload\">/</attribute>\n"
+" <attribute name=\"CacheLoaderFetchTransientState\">false</"
+"attribute>\n"
+" <attribute name=\"CacheLoaderFetchPersistentState\">true</"
+"attribute>\n"
+" <attribute name=\"CacheLoaderAsynchronous\">true</"
+"attribute>\n"
+" </mbean>"
#. Tag: para
#: Cache_loaders.xml:83
@@ -914,8 +1244,7 @@
#. Tag: para
#: Cache_loaders.xml:180
#, no-c-format
-msgid ""
-"The following figure shows 2 JBossCache nodes sharing the same backend store:"
+msgid "The following figure shows 2 JBossCache nodes sharing the same backend store:"
msgstr ""
#. Tag: title
@@ -1111,6 +1440,26 @@
"// start firstLevel\n"
"firstLevel.startService();"
msgstr ""
+"TreeCache firstLevel, secondLevel;\n"
+"LocalDelegatingCacheLoader cache_loader;\n"
+"\n"
+"// create and configure firstLevel\n"
+"firstLevel=new TreeCache();\n"
+"\n"
+"// create and configure secondLevel\n"
+"secondLevel=new TreeCache();\n"
+"\n"
+"// create DelegatingCacheLoader\n"
+"cache_loader=new LocalDelegatingCacheLoader(secondLevel);\n"
+"\n"
+"// set CacheLoader in firstLevel\n"
+"firstLevel.setCacheLoader(cache_loader);\n"
+"\n"
+"// start secondLevel\n"
+"secondLevel.startService();\n"
+"\n"
+"// start firstLevel\n"
+"firstLevel.startService();"
#. Tag: para
#: Cache_loaders.xml:276
@@ -1170,6 +1519,45 @@
"...\n"
"</mbean>"
msgstr ""
+"<!-- ==================================================================== "
+"-->\n"
+"<!-- Defines TreeCache configuration "
+"-->\n"
+"<!-- ==================================================================== "
+"-->\n"
+"\n"
+"<mbean code=\"org.jboss.cache.TreeCache\" name=\"jboss.cache:"
+"service=TreeCache\">\n"
+"...\n"
+"<attribute name=\"CacheLoaderConfiguration\">\n"
+" <config>\n"
+" <passivation>false</passivation>\n"
+" <preload>/some/stuff</preload>\n"
+" <cacheloader>\n"
+" <class>org.jboss.cache.loader.RpcDelegatingCacheLoader</"
+"class>\n"
+" <!-- whether the cache loader writes are asynchronous -->\n"
+" <async>false</async>\n"
+" <!-- only one cache loader in the chain may set "
+"fetchPersistentState to true.\n"
+" An exception is thrown if more than one cache loader sets "
+"this to true. \n"
+" -->\n"
+" <fetchPersistentState>false</fetchPersistentState>\n"
+" <!-- determines whether this cache loader ignores writes - "
+"defaults to false. \n"
+" -->\n"
+" <ignoreModifications>false</ignoreModifications>\n"
+" <!-- if set to true, purges the contents of this cache loader "
+"when \n"
+" the cache starts up.\n"
+" Defaults to false. -->\n"
+" <purgeOnStartup>false</purgeOnStartup>\n"
+" </cacheloader>\n"
+" </config>\n"
+"</attribute>\n"
+"...\n"
+"</mbean>"
#. Tag: para
#: Cache_loaders.xml:280
@@ -1184,7 +1572,7 @@
#: Cache_loaders.xml:286
#, no-c-format
msgid "TcpDelegatingCacheLoader"
-msgstr ""
+msgstr "TcpDelegatingCacheLoader"
#. Tag: para
#: Cache_loaders.xml:287
@@ -1218,8 +1606,7 @@
#. Tag: para
#: Cache_loaders.xml:296
#, no-c-format
-msgid ""
-"An example set of a TcpCacheServer running inside of JBoss is shown below:"
+msgid "An example set of a TcpCacheServer running inside of JBoss is shown below:"
msgstr ""
#. Tag: programlisting
@@ -1245,6 +1632,24 @@
"\n"
"</server>"
msgstr ""
+"<server>\n"
+"\n"
+" <classpath codebase=\"./lib\" archives=\"jboss-cache.jar\"/>\n"
+"\n"
+" <mbean code=\"org.jboss.cache.loader.tcp.TcpCacheServer\" \n"
+" name=\"jboss.cache:service=TcpCacheServer\">\n"
+" <depends optional-attribute-name=\"Cache\"\n"
+" proxy-type=\"attribute\">jboss.cache:service=TreeCache</"
+"depends>\n"
+" <attribute name=\"BindAddress\">${jboss.bind.address:"
+"localhost}</attribute>\n"
+" <attribute name=\"Port\">7500</attribute>\n"
+" <attribute name=\"MBeanServerName\"></attribute>\n"
+" <!--<attribute name=\"CacheName\">jboss.cache:"
+"service=TreeCache</attribute>-->\n"
+" </mbean>\n"
+"\n"
+"</server>"
#. Tag: para
#: Cache_loaders.xml:300
@@ -1289,6 +1694,18 @@
" </config>\n"
"</attribute>"
msgstr ""
+"<attribute name=\"CacheLoaderConfiguration\">\n"
+" <config>\n"
+" <cacheloader>\n"
+" <class>org.jboss.cache.loader.tcp."
+"TcpDelegatingCacheLoader</class>\n"
+" <properties>\n"
+" host=localhost\n"
+" port=7500\n"
+" </properties>\n"
+" </cacheloader>\n"
+" </config>\n"
+"</attribute>"
#. Tag: para
#: Cache_loaders.xml:310
@@ -1329,7 +1746,7 @@
#: Cache_loaders.xml:322
#, no-c-format
msgid "RmiDelegatingCacheLoader"
-msgstr ""
+msgstr "RmiDelegatingCacheLoader"
#. Tag: para
#: Cache_loaders.xml:323
@@ -1361,8 +1778,7 @@
#. Tag: para
#: Cache_loaders.xml:332
#, no-c-format
-msgid ""
-"An example set of an RmiCacheServer running inside of JBoss is shown below:"
+msgid "An example set of an RmiCacheServer running inside of JBoss is shown below:"
msgstr ""
#. Tag: programlisting
@@ -1391,6 +1807,27 @@
"\n"
"</server>"
msgstr ""
+"<server>\n"
+"\n"
+" <classpath codebase=\"./lib\" archives=\"jboss-cache.jar\"/>\n"
+"\n"
+" <mbean code=\"org.jboss.cache.loader.rmi.RmiCacheServer\" \n"
+" name=\"jboss.cache:service=RmiCacheServer\">\n"
+" <depends optional-attribute-name=\"Cache\"\n"
+" proxy-type=\"attribute\">jboss.cache:service=TreeCache</"
+"depends>\n"
+" <!-- the address and port of the RMI server. -->\n"
+" <attribute name=\"BindAddress\">${jboss.bind.address:"
+"localhost}</attribute>\n"
+" <attribute name=\"Port\">1098</attribute>\n"
+" <attribute name=\"BindName\">MyRmiCacheServer</"
+"attribute>\n"
+" <attribute name=\"MBeanServerName\"></attribute>\n"
+" <!--<attribute name=\"CacheName\">jboss.cache:"
+"service=TreeCache</attribute>-->\n"
+" </mbean>\n"
+"\n"
+"</server>"
#. Tag: para
#: Cache_loaders.xml:336
@@ -1431,6 +1868,19 @@
" </config>\n"
"</attribute>"
msgstr ""
+"<attribute name=\"CacheLoaderConfiguration\">\n"
+" <config>\n"
+" <cacheloader>\n"
+" <class>org.jboss.cache.loader.RmiDelegatingCacheLoader</"
+"class>\n"
+" <properties>\n"
+" host=localhost\n"
+" port=1098\n"
+" name=MyRmiCacheServer\n"
+" </properties>\n"
+" </cacheloader>\n"
+" </config>\n"
+"</attribute>"
#. Tag: para
#: Cache_loaders.xml:346
@@ -1639,8 +2089,7 @@
#. Tag: para
#: Cache_loaders.xml:430
#, no-c-format
-msgid ""
-"<emphasis>cache.jdbc.driver</emphasis> - fully qualified JDBC driver name."
+msgid "<emphasis>cache.jdbc.driver</emphasis> - fully qualified JDBC driver name."
msgstr ""
#. Tag: para
@@ -1652,8 +2101,7 @@
#. Tag: para
#: Cache_loaders.xml:436
#, no-c-format
-msgid ""
-"<emphasis>cache.jdbc.user</emphasis> - user name to connect to the database."
+msgid "<emphasis>cache.jdbc.user</emphasis> - user name to connect to the database."
msgstr ""
#. Tag: para
@@ -1726,6 +2174,48 @@
" </config>\n"
"</attribute>"
msgstr ""
+"<attribute name=\"CacheLoaderConfiguration\">\n"
+" <config>\n"
+" <passivation>false</passivation>\n"
+" <preload>/some/stuff</preload>\n"
+" <cacheloader>\n"
+" <class>org.jboss.cache.loader.JDBCCacheLoader</"
+"class>\n"
+" <!-- same as the old CacheLoaderConfig attribute -->\n"
+" <properties>\n"
+" cache.jdbc.table.name=jbosscache\n"
+" cache.jdbc.table.create=true\n"
+" cache.jdbc.table.drop=true\n"
+" cache.jdbc.table.primarykey=jbosscache_pk\n"
+" cache.jdbc.fqn.column=fqn\n"
+" cache.jdbc.fqn.type=varchar(255)\n"
+" cache.jdbc.node.column=node\n"
+" cache.jdbc.node.type=blob\n"
+" cache.jdbc.parent.column=parent\n"
+" cache.jdbc.driver=oracle.jdbc.OracleDriver\n"
+" cache.jdbc.url=jdbc:oracle:thin:@localhost:1521:JBOSSDB\n"
+" cache.jdbc.user=SCOTT\n"
+" cache.jdbc.password=TIGER\n"
+" </properties>\n"
+" <!-- whether the cache loader writes are asynchronous -->\n"
+" <async>false</async>\n"
+" <!-- only one cache loader in the chain may set "
+"fetchPersistentState to true.\n"
+" An exception is thrown if more than one cache loader sets "
+"this to true. \n"
+" -->\n"
+" <fetchPersistentState>true</fetchPersistentState>\n"
+" <!-- determines whether this cache loader ignores writes - "
+"defaults to false. \n"
+" -->\n"
+" <ignoreModifications>false</ignoreModifications>\n"
+" <!-- if set to true, purges the contents of this cache loader "
+"when the cache \n"
+" starts up. Defaults to false. -->\n"
+" <purgeOnStartup>false</purgeOnStartup>\n"
+" </cacheloader>\n"
+" </config>\n"
+"</attribute>"
#. Tag: para
#: Cache_loaders.xml:453
@@ -1770,3 +2260,34 @@
" </config>\n"
"</attribute>"
msgstr ""
+"<attribute name=\"CacheLoaderConfiguration\">\n"
+" <config>\n"
+" <passivation>false</passivation>\n"
+" <preload>/some/stuff</preload>\n"
+" <cacheloader>\n"
+" <class>org.jboss.cache.loader.JDBCCacheLoader</"
+"class>\n"
+" <!-- same as the old CacheLoaderConfig attribute -->\n"
+" <properties>\n"
+" cache.jdbc.datasource=java:/DefaultDS\n"
+" </properties>\n"
+" <!-- whether the cache loader writes are asynchronous -->\n"
+" <async>false</async>\n"
+" <!-- only one cache loader in the chain may set "
+"fetchPersistentState to true.\n"
+" An exception is thrown if more than one cache loader sets "
+"this to true. \n"
+" -->\n"
+" <fetchPersistentState>true</fetchPersistentState>\n"
+" <!-- determines whether this cache loader ignores writes - "
+"defaults to false. \n"
+" -->\n"
+" <ignoreModifications>false</ignoreModifications>\n"
+" <!-- if set to true, purges the contents of this cache loader "
+"when the cache \n"
+" starts up. Defaults to false. -->\n"
+" <purgeOnStartup>false</purgeOnStartup>\n"
+" </cacheloader>\n"
+" </config>\n"
+"</attribute>"
+
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Colophon.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Colophon.po 2008-10-17 01:49:09 UTC (rev 6977)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Colophon.po 2008-10-17 05:02:31 UTC (rev 6978)
@@ -1,26 +1,28 @@
+# translation of Colophon.po to
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: Colophon\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:43+0000\n"
-"PO-Revision-Date: 2007-04-17 00:25-0500\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2008-10-17 14:23+1000\n"
+"Last-Translator: Angela Garcia\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
#: Colophon.xml:4
#, no-c-format
msgid "Bibliography"
-msgstr ""
+msgstr "Bibliografía"
#. Tag: title
#: Colophon.xml:5
#, no-c-format
msgid "Authors"
-msgstr ""
+msgstr "Autores"
#. Tag: author
#: Colophon.xml:6
@@ -29,6 +31,8 @@
"<honorific>Mr</honorific><firstname>Norman</firstname> <surname>Walsh</"
"surname>"
msgstr ""
+"<honorific>Sr</honorific><firstname>Norman</firstname> <surname>Walsh</"
+"surname>"
#. Tag: affiliation
#: Colophon.xml:9
@@ -38,21 +42,25 @@
"jobtitle><orgname>ArborText, Inc.</orgname><orgdiv>Application Developement</"
"orgdiv>"
msgstr ""
+"<shortaffil>ATI</shortaffil><jobtitle>Analista de aplicaciones senior</"
+"jobtitle><orgname>ArborText, Inc.</orgname><orgdiv>Desarrollo de aplicaciones</"
+"orgdiv>"
#. Tag: title
#: Colophon.xml:11
#, no-c-format
msgid "Translator"
-msgstr ""
+msgstr "Angela Garcia - agarcia(a)redhat.com"
#. Tag: othercredit
#: Colophon.xml:12
#, no-c-format
msgid "<firstname>John</firstname> <surname>Doe</surname>"
-msgstr ""
+msgstr "<firstname>John</firstname> <surname>Doe</surname>"
#. Tag: contrib
#: Colophon.xml:14
#, no-c-format
msgid "Extensive review and rough drafts of Section 1.3, 1.4, and 1.5"
-msgstr ""
+msgstr "Revisión exhaustiva y borradores de la sección 1.3, 1.4 y 1.5"
+
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Compatibility.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Compatibility.po 2008-10-17 01:49:09 UTC (rev 6977)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Compatibility.po 2008-10-17 05:02:31 UTC (rev 6978)
@@ -1,24 +1,26 @@
+# translation of Compatibility.po to
# Language /tmp/mike/JBEAP420/Cache translations for JBEAP package.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
# Automatically generated, 2007.
#
msgid ""
msgstr ""
-"Project-Id-Version: JBEAP 420\n"
+"Project-Id-Version: Compatibility\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:43+0000\n"
-"PO-Revision-Date: 2001-02-09 01:25+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2008-10-17 14:24+1000\n"
+"Last-Translator: Angela Garcia\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
#: Compatibility.xml:5
#, no-c-format
msgid "Version Compatibility and Interoperability"
-msgstr ""
+msgstr "Interoperabilidad y compatibilidad de versiones "
#. Tag: para
#: Compatibility.xml:6
@@ -78,3 +80,4 @@
"caches, a workaround is to set system property <literal>jboss.cache."
"fqn.123compatible</literal> to <literal>true</literal>."
msgstr ""
+
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Configuration.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Configuration.po 2008-10-17 01:49:09 UTC (rev 6977)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Configuration.po 2008-10-17 05:02:31 UTC (rev 6978)
@@ -1,24 +1,26 @@
+# translation of Configuration.po to
# Language /tmp/mike/JBEAP420/Cache translations for JBEAP package.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
# Automatically generated, 2007.
#
msgid ""
msgstr ""
-"Project-Id-Version: JBEAP 420\n"
+"Project-Id-Version: Configuration\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:43+0000\n"
-"PO-Revision-Date: 2001-02-09 01:25+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2008-10-17 15:01+1000\n"
+"Last-Translator: Angela Garcia\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
#: Configuration.xml:5
#, no-c-format
msgid "Configuration"
-msgstr ""
+msgstr "Configuración"
#. Tag: para
#: Configuration.xml:6
@@ -27,19 +29,19 @@
"All properties of the cache are configured via setters and can be retrieved "
"via getters. This can be done either manually, or via the "
"<literal>PropertyConfigurator</literal> and an XML file."
-msgstr ""
+msgstr "Todas las propiedades del caché están configuradas por medio de setters y se pueden recuperar por medio de getters. Esto se puede lograr ya sea manualmente o a través del <literal>PropertyConfigurator</literal> y un archivo XML."
#. Tag: title
#: Configuration.xml:10
#, no-c-format
msgid "Sample XML-Based Configuration"
-msgstr ""
+msgstr "Configuración de ejemplo basada en XML"
#. Tag: para
#: Configuration.xml:11
#, no-c-format
msgid "A sample XML configuration file is shown below:"
-msgstr ""
+msgstr "Un archivo de configuración XML de ejemplo se muestra a continuación:"
#. Tag: programlisting
#: Configuration.xml:14
@@ -298,6 +300,258 @@
" </mbean>\n"
"</server>"
msgstr ""
+"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"
+"<server>\n"
+" <classpath codebase=\"./lib\" archives=\"jboss-cache.jar, jgroups.jar"
+"\" />\n"
+"\n"
+" <!-- "
+"==================================================================== --"
+">\n"
+" <!-- Defines TreeCache "
+"configuration -->\n"
+" <!-- "
+"==================================================================== --"
+">\n"
+" <mbean code=\"org.jboss.cache.TreeCache\" name=\"jboss.cache:"
+"service=TreeCache\">\n"
+" <depends>jboss:service=Naming</depends>\n"
+" <depends>jboss:service=TransactionManager</depends>\n"
+"\n"
+"\n"
+" <!-- Configure the TransactionManager -->\n"
+" <attribute name=\"TransactionManagerLookupClass\">\n"
+" org.jboss.cache.DummyTransactionManagerLookup\n"
+" </attribute>\n"
+"\n"
+"<!-- \n"
+"Node locking scheme : \n"
+"PESSIMISTIC (default)\n"
+"OPTIMISTIC \n"
+"-->\n"
+"<attribute name=\"NodeLockingScheme\">PESSIMISTIC</attribute>\n"
+"\n"
+" <!--\n"
+" Node locking isolation level : \n"
+" SERIALIZABLE\n"
+" REPEATABLE_READ (default)\n"
+" READ_COMMITTED\n"
+" READ_UNCOMMITTED\n"
+" NONE\n"
+"\n"
+"(ignored if NodeLockingScheme is OPTIMISTIC)\n"
+" -->\n"
+" <attribute name=\"IsolationLevel\">REPEATABLE_READ</"
+"attribute>\n"
+"\n"
+" <!-- Lock parent before doing node additions/removes -->\n"
+" <attribute name=\"LockParentForChildInsertRemove\">true</"
+"attribute>\n"
+"\n"
+" <!-- Valid modes are LOCAL\n"
+" REPL_ASYNC\n"
+" REPL_SYNC\n"
+" INVALIDATION_ASYNC\n"
+" INVALIDATION_SYNC\n"
+" -->\n"
+" <attribute name=\"CacheMode\">LOCAL</attribute>\n"
+" \n"
+" <!-- Whether each interceptor should have an mbean\n"
+" registered to capture and display its statistics. -->\n"
+" <attribute name=\"UseInterceptorMbeans\">true</attribute>\n"
+"\n"
+" <!-- Name of cluster. Needs to be the same for all TreeCache nodes in "
+"a\n"
+" cluster, in order to find each other -->\n"
+" <attribute name=\"ClusterName\">JBoss-Cache-Cluster</"
+"attribute>\n"
+"\n"
+" <!-- Uncomment next three statements to enable JGroups multiplexer.\n"
+" This configuration is dependent on the JGroups multiplexer being\n"
+" registered in an MBean server such as JBossAS. -->\n"
+" <!--\n"
+" <depends>jgroups.mux:name=Multiplexer</depends>\n"
+" <attribute name=\"MultiplexerService\">jgroups.mux:"
+"name=Multiplexer</attribute>\n"
+" <attribute name=\"MultiplexerStack\">udp</attribute>\n"
+" -->\n"
+"\n"
+" <!-- JGroups protocol stack properties. ClusterConfig isn't used if "
+"the\n"
+" multiplexer is enabled and successfully initialized. -->\n"
+" <attribute name=\"ClusterConfig\">\n"
+" <config>\n"
+" <!-- UDP: if you have a multihomed machine,\n"
+" set the bind_addr attribute to the appropriate NIC IP "
+"address\n"
+" -->\n"
+" <!-- UDP: On Windows machines, because of the media sense "
+"feature\n"
+" being broken with multicast (even after disabling media "
+"sense)\n"
+" set the loopback attribute to true\n"
+" -->\n"
+" <UDP mcast_addr=\"228.1.2.3\" mcast_port=\"45566\" ip_ttl=\"64\" "
+"ip_mcast=\"true\"\n"
+" mcast_send_buf_size=\"150000\" mcast_recv_buf_size=\"80000\" \n"
+" ucast_send_buf_size=\"150000\" ucast_recv_buf_size=\"80000\"\n"
+" loopback=\"false\" />\n"
+" <PING timeout=\"2000\" num_initial_members=\"3\" up_thread=\"false"
+"\" \n"
+" down_thread=\"false\" />\n"
+" <MERGE2 min_interval=\"10000\" max_interval=\"20000\" />\n"
+" <FD shun=\"true\" up_thread=\"true\" down_thread=\"true\" />\n"
+" <VERIFY_SUSPECT timeout=\"1500\" up_thread=\"false\" down_thread="
+"\"false\" />\n"
+" <pbcast.NAKACK gc_lag=\"50\" max_xmit_size=\"8192\" \n"
+" retransmit_timeout=\"600,1200,2400,4800\" up_thread=\"false\"\n"
+" down_thread=\"false\" />\n"
+" <UNICAST timeout=\"600,1200,2400\" window_size=\"100\" "
+"min_threshold=\"10\" \n"
+" down_thread=\"false\" />\n"
+" <pbcast.STABLE desired_avg_gossip=\"20000\" up_thread=\"false\" "
+"down_thread=\"false\" />\n"
+" <FRAG frag_size=\"8192\" down_thread=\"false\" up_thread=\"false"
+"\" />\n"
+" <pbcast.GMS join_timeout=\"5000\" join_retry_timeout=\"2000\" "
+"shun=\"true\" \n"
+" print_local_addr=\"true\" />\n"
+" <pbcast.STATE_TRANSFER up_thread=\"false\" down_thread=\"false\" /"
+">\n"
+" </config>\n"
+" </attribute>\n"
+"\n"
+" <!-- The max amount of time (in milliseconds) we wait until the\n"
+" initial state (ie. the contents of the cache) are retrieved "
+"from\n"
+" existing members in a clustered environment\n"
+" -->\n"
+" <attribute name=\"InitialStateRetrievalTimeout\">5000</"
+"attribute>\n"
+"\n"
+" <!-- Number of milliseconds to wait until all responses for a\n"
+" synchronous call have been received.\n"
+" -->\n"
+" <attribute name=\"SyncReplTimeout\">10000</attribute>\n"
+"\n"
+" <!-- Max number of milliseconds to wait for a lock acquisition --"
+">\n"
+" <attribute name=\"LockAcquisitionTimeout\">15000</"
+"attribute>\n"
+"\n"
+" <!-- Name of the eviction policy class. -->\n"
+" <attribute name=\"EvictionPolicyClass\">org.jboss.cache.eviction."
+"LRUPolicy</attribute>\n"
+"\n"
+" <!-- Specific eviction policy configurations. This is LRU -->\n"
+" <attribute name=\"EvictionPolicyConfig\">\n"
+" <config>\n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</attribute>\n"
+" <!-- Cache wide default -->\n"
+" <region name=\"/_default_\">\n"
+" <attribute name=\"maxNodes\">5000</attribute>\n"
+" <attribute name=\"timeToLiveSeconds\">1000</attribute>\n"
+" <!-- Maximum time an object is kept in cache regardless of idle "
+"time -->\n"
+" <attribute name=\"maxAgeSeconds\">120</attribute>\n"
+" </region>\n"
+"\n"
+" <region name=\"/org/jboss/data\">\n"
+" <attribute name=\"maxNodes\">5000</attribute>\n"
+" <attribute name=\"timeToLiveSeconds\">1000</attribute>\n"
+" </region>\n"
+"\n"
+" <region name=\"/org/jboss/test/data\">\n"
+" <attribute name=\"maxNodes\">5</attribute>\n"
+" <attribute name=\"timeToLiveSeconds\">4</attribute>\n"
+" </region>\n"
+" </config>\n"
+" </attribute>\n"
+"\n"
+" <!-- New 1.3.x cache loader config block -->\n"
+" <attribute name=\"CacheLoaderConfiguration\">\n"
+" <config>\n"
+" <!-- if passivation is true, only the first cache loader "
+"is used; \n"
+" the rest are ignored -->\n"
+" <passivation>false</passivation>\n"
+" <preload>/a/b, /allTempObjects, /some/specific/fqn</"
+"preload>\n"
+" <shared>false</shared>\n"
+"\n"
+" <!-- we can now have multiple cache loaders, which get "
+"chained -->\n"
+" <cacheloader>\n"
+" <class>org.jboss.cache.loader.FileCacheLoader</"
+"class>\n"
+" <!-- same as the old CacheLoaderConfig attribute --"
+">\n"
+" <properties>\n"
+" location=/tmp/myFileStore\n"
+" </properties>\n"
+" <!-- whether the cache loader writes are asynchronous "
+"-->\n"
+" <async>false</async>\n"
+" <!-- only one cache loader in the chain may set \n"
+" fetchPersistentState \n"
+" to true.\n"
+" An exception is thrown if more than one cache "
+"loader \n"
+" sets this to \n"
+" true. -->\n"
+" <fetchPersistentState>true</"
+"fetchPersistentState>\n"
+" <!-- determines whether this cache loader ignores "
+"writes - \n"
+" defaults to \n"
+" false. -->\n"
+" <ignoreModifications>false</"
+"ignoreModifications>\n"
+" <!-- if set to true, purges the contents of this "
+"cache loader \n"
+" when the cache starts up. Defaults to false. --"
+">\n"
+" <purgeOnStartup>false</purgeOnStartup>\n"
+" </cacheloader>\n"
+"\n"
+" <cacheloader>\n"
+" <class>org.jboss.cache.loader.JDBCCacheLoader</"
+"class>\n"
+" <!-- same as the old CacheLoaderConfig attribute --"
+">\n"
+" <properties>\n"
+" cache.jdbc.driver=com.mysql.jdbc.Driver\n"
+" cache.jdbc.url=jdbc:mysql://localhost:3306/jbossdb\n"
+" cache.jdbc.user=root\n"
+" cache.jdbc.password=\n"
+" </properties>\n"
+" <!-- whether the cache loader writes are asynchronous "
+"-->\n"
+" <async>true</async>\n"
+" <!-- only one cache loader in the chain may set "
+"fetchPersistentState\n"
+" to true. An exception is thrown if more than one "
+"cache loader \n"
+" sets this to true. -->\n"
+" <fetchPersistentState>false</"
+"fetchPersistentState>\n"
+" <!-- determines whether this cache loader ignores "
+"writes - defaults \n"
+" to false. -->\n"
+" <ignoreModifications>true</"
+"ignoreModifications>\n"
+" <!-- if set to true, purges the contents of this "
+"cache loader when the \n"
+" cache starts up. Defaults to false. -->\n"
+" <purgeOnStartup>false</purgeOnStartup>\n"
+" </cacheloader>\n"
+"\n"
+" </config>\n"
+" </attribute>\n"
+"\n"
+"\n"
+" </mbean>\n"
+"</server>"
#. Tag: para
#: Configuration.xml:15
@@ -308,43 +562,43 @@
"JBoss Cache from the properties defined in it. Note that this configuration "
"file is used to configure JBoss Cache both as a standalone cache, and as an "
"MBean if run inside the JBoss container."
-msgstr ""
+msgstr "El método PropertyConfigurator.configure() necesita como argumento un nombre de archivo, el cual se encuentra en la ruta de clase; se utilizará para configurar JBoss Cache desde las propiedades definidas en este. Observe que este archivo de configuración se utiliza para configurar JBoss Cache como un caché autónomo y como un MBean si se ejecuta dentro del contenedor JBoss. "
#. Tag: para
#: Configuration.xml:16
#, no-c-format
msgid "We will switch to using an XMBean in a future release."
-msgstr ""
+msgstr "Vamos a cambiar y en lanzamiento futuros vamos a utilizar un XMBean. "
#. Tag: title
#: Configuration.xml:24
#, no-c-format
msgid "Definition of XML attributes"
-msgstr ""
+msgstr "Definición de atributos XML"
#. Tag: para
#: Configuration.xml:25
#, no-c-format
msgid "A list of definitions of each of the XML attributes used above:"
-msgstr ""
+msgstr "Una lista de definiciones de cada uno de los atributos XML utilizados anteriormente:"
#. Tag: para
#: Configuration.xml:32
#, no-c-format
msgid "Name"
-msgstr ""
+msgstr "Nombre"
#. Tag: para
#: Configuration.xml:37
#, no-c-format
msgid "Description"
-msgstr ""
+msgstr "Descripción"
#. Tag: para
#: Configuration.xml:44
#, no-c-format
msgid "BuddyReplicationConfig"
-msgstr ""
+msgstr "BuddyReplicationConfig"
#. Tag: para
#: Configuration.xml:49
@@ -352,13 +606,13 @@
msgid ""
"An XML element that contains detailed buddy replication configuration. See "
"section above on Buddy Replication."
-msgstr ""
+msgstr "Un elemento XML que contiene una configuración detallada de replicación de compañeros. Consulte la sección anterior sobre replicación de compañeros. "
#. Tag: para
#: Configuration.xml:56
#, no-c-format
msgid "CacheLoaderConfiguration"
-msgstr ""
+msgstr "CacheLoaderConfiguration"
#. Tag: para
#: Configuration.xml:61
@@ -366,25 +620,25 @@
msgid ""
"An XML element that contains detailed cache loader configuration. See "
"section above on Cache Loaders."
-msgstr ""
+msgstr "Un elemento XML que contiene una configuración detallada del cargador de caché. Consulte la sección anterior sobre cargadores de caché. "
#. Tag: para
#: Configuration.xml:68
#, no-c-format
msgid "CacheMode"
-msgstr ""
+msgstr "CacheMode"
#. Tag: para
#: Configuration.xml:73
#, no-c-format
msgid "LOCAL, REPL_SYNC, REPL_ASYNC, INVALIDATION_SYNC or INVALIDATION_ASYNC"
-msgstr ""
+msgstr "LOCAL, REPL_SYNC, REPL_ASYNC, INVALIDATION_SYNC or INVALIDATION_ASYNC"
#. Tag: para
#: Configuration.xml:80
#, no-c-format
msgid "ClusterConfig"
-msgstr ""
+msgstr "ClusterConfig"
#. Tag: para
#: Configuration.xml:85
@@ -398,12 +652,17 @@
"<ulink url=\"http://wiki.jboss.org/wiki/Wiki.jsp?page=JGroups\">JGroups wiki "
"page</ulink> for more information."
msgstr ""
+"La configuración de la pila de JGroups subyacente. Se ignora si se utilizan "
+"<literal>MultiplexerService</literal> y <literal>MultiplexerStack</"
+"literal>. Consulte los archivos *-service.xml en la distribución fuente en el folder <literal>etc/META-INF</literal> y allí encontrará ejemplos. Para obtener mayor información refiérase a "
+"<ulink url=\"http://www.jgroups.org\">JGroups documentation</ulink> o a la página wiki de JGroups "
+"<ulink url=\"http://wiki.jboss.org/wiki/Wiki.jsp?page=JGroups\"></ulink> para obtener mayor información."
#. Tag: para
#: Configuration.xml:92
#, no-c-format
msgid "ClusterName"
-msgstr ""
+msgstr "ClusterName"
#. Tag: para
#: Configuration.xml:97
@@ -411,13 +670,13 @@
msgid ""
"Name of cluster. Needs to be the same for all nodes in a cluster in order "
"for them to communicate with each other."
-msgstr ""
+msgstr "Nombre del clúster. Es necesario que sea el mismo para todos los nodos en un clúster para que se puedan comunicar entre ellos."
#. Tag: para
#: Configuration.xml:104
#, no-c-format
msgid "EvictionPolicyClass"
-msgstr ""
+msgstr "EvictionPolicyClass"
#. Tag: para
#: Configuration.xml:109
@@ -426,13 +685,13 @@
"The name of a class implementing EvictionPolicy. Deprecated; it is "
"preferable to configure the eviction policy class as part of the "
"<literal>EvictionPolicyConfig</literal>."
-msgstr ""
+msgstr "El nombre de una clase implementando EvictionPolicy. Ya no se utiliza; es preferible configurar la clase de la política de eliminación como parte de <literal>EvictionPolicyConfig</literal>."
#. Tag: para
#: Configuration.xml:116
#, no-c-format
msgid "EvictionPolicyConfig"
-msgstr ""
+msgstr "EvictionPolicyConfig"
#. Tag: para
#: Configuration.xml:121
@@ -616,8 +875,7 @@
#. Tag: para
#: Configuration.xml:253
#, no-c-format
-msgid ""
-"Max number of elements in the replication queue until replication kicks in."
+msgid "Max number of elements in the replication queue until replication kicks in."
msgstr ""
#. Tag: para
@@ -767,3 +1025,4 @@
"literal>. See the javadocs on the <literal>Option</literal> class for "
"details on these options."
msgstr ""
+
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Eviction_policies.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Eviction_policies.po 2008-10-17 01:49:09 UTC (rev 6977)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Eviction_policies.po 2008-10-17 05:02:31 UTC (rev 6978)
@@ -1,24 +1,26 @@
+# translation of Eviction_policies.po to
# Language /tmp/mike/JBEAP420/Cache translations for JBEAP package.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
# Automatically generated, 2007.
#
msgid ""
msgstr ""
-"Project-Id-Version: JBEAP 420\n"
+"Project-Id-Version: Eviction_policies\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:44+0000\n"
-"PO-Revision-Date: 2001-02-09 01:25+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2008-10-17 12:12+1000\n"
+"Last-Translator: Angela Garcia\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
#: Eviction_policies.xml:5
#, no-c-format
msgid "Eviction Policies"
-msgstr ""
+msgstr "Políticas de eliminación"
#. Tag: para
#: Eviction_policies.xml:6
@@ -139,6 +141,57 @@
"\n"
"}"
msgstr ""
+"public interface EvictionPolicy\n"
+"{\n"
+" /**\n"
+" * Evict a node form the underlying cache.\n"
+" *\n"
+" * @param fqn DataNode corresponds to this fqn.\n"
+" * @throws Exception\n"
+" */\n"
+" void evict(Fqn fqn) throws Exception;\n"
+"\n"
+" /**\n"
+" * Return children names as Objects\n"
+" *\n"
+" * @param fqn\n"
+" * @return Child names under given fqn\n"
+" */\n"
+" Set getChildrenNames(Fqn fqn);\n"
+"\n"
+" /**\n"
+" * Is this a leaf node?\n"
+" *\n"
+" * @param fqn\n"
+" * @return true/false if leaf node.\n"
+" */\n"
+" boolean hasChild(Fqn fqn);\n"
+"\n"
+" Object getCacheData(Fqn fqn, Object key);\n"
+"\n"
+" /**\n"
+" * Method called to configure this implementation.\n"
+" */\n"
+" void configure(TreeCache cache);\n"
+"\n"
+" /**\n"
+" * Get the associated EvictionAlgorithm used by the EvictionPolicy.\n"
+" * <p/>\n"
+" * This relationship should be 1-1.\n"
+" *\n"
+" * @return An EvictionAlgorithm implementation.\n"
+" */\n"
+" EvictionAlgorithm getEvictionAlgorithm();\n"
+"\n"
+" /**\n"
+" * The EvictionConfiguration implementation class used by this "
+"EvictionPolicy.\n"
+" *\n"
+" * @return EvictionConfiguration implementation class.\n"
+" */\n"
+" Class getEvictionConfigurationClass();\n"
+"\n"
+"}"
#. Tag: programlisting
#: Eviction_policies.xml:29
@@ -174,6 +227,35 @@
"\n"
"}"
msgstr ""
+"public interface EvictionAlgorithm\n"
+"{\n"
+" /**\n"
+" * Entry point for evictin algorithm. This is an api called by the "
+"EvictionTimerTask\n"
+" * to process the node events in waiting and actual pruning, if "
+"necessary.\n"
+" *\n"
+" * @param region Region that this algorithm will operate on.\n"
+" */\n"
+" void process(Region region) throws EvictionException;\n"
+"\n"
+" /**\n"
+" * Reset the whole eviction queue. Queue may needs to be reset due to "
+"corrupted state, \n"
+" * for example.\n"
+" *\n"
+" * @param region Region that this algorithm will operate on.\n"
+" */\n"
+" void resetEvictionQueue(Region region);\n"
+"\n"
+" /**\n"
+" * Get the EvictionQueue implementation used by this algorithm.\n"
+" *\n"
+" * @return the EvictionQueue implementation.\n"
+" */\n"
+" EvictionQueue getEvictionQueue();\n"
+"\n"
+"}"
#. Tag: programlisting
#: Eviction_policies.xml:30
@@ -243,6 +325,69 @@
"\n"
"}"
msgstr ""
+"public interface EvictionQueue\n"
+"{\n"
+" /**\n"
+" * Get the first entry in the queue.\n"
+" * <p/>\n"
+" * If there are no entries in queue, this method will return null.\n"
+" * <p/>\n"
+" * The first node returned is expected to be the first node to evict.\n"
+" *\n"
+" * @return first NodeEntry in queue.\n"
+" */\n"
+" public NodeEntry getFirstNodeEntry();\n"
+"\n"
+" /**\n"
+" * Retrieve a node entry by Fqn.\n"
+" * <p/>\n"
+" * This will return null if the entry is not found.\n"
+" *\n"
+" * @param fqn Fqn of the node entry to retrieve.\n"
+" * @return Node Entry object associated with given Fqn param.\n"
+" */\n"
+" public NodeEntry getNodeEntry(Fqn fqn);\n"
+"\n"
+" public NodeEntry getNodeEntry(String fqn);\n"
+"\n"
+" /**\n"
+" * Check if queue contains the given NodeEntry.\n"
+" *\n"
+" * @param entry NodeEntry to check for existence in queue.\n"
+" * @return true/false if NodeEntry exists in queue.\n"
+" */\n"
+" public boolean containsNodeEntry(NodeEntry entry);\n"
+"\n"
+" /**\n"
+" * Remove a NodeEntry from queue.\n"
+" * <p/>\n"
+" * If the NodeEntry does not exist in the queue, this method will return "
+"normally.\n"
+" *\n"
+" * @param entry The NodeEntry to remove from queue.\n"
+" */\n"
+" public void removeNodeEntry(NodeEntry entry);\n"
+"\n"
+" /**\n"
+" * Add a NodeEntry to the queue.\n"
+" *\n"
+" * @param entry The NodeEntry to add to queue.\n"
+" */\n"
+" public void addNodeEntry(NodeEntry entry);\n"
+"\n"
+" /**\n"
+" * Get the size of the queue.\n"
+" *\n"
+" * @return The number of items in the queue.\n"
+" */\n"
+" public int size();\n"
+"\n"
+" /**\n"
+" * Clear the queue.\n"
+" */\n"
+" public void clear();\n"
+"\n"
+"}"
#. Tag: programlisting
#: Eviction_policies.xml:31
@@ -283,13 +428,47 @@
" public void parseXMLConfig(Element element) throws ConfigureException;\n"
"}"
msgstr ""
+"public interface EvictionConfiguration\n"
+"{\n"
+" public static final int WAKEUP_DEFAULT = 5;\n"
+"\n"
+" public static final String ATTR = \"attribute\";\n"
+" public static final String NAME = \"name\";\n"
+"\n"
+" public static final String REGION = \"region\";\n"
+" public static final String WAKEUP_INTERVAL_SECONDS = "
+"\"wakeUpIntervalSeconds\";\n"
+" public static final String MAX_NODES = \"maxNodes\";\n"
+" public static final String TIME_TO_IDLE_SECONDS = \"timeToIdleSeconds\";\n"
+" public static final String TIME_TO_LIVE_SECONDS = \"timeToLiveSeconds\";\n"
+" public static final String MAX_AGE_SECONDS = \"maxAgeSeconds\";\n"
+" public static final String MIN_NODES = \"minNodes\";\n"
+" public static final String REGION_POLICY_CLASS = \"policyClass\";\n"
+"\n"
+" /**\n"
+" * Parse the XML configuration for the given specific eviction region.\n"
+" * <p/>\n"
+" * The element parameter should contain the entire region block. An "
+"example\n"
+" * of an entire Element of the region would be:\n"
+" * <p/>\n"
+" * <region name=\"abc\">\n"
+" * <attribute name=\"maxNodes\">10</attribute>\n"
+" * </region>\n"
+" *\n"
+" * @param element DOM element for the region. <region name=\"abc\">"
+"</region>\n"
+" * @throws ConfigureException\n"
+" */\n"
+" public void parseXMLConfig(Element element) throws ConfigureException;\n"
+"}"
#. Tag: emphasis
#: Eviction_policies.xml:33 Eviction_policies.xml:55 Eviction_policies.xml:66
#: Eviction_policies.xml:77
#, no-c-format
msgid "Note that:"
-msgstr ""
+msgstr "Observe que:"
#. Tag: para
#: Eviction_policies.xml:37
@@ -393,6 +572,72 @@
"\n"
"}"
msgstr ""
+"public abstract class BaseEvictionPolicy implements EvictionPolicy\n"
+"{\n"
+" protected static final Fqn ROOT = new Fqn(\"/\");\n"
+"\n"
+" protected TreeCache cache_;\n"
+"\n"
+" public BaseEvictionPolicy()\n"
+" {\n"
+" }\n"
+"\n"
+" /** EvictionPolicy interface implementation */\n"
+"\n"
+" /**\n"
+" * Evict the node under given Fqn from cache.\n"
+" *\n"
+" * @param fqn The fqn of a node in cache.\n"
+" * @throws Exception\n"
+" */\n"
+" public void evict(Fqn fqn) throws Exception\n"
+" {\n"
+" cache_.evict(fqn);\n"
+" }\n"
+"\n"
+" /**\n"
+" * Return a set of child names under a given Fqn.\n"
+" *\n"
+" * @param fqn Get child names for given Fqn in cache.\n"
+" * @return Set of children name as Objects\n"
+" */\n"
+" public Set getChildrenNames(Fqn fqn)\n"
+" {\n"
+" try\n"
+" {\n"
+" return cache_.getChildrenNames(fqn);\n"
+" }\n"
+" catch (CacheException e)\n"
+" {\n"
+" e.printStackTrace();\n"
+" }\n"
+" return null;\n"
+" }\n"
+"\n"
+" public boolean hasChild(Fqn fqn)\n"
+" {\n"
+" return cache_.hasChild(fqn);\n"
+" }\n"
+"\n"
+" public Object getCacheData(Fqn fqn, Object key)\n"
+" {\n"
+" try\n"
+" {\n"
+" return cache_.get(fqn, key);\n"
+" }\n"
+" catch (CacheException e)\n"
+" {\n"
+" e.printStackTrace();\n"
+" }\n"
+" return null;\n"
+" }\n"
+"\n"
+" public void configure(TreeCache cache)\n"
+" {\n"
+" this.cache_ = cache;\n"
+" }\n"
+"\n"
+"}"
#. Tag: programlisting
#: Eviction_policies.xml:53
@@ -776,6 +1021,383 @@
"\n"
"}"
msgstr ""
+"public abstract class BaseEvictionAlgorithm implements EvictionAlgorithm\n"
+"{\n"
+" private static final Log log = LogFactory.getLog(BaseEvictionAlgorithm."
+"class);\n"
+"\n"
+" protected Region region;\n"
+" protected BoundedBuffer recycleQueue;\n"
+" protected EvictionQueue evictionQueue;\n"
+"\n"
+" /**\n"
+" * This method will create an EvictionQueue implementation and prepare it "
+"for use.\n"
+" *\n"
+" * @param region Region to setup an eviction queue for.\n"
+" * @return The created EvictionQueue to be used as the eviction queue for "
+"this algorithm.\n"
+" * @throws EvictionException\n"
+" * @see EvictionQueue\n"
+" */\n"
+" protected abstract EvictionQueue setupEvictionQueue(Region region) throws "
+"EvictionException;\n"
+"\n"
+" /**\n"
+" * This method will check whether the given node should be evicted or "
+"not.\n"
+" *\n"
+" * @param ne NodeEntry to test eviction for.\n"
+" * @return True if the given node should be evicted. False if the given "
+"node should not \n"
+" * be evicted.\n"
+" */\n"
+" protected abstract boolean shouldEvictNode(NodeEntry ne);\n"
+"\n"
+" protected BaseEvictionAlgorithm()\n"
+" {\n"
+" recycleQueue = new BoundedBuffer();\n"
+" }\n"
+"\n"
+" protected void initialize(Region region) throws EvictionException\n"
+" {\n"
+" this.region = region;\n"
+" evictionQueue = setupEvictionQueue(region);\n"
+" }\n"
+"\n"
+" /**\n"
+" * Process the given region.\n"
+" * <p/>\n"
+" * Eviction Processing encompasses the following:\n"
+" * <p/>\n"
+" * - Add/Remove/Visit Nodes\n"
+" * - Prune according to Eviction Algorithm\n"
+" * - Empty/Retry the recycle queue of previously evicted but locked "
+"(during actual \n"
+" * cache eviction) \n"
+" *nodes.\n"
+" *\n"
+" * @param region Cache region to process for eviction.\n"
+" * @throws EvictionException\n"
+" */\n"
+" public void process(Region region) throws EvictionException\n"
+" {\n"
+" if (this.region == null)\n"
+" {\n"
+" this.initialize(region);\n"
+" }\n"
+"\n"
+" this.processQueues(region);\n"
+" this.emptyRecycleQueue();\n"
+" this.prune();\n"
+" }\n"
+"\n"
+" public void resetEvictionQueue(Region region)\n"
+" {\n"
+" }\n"
+"\n"
+" /**\n"
+" * Get the underlying EvictionQueue implementation.\n"
+" *\n"
+" * @return the EvictionQueue used by this algorithm\n"
+" * @see EvictionQueue\n"
+" */\n"
+" public EvictionQueue getEvictionQueue()\n"
+" {\n"
+" return this.evictionQueue;\n"
+" }\n"
+"\n"
+" /**\n"
+" * Event processing for Evict/Add/Visiting of nodes.\n"
+" * <p/>\n"
+" * - On AddEvents a new element is added into the eviction queue\n"
+" * - On RemoveEvents, the removed element is removed from the eviction "
+"queue.\n"
+" * - On VisitEvents, the visited node has its eviction statistics updated "
+"(idleTime, \n"
+" * numberOfNodeVisists, etc..)\n"
+" *\n"
+" * @param region Cache region to process for eviction.\n"
+" * @throws EvictionException\n"
+" */\n"
+" protected void processQueues(Region region) throws EvictionException\n"
+" {\n"
+" EvictedEventNode node;\n"
+" int count = 0;\n"
+" while ((node = region.takeLastEventNode()) != null)\n"
+" {\n"
+" int eventType = node.getEvent();\n"
+" Fqn fqn = node.getFqn();\n"
+"\n"
+" count++;\n"
+" switch (eventType)\n"
+" {\n"
+" case EvictedEventNode.ADD_EVENT:\n"
+" this.processAddedNodes(fqn);\n"
+" break;\n"
+" case EvictedEventNode.REMOVE_EVENT:\n"
+" this.processRemovedNodes(fqn);\n"
+" break;\n"
+" case EvictedEventNode.VISIT_EVENT:\n"
+" this.processVisitedNodes(fqn);\n"
+" break;\n"
+" default:\n"
+" throw new RuntimeException(\"Illegal Eviction Event type \" + "
+"eventType);\n"
+" }\n"
+" }\n"
+"\n"
+" if (log.isTraceEnabled())\n"
+" {\n"
+" log.trace(\"processed \" + count + \" node events\");\n"
+" }\n"
+"\n"
+" }\n"
+"\n"
+" protected void evict(NodeEntry ne)\n"
+" {\n"
+"// NodeEntry ne = evictionQueue.getNodeEntry(fqn);\n"
+" if (ne != null)\n"
+" {\n"
+" evictionQueue.removeNodeEntry(ne);\n"
+" if (!this.evictCacheNode(ne.getFqn()))\n"
+" {\n"
+" try\n"
+" {\n"
+" recycleQueue.put(ne);\n"
+" }\n"
+" catch (InterruptedException e)\n"
+" {\n"
+" e.printStackTrace();\n"
+" }\n"
+" }\n"
+" }\n"
+" }\n"
+"\n"
+" /**\n"
+" * Evict a node from cache.\n"
+" *\n"
+" * @param fqn node corresponds to this fqn\n"
+" * @return True if successful\n"
+" */\n"
+" protected boolean evictCacheNode(Fqn fqn)\n"
+" {\n"
+" if (log.isTraceEnabled())\n"
+" {\n"
+" log.trace(\"Attempting to evict cache node with fqn of \" + fqn);\n"
+" }\n"
+" EvictionPolicy policy = region.getEvictionPolicy();\n"
+" // Do an eviction of this node\n"
+"\n"
+" try\n"
+" {\n"
+" policy.evict(fqn);\n"
+" }\n"
+" catch (Exception e)\n"
+" {\n"
+" if (e instanceof TimeoutException)\n"
+" {\n"
+" log.warn(\"eviction of \" + fqn + \" timed out. Will retry later."
+"\");\n"
+" return false;\n"
+" }\n"
+" e.printStackTrace();\n"
+" return false;\n"
+" }\n"
+"\n"
+" if (log.isTraceEnabled())\n"
+" {\n"
+" log.trace(\"Eviction of cache node with fqn of \" + fqn + \" "
+"successful\");\n"
+" }\n"
+"\n"
+" return true;\n"
+" }\n"
+"\n"
+" /**\n"
+" * Process an Added cache node.\n"
+" *\n"
+" * @param fqn FQN of the added node.\n"
+" * @throws EvictionException\n"
+" */\n"
+" protected void processAddedNodes(Fqn fqn) throws EvictionException\n"
+" {\n"
+" if (log.isTraceEnabled())\n"
+" {\n"
+" log.trace(\"Adding node \" + fqn + \" to eviction queue\");\n"
+" }\n"
+"\n"
+" long stamp = System.currentTimeMillis();\n"
+" NodeEntry ne = new NodeEntry(fqn);\n"
+" ne.setModifiedTimeStamp(stamp);\n"
+" ne.setNumberOfNodeVisits(1);\n"
+" // add it to the node map and eviction queue\n"
+" if (evictionQueue.containsNodeEntry(ne))\n"
+" {\n"
+" if (log.isTraceEnabled())\n"
+" {\n"
+" log.trace(\"Queue already contains \" + ne.getFqn() + \" "
+"processing it as visited\");\n"
+" }\n"
+" this.processVisitedNodes(ne.getFqn());\n"
+" return;\n"
+" }\n"
+"\n"
+" evictionQueue.addNodeEntry(ne);\n"
+"\n"
+" if (log.isTraceEnabled())\n"
+" {\n"
+" log.trace(ne.getFqn() + \" added successfully to eviction queue"
+"\");\n"
+" }\n"
+" }\n"
+"\n"
+" /**\n"
+" * Remove a node from cache.\n"
+" * \n"
+" * This method will remove the node from the eviction queue as well as\n"
+" * evict the node from cache.\n"
+" * \n"
+" * If a node cannot be removed from cache, this method will remove it "
+"from the\n"
+" * eviction queue and place the element into the recycleQueue. Each node "
+"in the recycle \n"
+" * queue will get retried until proper cache eviction has taken place.\n"
+" * \n"
+" * Because EvictionQueues are collections, when iterating them from an "
+"iterator, use \n"
+" * iterator.remove() to avoid ConcurrentModificationExceptions. Use the "
+"boolean \n"
+" * parameter to indicate the calling context.\n"
+" *\n"
+" * @param fqn FQN of the removed node\n"
+" * @throws EvictionException\n"
+" */\n"
+" protected void processRemovedNodes(Fqn fqn) throws EvictionException\n"
+" {\n"
+" if (log.isTraceEnabled())\n"
+" {\n"
+" log.trace(\"Removing node \" + fqn + \" from eviction queue and "
+"attempting eviction\");\n"
+" }\n"
+"\n"
+" NodeEntry ne = evictionQueue.getNodeEntry(fqn);\n"
+" if (ne != null)\n"
+" {\n"
+" evictionQueue.removeNodeEntry(ne);\n"
+" }\n"
+"\n"
+" if (log.isTraceEnabled())\n"
+" {\n"
+" log.trace(fqn + \" removed from eviction queue\");\n"
+" }\n"
+" }\n"
+"\n"
+" /**\n"
+" * Visit a node in cache.\n"
+" * <p/>\n"
+" * This method will update the numVisits and modifiedTimestamp properties "
+"of the Node.\n"
+" * These properties are used as statistics to determine eviction (LRU, "
+"LFU, MRU, etc..)\n"
+" * <p/>\n"
+" * *Note* that this method updates Node Entries by reference and does not "
+"put them back\n"
+" * into the queue. For some sorted collections, a remove, and a re-add is "
+"required to\n"
+" * maintain the sorted order of the elements.\n"
+" *\n"
+" * @param fqn FQN of the visited node.\n"
+" * @throws EvictionException\n"
+" */\n"
+" protected void processVisitedNodes(Fqn fqn) throws EvictionException\n"
+" {\n"
+" NodeEntry ne = evictionQueue.getNodeEntry(fqn);\n"
+" if (ne == null)\n"
+" {\n"
+" this.processAddedNodes(fqn);\n"
+" return;\n"
+" }\n"
+" // note this method will visit and modify the node statistics by "
+"reference!\n"
+" // if a collection is only guaranteed sort order by adding to the "
+"collection,\n"
+" // this implementation will not guarantee sort order.\n"
+" ne.setNumberOfNodeVisits(ne.getNumberOfNodeVisits() + 1);\n"
+" ne.setModifiedTimeStamp(System.currentTimeMillis());\n"
+" }\n"
+"\n"
+" /**\n"
+" * Empty the Recycle Queue.\n"
+" * <p/>\n"
+" * This method will go through the recycle queue and retry to evict the "
+"nodes from cache.\n"
+" *\n"
+" * @throws EvictionException\n"
+" */\n"
+" protected void emptyRecycleQueue() throws EvictionException\n"
+" {\n"
+" while (true)\n"
+" {\n"
+" Fqn fqn;\n"
+"\n"
+" try\n"
+" {\n"
+" fqn = (Fqn) recycleQueue.poll(0);\n"
+" }\n"
+" catch (InterruptedException e)\n"
+" {\n"
+" e.printStackTrace();\n"
+" break;\n"
+" }\n"
+"\n"
+" if (fqn == null)\n"
+" {\n"
+" if (log.isTraceEnabled())\n"
+" {\n"
+" log.trace(\"Recycle queue is empty\");\n"
+" }\n"
+" break;\n"
+" }\n"
+"\n"
+" if (log.isTraceEnabled())\n"
+" {\n"
+" log.trace(\"emptying recycle bin. Evict node \" + fqn);\n"
+" }\n"
+"\n"
+" // Still doesn't work\n"
+" if (!evictCacheNode(fqn))\n"
+" {\n"
+" try\n"
+" {\n"
+" recycleQueue.put(fqn);\n"
+" }\n"
+" catch (InterruptedException e)\n"
+" {\n"
+" e.printStackTrace();\n"
+" }\n"
+" break;\n"
+" }\n"
+" }\n"
+" }\n"
+"\n"
+" protected void prune() throws EvictionException\n"
+" {\n"
+" NodeEntry entry;\n"
+" while ((entry = evictionQueue.getFirstNodeEntry()) != null)\n"
+" {\n"
+" if (this.shouldEvictNode(entry))\n"
+" {\n"
+" this.evict(entry);\n"
+" }\n"
+" else\n"
+" {\n"
+" break;\n"
+" }\n"
+" }\n"
+" }\n"
+"\n"
+"}"
#. Tag: para
#: Eviction_policies.xml:59
@@ -883,6 +1505,94 @@
"\n"
" }"
msgstr ""
+"public abstract class BaseSortedEvictionAlgorithm extends "
+"BaseEvictionAlgorithm \n"
+" implements EvictionAlgorithm\n"
+" {\n"
+" private static final Log log = LogFactory.getLog"
+"(BaseSortedEvictionAlgorithm.class);\n"
+"\n"
+" public void process(Region region) throws EvictionException\n"
+" {\n"
+" super.process(region);\n"
+" }\n"
+"\n"
+" protected void processQueues(Region region) throws EvictionException\n"
+" {\n"
+" boolean evictionNodesModified = false;\n"
+"\n"
+" EvictedEventNode node;\n"
+" int count = 0;\n"
+" while ((node = region.takeLastEventNode()) != null)\n"
+" {\n"
+" int eventType = node.getEvent();\n"
+" Fqn fqn = node.getFqn();\n"
+"\n"
+" count++;\n"
+" switch (eventType)\n"
+" {\n"
+" case EvictedEventNode.ADD_EVENT:\n"
+" this.processAddedNodes(fqn);\n"
+" evictionNodesModified = true;\n"
+" break;\n"
+" case EvictedEventNode.REMOVE_EVENT:\n"
+" this.processRemovedNodes(fqn);\n"
+" break;\n"
+" case EvictedEventNode.VISIT_EVENT:\n"
+" this.processVisitedNodes(fqn);\n"
+" evictionNodesModified = true;\n"
+" break;\n"
+" default:\n"
+" throw new RuntimeException(\"Illegal Eviction Event type "
+"\" + eventType);\n"
+" }\n"
+" }\n"
+"\n"
+" if (log.isTraceEnabled())\n"
+" {\n"
+" log.trace(\"Eviction nodes visited or added requires resort of "
+"queue \" +\n"
+" evictionNodesModified);\n"
+" }\n"
+"\n"
+" this.resortEvictionQueue(evictionNodesModified);\n"
+"\n"
+"\n"
+" if (log.isTraceEnabled())\n"
+" {\n"
+" log.trace(\"processed \" + count + \" node events\");\n"
+" }\n"
+"\n"
+" }\n"
+"\n"
+" /**\n"
+" * This method is called to resort the queue after add or visit events "
+"have occurred.\n"
+" * \n"
+" * If the parameter is true, the queue needs to be resorted. If it is "
+"false, the queue \n"
+" * does not need resorting.\n"
+" *\n"
+" * @param evictionQueueModified True if the queue was added to or "
+"visisted during event \n"
+" * processing.\n"
+" */\n"
+" protected void resortEvictionQueue(boolean evictionQueueModified)\n"
+" {\n"
+" long begin = System.currentTimeMillis();\n"
+" ((SortedEvictionQueue) evictionQueue).resortEvictionQueue();\n"
+" long end = System.currentTimeMillis();\n"
+"\n"
+" if (log.isTraceEnabled())\n"
+" {\n"
+" long diff = end - begin;\n"
+" log.trace(\"Took \" + diff + \"ms to sort queue with \" + "
+"getEvictionQueue().size()\n"
+" + \" elements\");\n"
+" }\n"
+" }\n"
+"\n"
+" }"
#. Tag: para
#: Eviction_policies.xml:70
@@ -907,6 +1617,13 @@
" public void resortEvictionQueue();\n"
"}"
msgstr ""
+"public interface SortedEvictionQueue extends EvictionQueue\n"
+"{\n"
+" /**\n"
+" * Provide contract to resort a sorted queue.\n"
+" */\n"
+" public void resortEvictionQueue();\n"
+"}"
#. Tag: para
#: Eviction_policies.xml:81
@@ -992,12 +1709,53 @@
" </config>\n"
" </attribute>"
msgstr ""
+"<attribute name=\"EvictionPolicyClass\">org.jboss.cache.eviction."
+"LRUPolicy</attribute>\n"
+" <!-- Specific eviction policy configurations. This is LRU --"
+">\n"
+" <attribute name=\"EvictionPolicyConfig\">\n"
+" <config>\n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</"
+"attribute>\n"
+" <!-- Cache wide default -->\n"
+" <region name=\"/_default_\">\n"
+" <attribute name=\"maxNodes\">5000</"
+"attribute>\n"
+" <attribute name=\"timeToLiveSeconds\">1000</"
+"attribute>\n"
+" </region>\n"
+" <region name=\"/org/jboss/data\">\n"
+" <attribute name=\"maxNodes\">5000</"
+"attribute>\n"
+" <attribute name=\"timeToLiveSeconds\">1000</"
+"attribute>\n"
+" </region>\n"
+" <region name=\"/org/jboss/test/data\">\n"
+" <attribute name=\"maxNodes\">5</attribute>\n"
+" <attribute name=\"timeToLiveSeconds\">4</"
+"attribute>\n"
+" </region>\n"
+" <region name=\"/test/\">\n"
+" <attribute name=\"maxNodes\">10000</"
+"attribute>\n"
+" <attribute name=\"timeToLiveSeconds\">5</"
+"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>\n"
+" </attribute>"
#. Tag: para
#: Eviction_policies.xml:97
#, no-c-format
-msgid ""
-"Here is an example of configuring a different eviction provider per region"
+msgid "Here is an example of configuring a different eviction provider per region"
msgstr ""
#. Tag: programlisting
@@ -1038,6 +1796,39 @@
" </config>\n"
" </attribute>"
msgstr ""
+"<attribute name=\"EvictionPolicyConfig\">\n"
+" <config>\n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</"
+"attribute>\n"
+" <!-- Cache wide default -->\n"
+" <region name=\"/_default_\" policyClass=\"org.jboss.cache."
+"eviction.LRUPolicy\">\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.LFUPolicy\">\n"
+" <attribute name=\"maxNodes\">5000</attribute>\n"
+" <attribute name=\"minNodes\">1000</attribute>\n"
+" </region>\n"
+" <region name=\"/org/jboss/test/data\"\n"
+" policyClass=\"org.jboss.cache.eviction.FIFOPolicy\">\n"
+" <attribute name=\"maxNodes\">5</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/\" policyClass=\"org.jboss.cache."
+"eviction.LRUPolicy\">\n"
+" <attribute name=\"maxNodes\">10000</attribute>\n"
+" <attribute name=\"timeToLiveSeconds\">8</"
+"attribute>\n"
+" <attribute name=\"maxAgeSeconds\">10</attribute>\n"
+" </region>\n"
+" </config>\n"
+" </attribute>"
#. Tag: para
#: Eviction_policies.xml:101
@@ -1082,6 +1873,35 @@
" </config>\n"
" </attribute>"
msgstr ""
+"<attribute name=\"EvictionPolicyClass\">org.jboss.cache.eviction."
+"LRUPolicy</attribute>\n"
+" <!-- Specific eviction policy configurations. This is LRU -->\n"
+" <attribute name=\"EvictionPolicyConfig\">\n"
+" <config>\n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</"
+"attribute>\n"
+" <!-- Cache wide default -->\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>\n"
+" </attribute>"
#. Tag: para
#: Eviction_policies.xml:105
@@ -1111,6 +1931,19 @@
" ((LRUConfiguration)config).setTimeToLiveSeconds(500);\n"
" ((LRUConfiguration)config).setMaxAgeSeconds(1000);"
msgstr ""
+"// note this is just to show that a running TreeCache instance must be\n"
+" // retrieved somehow. How it is implemented is up to the "
+"implementor.\n"
+" TreeCache cache = getRunningTreeCacheInstance();\n"
+"\n"
+" org.jboss.cache.eviction.RegionManager regionManager = cache."
+"getEvictionRegionManager();\n"
+" org.jboss.cache.eviction.Region region = regionManager.getRegion(\"/"
+"myRegionName\");\n"
+" EvictionConfiguation config = region.getEvictionConfiguration();\n"
+" ((LRUConfiguration)config).setMaxNodes(12345);\n"
+" ((LRUConfiguration)config).setTimeToLiveSeconds(500);\n"
+" ((LRUConfiguration)config).setMaxAgeSeconds(1000);"
#. Tag: title
#: Eviction_policies.xml:112
@@ -1281,3 +2114,4 @@
"cache is pruned down to the 10 most frequently used nodes when the eviction "
"timer makes a pass through the eviction algorithm."
msgstr ""
+
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Jboss_integration.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Jboss_integration.po 2008-10-17 01:49:09 UTC (rev 6977)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Jboss_integration.po 2008-10-17 05:02:31 UTC (rev 6978)
@@ -1,18 +1,20 @@
+# translation of Jboss_integration.po to
# Language /tmp/mike/JBEAP420/Cache translations for JBEAP package.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
# Automatically generated, 2007.
#
msgid ""
msgstr ""
-"Project-Id-Version: JBEAP 420\n"
+"Project-Id-Version: Jboss_integration\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:44+0000\n"
-"PO-Revision-Date: 2001-02-09 01:25+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2008-10-17 12:13+1000\n"
+"Last-Translator: Angela Garcia\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
#: Jboss_integration.xml:5
@@ -60,6 +62,11 @@
"\"jboss.cache:service=TreeCache\", server);\n"
"cache.put(\"/a/b/c\", null);"
msgstr ""
+"MBeanServer server=MBeanServerLocator.locateJBoss();\n"
+"TreeCacheMBean cache;\n"
+"cache=(TreeCacheMBean)MBeanProxyExt.create(TreeCacheMBean.class,\n"
+"\"jboss.cache:service=TreeCache\", server);\n"
+"cache.put(\"/a/b/c\", null);"
#. Tag: para
#: Jboss_integration.xml:16
@@ -117,6 +124,31 @@
" <depends>jboss.cache:service=TreeCache</depends>\n"
" </mbean>"
msgstr ""
+"<mbean\n"
+" code=\"org.jboss.invocation.jrmp.server.JRMPProxyFactory\"\n"
+" name=\"mydomain:service=proxyFactory,type=jrmp,target=factory\">\n"
+" <attribute\n"
+" name=\"InvokerName\">jboss:service=invoker,type=jrmp</"
+"attribute>\n"
+" <attribute\n"
+" name=\"TargetName\">jboss.cache:service=TreeCache</"
+"attribute>\n"
+" <attribute name=\"JndiName\">MyCache</attribute> <"
+"attribute\n"
+" name=\"InvokeTargetMethod\">true</attribute> <attribute\n"
+" name=\"ExportedInterface\">org.jboss.cache.TreeCacheMBean</"
+"attribute>\n"
+" <attribute name=\"ClientInterceptors\"> <iterceptors>\n"
+" <interceptor>org.jboss.proxy.ClientMethodInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.proxy.SecurityInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.invocation.InvokerInterceptor</"
+"interceptor>\n"
+" </iterceptors> </attribute>\n"
+" <depends>jboss:service=invoker,type=jrmp</depends>\n"
+" <depends>jboss.cache:service=TreeCache</depends>\n"
+" </mbean>"
#. Tag: para
#: Jboss_integration.xml:24
@@ -128,3 +160,4 @@
"under which the MBean will be bound, and <literal>ExportedInterface</"
"literal> is the interface name of the MBean."
msgstr ""
+
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Replication.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Replication.po 2008-10-17 01:49:09 UTC (rev 6977)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Replication.po 2008-10-17 05:02:31 UTC (rev 6978)
@@ -1,18 +1,20 @@
+# translation of Replication.po to
# Language /tmp/mike/JBEAP420/Cache translations for JBEAP package.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
# Automatically generated, 2007.
#
msgid ""
msgstr ""
-"Project-Id-Version: JBEAP 420\n"
+"Project-Id-Version: Replication\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:44+0000\n"
-"PO-Revision-Date: 2001-02-09 01:25+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2008-10-17 12:13+1000\n"
+"Last-Translator: Angela Garcia\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
#: Replication.xml:5
@@ -447,6 +449,65 @@
"</config>\n"
"</attribute>"
msgstr ""
+"<!-- Buddy Replication config -->\n"
+"<attribute name=\"BuddyReplicationConfig\">\n"
+"<config>\n"
+" \n"
+"<!-- Enables buddy replication. This is the ONLY mandatory configuration "
+"element here. -->\n"
+"<buddyReplicationEnabled>true</buddyReplicationEnabled>\n"
+" \n"
+"<!-- These are the default values anyway -->\n"
+"<buddyLocatorClass>\n"
+" org.jboss.cache.buddyreplication.NextMemberBuddyLocator\n"
+"</buddyLocatorClass>\n"
+" \n"
+"<!-- numBuddies is the number of backup nodes each node maintains. \n"
+"ignoreColocatedBuddies means that each node will *try* to select a buddy on "
+"a different \n"
+"physical host. If not able to do so though, it will fall back to colocated "
+"nodes. -->\n"
+"<buddyLocatorProperties>\n"
+" numBuddies = 1\n"
+" ignoreColocatedBuddies = true\n"
+"</buddyLocatorProperties>\n"
+" \n"
+"<!-- A way to specify a preferred replication group. If specified, we "
+"try to pick a \n"
+"buddy who shares the same pool name (falling back to other buddies if not "
+"available).\n"
+"This allows the sysdmin to hint at backup buddies are picked, so for "
+"example, nodes may be \n"
+"hinted to pick buddies on a different physical rack or power supply for "
+"added fault tolerance. \n"
+"-->\n"
+"<buddyPoolName>myBuddyPoolReplicationGroup</buddyPoolName>\n"
+" \n"
+"<!-- Communication timeout for inter-buddy group organisation messages "
+"(such as assigning \n"
+"to and removing from groups, defaults to 1000. -->\n"
+"<buddyCommunicationTimeout>2000</buddyCommunicationTimeout>\n"
+"\n"
+"<!-- Whether data is removed from old owners when gravitated to a new "
+"owner. \n"
+"Defaults to true. -->\n"
+"<dataGravitationRemoveOnFind>true</dataGravitationRemoveOnFind>\n"
+"\n"
+"<!-- Whether backup nodes can respond to data gravitation requests, or "
+"only the data owner \n"
+"is supposed to respond. Defaults to true. -->\n"
+"<dataGravitationSearchBackupTrees>true</"
+"dataGravitationSearchBackupTrees>\n"
+"\n"
+"<!-- Whether all cache misses result in a data gravitation request. "
+"Defaults to false, \n"
+"requiring callers to enable data gravitation on a per-invocation basis using "
+"the Options API. \n"
+"-->\n"
+"<autoDataGravitation>false</autoDataGravitation>\n"
+"\n"
+"</config>\n"
+"</attribute>"
#. Tag: title
#: Replication.xml:141
@@ -489,3 +550,4 @@
"asynchronous invalidation works in a 'fire-and-forget' mode, where "
"invalidation messages are broadcast but doesn't block and wait for responses."
msgstr ""
+
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/State_transfer.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/State_transfer.po 2008-10-17 01:49:09 UTC (rev 6977)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/State_transfer.po 2008-10-17 05:02:31 UTC (rev 6978)
@@ -1,18 +1,20 @@
+# translation of State_transfer.po to
# Language /tmp/mike/JBEAP420/Cache translations for JBEAP package.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
# Automatically generated, 2007.
#
msgid ""
msgstr ""
-"Project-Id-Version: JBEAP 420\n"
+"Project-Id-Version: State_transfer\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:44+0000\n"
-"PO-Revision-Date: 2001-02-09 01:25+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2008-10-17 12:14+1000\n"
+"Last-Translator: Angela Garcia\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
#: State_transfer.xml:5
@@ -38,8 +40,7 @@
#. Tag: para
#: State_transfer.xml:11
#, no-c-format
-msgid ""
-"The state that is acquired and integrated can consist of two basic types:"
+msgid "The state that is acquired and integrated can consist of two basic types:"
msgstr ""
#. Tag: para
@@ -264,3 +265,4 @@
"activating a region will request partial state from each instance for which "
"it is serving as a backup."
msgstr ""
+
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Transactions.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Transactions.po 2008-10-17 01:49:09 UTC (rev 6977)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Transactions.po 2008-10-17 05:02:31 UTC (rev 6978)
@@ -1,18 +1,20 @@
+# translation of Transactions.po to
# Language /tmp/mike/JBEAP420/Cache translations for JBEAP package.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
# Automatically generated, 2007.
#
msgid ""
msgstr ""
-"Project-Id-Version: JBEAP 420\n"
+"Project-Id-Version: Transactions\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:44+0000\n"
-"PO-Revision-Date: 2001-02-09 01:25+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2008-10-17 12:15+1000\n"
+"Last-Translator: Angela Garcia\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
#: Transactions.xml:5
@@ -168,6 +170,10 @@
" W\n"
" R"
msgstr ""
+"Tx1 Tx2\n"
+" R\n"
+" W\n"
+" R"
#. Tag: para
#: Transactions.xml:53
@@ -312,7 +318,7 @@
#: Transactions.xml:107
#, no-c-format
msgid "Configuration"
-msgstr ""
+msgstr "Configuración"
#. Tag: para
#: Transactions.xml:108
@@ -335,6 +341,14 @@
"<attribute name=\"NodeLockingScheme\">OPTIMISTIC</attribute>\n"
"..."
msgstr ""
+"...\n"
+"<!--\n"
+"Node locking scheme:\n"
+" OPTIMISTIC\n"
+" PESSIMISTIC (default)\n"
+"-->\n"
+"<attribute name=\"NodeLockingScheme\">OPTIMISTIC</attribute>\n"
+"..."
#. Tag: title
#: Transactions.xml:116
@@ -424,6 +438,17 @@
" }\n"
"}"
msgstr ""
+"public class JBossTransactionManagerLookup implements "
+"TransactionManagerLookup {\n"
+"\n"
+" public JBossTransactionManagerLookup() {}\n"
+"\n"
+" public TransactionManager getTransactionManager() throws Exception {\n"
+" Object tmp=new InitialContext().lookup(\"java:/TransactionManager"
+"\");\n"
+" return (TransactionManager)tmp;\n"
+" }\n"
+"}"
#. Tag: para
#: Transactions.xml:148
@@ -502,7 +527,7 @@
#: Transactions.xml:173
#, no-c-format
msgid "Example"
-msgstr ""
+msgstr "Ejemplo"
#. Tag: para
#: Transactions.xml:174
@@ -537,6 +562,26 @@
" try { tx.rollback(); } catch(Throwable t) {}\n"
"}"
msgstr ""
+"Properties prop = new Properties();\n"
+"prop.put(Context.INITIAL_CONTEXT_FACTORY, \"org.jboss.cache.transaction."
+"DummyContextFactory\");\n"
+"User Transaction tx=(UserTransaction)new InitialContext(prop).lookup"
+"(\"UserTransaction\");\n"
+"TreeCache tree = new TreeCache();\n"
+"PropertyConfigurator config = new PropertyConfigurator();\n"
+"config.configure(tree, \"META-INF/replSync-service.xml\");\n"
+"tree.createService(); // not necessary\n"
+"tree.startService(); // kick start tree cache\n"
+"\n"
+"try {\n"
+" tx.begin();\n"
+" tree.put(\"/classes/cs-101\", \"description\", \"the basics\");\n"
+" tree.put(\"/classes/cs-101\", \"teacher\", \"Ben\");\n"
+" tx.commit();\n"
+"}\n"
+"catch(Throwable ex) {\n"
+" try { tx.rollback(); } catch(Throwable t) {}\n"
+"}"
#. Tag: para
#: Transactions.xml:178
@@ -553,6 +598,8 @@
"UserTransaction tx = new DummyUserTransaction(DummyTransactionManager."
"getInstance());"
msgstr ""
+"UserTransaction tx = new DummyUserTransaction(DummyTransactionManager."
+"getInstance());"
#. Tag: para
#: Transactions.xml:184
@@ -577,3 +624,4 @@
"commit protocol applying the modifications to all nodes in the cluster, the "
"transaction is rolled back."
msgstr ""
+
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Treecache_marshaller.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Treecache_marshaller.po 2008-10-17 01:49:09 UTC (rev 6977)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Treecache_marshaller.po 2008-10-17 05:02:31 UTC (rev 6978)
@@ -1,24 +1,26 @@
+# translation of Treecache_marshaller.po to
# Language /tmp/mike/JBEAP420/Cache translations for JBEAP package.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
# Automatically generated, 2007.
#
msgid ""
msgstr ""
-"Project-Id-Version: JBEAP 420\n"
+"Project-Id-Version: Treecache_marshaller\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:44+0000\n"
-"PO-Revision-Date: 2001-02-09 01:25+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2008-10-17 12:17+1000\n"
+"Last-Translator: Angela Garcia\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
#: Treecache_marshaller.xml:5
#, no-c-format
msgid "TreeCacheMarshaller"
-msgstr ""
+msgstr "TreeCacheMarshaller "
#. Tag: para
#: Treecache_marshaller.xml:6
@@ -118,6 +120,57 @@
" */\n"
"void unregisterClassLoader(String fqn) throws RegionNotFoundException;"
msgstr ""
+"/**\n"
+" * Sets whether marshalling uses scoped class loaders on a per region "
+"basis.\n"
+" *\n"
+" * This property must be set to true before any call to\n"
+" * {@link #registerClassLoader(String, ClassLoader)} or\n"
+" * {@link #activateRegion(String)}\n"
+" *\n"
+" * @param isTrue\n"
+" */\n"
+"void setUseRegionBasedMarshalling(boolean isTrue);\n"
+"\n"
+"/**\n"
+" * Gets whether marshalling uses scoped class loaders on a per region "
+"basis.\n"
+" */\n"
+"boolean getUseRegionBasedMarshalling();\n"
+"\n"
+"/**\n"
+" * Registers the given classloader with <code>TreeCacheMarshaller</code> "
+"for\n"
+" * use in unmarshalling replicated objects for the specified region.\n"
+" *\n"
+" * @param fqn The fqn region. This fqn and its children will use this "
+"classloader for \n"
+" * (un)marshalling.\n"
+" * @param cl The class loader to use\n"
+" *\n"
+" * @throws RegionNameConflictException if <code>fqn</code> is a descendant "
+"of\n"
+" * an FQN that already has a classloader registered.\n"
+" * @throws IllegalStateException if <code>useMarshalling</code> is "
+"<code>false</code>\n"
+" */\n"
+"void registerClassLoader(String fqn, ClassLoader cl) throws "
+"RegionNameConflictException;\n"
+"\n"
+"/**\n"
+" * Instructs the <code>TreeCacheMarshaller</code> to no longer use a "
+"special\n"
+" * classloader to unmarshal replicated objects for the specified region.\n"
+" *\n"
+" * @param fqn The fqn of the root node of region.\n"
+" *\n"
+" * @throws RegionNotFoundException if no classloader has been registered "
+"for\n"
+" * <code>fqn</code>.\n"
+" * @throws IllegalStateException if <code>useMarshalling</code> is "
+"<code>false</code>\n"
+" */\n"
+"void unregisterClassLoader(String fqn) throws RegionNotFoundException;"
#. Tag: para
#: Treecache_marshaller.xml:18
@@ -132,9 +185,8 @@
#. Tag: programlisting
#: Treecache_marshaller.xml:21
#, no-c-format
-msgid ""
-"<attribute name=\"UseRegionBasedMarshalling\">true</attribute>"
-msgstr ""
+msgid "<attribute name=\"UseRegionBasedMarshalling\">true</attribute>"
+msgstr "<attribute name=\"UseRegionBasedMarshalling\">true</attribute>"
#. Tag: para
#: Treecache_marshaller.xml:22
@@ -224,8 +276,7 @@
#. Tag: para
#: Treecache_marshaller.xml:55
#, no-c-format
-msgid ""
-"Replication to B fails, as the required classloader is not yet registered."
+msgid "Replication to B fails, as the required classloader is not yet registered."
msgstr ""
#. Tag: para
@@ -351,6 +402,71 @@
"RegionNameConflictException,\n"
"CacheException;"
msgstr ""
+"/**\n"
+" * Sets whether the entire tree is inactive upon startup, only responding\n"
+" * to replication messages after {@link #activateRegion(String)} is\n"
+" * called to activate one or more parts of the tree.\n"
+" * <p>\n"
+" * This property is only relevant if {@link #getUseRegionBasedMarshalling()} "
+"is\n"
+" * <code>true</code>.\n"
+" *\n"
+" */\n"
+"public void setInactiveOnStartup(boolean inactiveOnStartup);\n"
+"\n"
+"/**\n"
+" * Gets whether the entire tree is inactive upon startup, only responding\n"
+" * to replication messages after {@link #activateRegion(String)} is\n"
+" * called to activate one or more parts of the tree.\n"
+" * <p>\n"
+" * This property is only relevant if {@link #getUseRegionBasedMarshalling()} "
+"is\n"
+" * <code>true</code>.\n"
+" */\n"
+"public boolean isInactiveOnStartup();\n"
+"\n"
+"/**\n"
+" * Causes the cache to transfer state for the subtree rooted at\n"
+" * <code>subtreeFqn</code> and to begin accepting replication messages\n"
+" * for that subtree.\n"
+" * \n"
+" * NOTE: This method will cause the creation of a node\n"
+" * in the local tree at <code>subtreeFqn</code> whether or not that\n"
+" * node exists anywhere else in the cluster. If the node does not exist\n"
+" * elsewhere, the local node will be empty. The creation of this node will\n"
+" * not be replicated.\n"
+" *\n"
+" * @param subtreeFqn Fqn string indicating the uppermost node in the\n"
+" * portion of the tree that should be activated.\n"
+" *\n"
+" * @throws RegionNotEmptyException if the node <code>subtreeFqn</code>\n"
+" * exists and has either data or children\n"
+" *\n"
+" * @throws IllegalStateException if useRegionBasedMarshalling is "
+"<code>false</code>\n"
+" */\n"
+"public void activateRegion(String subtreeFqn)\n"
+" throws RegionNotEmptyException, RegionNameConflictException, "
+"CacheException;\n"
+"\n"
+"/**\n"
+" * Causes the cache to stop accepting replication events for the subtree\n"
+" * rooted at <code>subtreeFqn</code> and evict all nodes in that subtree.\n"
+" *\n"
+" * @param subtreeFqn Fqn string indicating the uppermost node in the\n"
+" * portion of the tree that should be activated.\n"
+" * @throws RegionNameConflictException if <code>subtreeFqn</code> indicates\n"
+" * a node that is part of another subtree that is being specially\n"
+" * managed (either by activate/inactiveRegion()\n"
+" * or by registerClassLoader())\n"
+" * @throws CacheException if there is a problem evicting nodes\n"
+" *\n"
+" * @throws IllegalStateException if useRegionBasedMarshalling is "
+"<code>false</code>\n"
+" */\n"
+"public void inactivateRegion(String subtreeFqn) throws "
+"RegionNameConflictException,\n"
+"CacheException;"
#. Tag: para
#: Treecache_marshaller.xml:79
@@ -367,7 +483,7 @@
#: Treecache_marshaller.xml:82
#, no-c-format
msgid "<attribute name=\"InactiveOnStartup\">true</attribute>"
-msgstr ""
+msgstr "<attribute name=\"InactiveOnStartup\">true</attribute>"
#. Tag: para
#: Treecache_marshaller.xml:83
@@ -479,6 +595,33 @@
" </mbean>\n"
"</server>"
msgstr ""
+"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"
+"<server>\n"
+" <classpath codebase=\"./lib\" archives=\"jboss-cache.jar, jgroups.jar"
+"\" />\n"
+"\n"
+" <!-- "
+"==================================================================== --"
+">\n"
+" <!-- Defines TreeCache "
+"configuration -->\n"
+" <!-- "
+"==================================================================== --"
+">\n"
+" <mbean code=\"org.jboss.cache.TreeCache\" name=\"com.xyz.cache:"
+"service=SharedCache\">\n"
+"\n"
+" .......\n"
+"\n"
+" <!-- Configure Marshalling -->\n"
+" <attribute name=\"getUseRegionBasedMarshalling\">true</"
+"attribute>\n"
+" <attribute name=\"InactiveOnStartup\">true</attribute>\n"
+"\n"
+" ........\n"
+"\n"
+" </mbean>\n"
+"</server>"
#. Tag: para
#: Treecache_marshaller.xml:104
@@ -538,6 +681,48 @@
" }\n"
"}"
msgstr ""
+"package example;\n"
+"\n"
+"import javax.management.MalformedObjectNameException;\n"
+"import javax.management.ObjectName;\n"
+"import javax.servlet.ServletContextEvent;\n"
+"import javax.servlet.ServletContextListener;\n"
+"\n"
+"import org.jboss.cache.TreeCacheMBean;\n"
+"import org.jboss.mx.util.MBeanProxyExt;\n"
+"\n"
+"public class ActiveInactiveRegionExample implements ServletContextListener\n"
+"{\n"
+" private TreeCacheMBean cache;\n"
+"\n"
+" public void contextInitialized(ServletContextEvent arg0) {\n"
+" try {\n"
+" findCache();\n"
+"\n"
+" cache.registerClassLoader(\"/example\", Thread.currentThread()."
+"getContextClassLoader());\n"
+" cache.activeRegion(\"/example\");\n"
+" }\n"
+" catch (Exception e) {\n"
+" // ... handle exception\n"
+" }\n"
+"\n"
+" }\n"
+"\n"
+" public void contextDestroyed(ServletContextEvent arg0) {\n"
+" cache.inactivateRegion(\"/example\");\n"
+" cache.unregisterClassLoader(\"/example\");\n"
+" }\n"
+"\n"
+" private void findCache() throws MalformedObjectNameException {\n"
+" // Find the shared cache service in JMX and create a proxy to it\n"
+" ObjectName cacheServiceName_ = new ObjectName(\"com.xyz.cache:"
+"service=SharedCache\");\n"
+" // Create Proxy-Object for this service\n"
+" cache = (TreeCacheMBean) MBeanProxyExt.create(TreeCacheMBean.class, "
+"cacheServiceName_);\n"
+" }\n"
+"}"
#. Tag: para
#: Treecache_marshaller.xml:108
@@ -623,6 +808,45 @@
" */\n"
" void setRegionManager(RegionManager manager);"
msgstr ""
+"/**\n"
+" * Fetch a portion of the state for this cache from secondary storage\n"
+" * (disk, DB) and return it as a byte buffer.\n"
+" * This is for activation of a portion of new cache from a remote cache.\n"
+" * The new cache would then call {@link #storeState(byte[], Fqn)}.\n"
+" *\n"
+" * @param subtree Fqn naming the root (i.e. highest level parent) node "
+"of\n"
+" * the subtree for which state is requested.\n"
+" *\n"
+" * @see org.jboss.cache.TreeCache#activateRegion(String)\n"
+" */\n"
+" byte[] loadState(Fqn subtree) throws Exception;\n"
+"\n"
+" /**\n"
+" * Store the given portion of the cache tree's state in secondary "
+"storage.\n"
+" * Overwrite whatever is currently in secondary storage.\n"
+" *\n"
+" * @param state the state to store\n"
+" * @param subtree Fqn naming the root (i.e. highest level parent) node "
+"of\n"
+" * the subtree included in <code>state</code>.\n"
+" */\n"
+" void storeState(byte[] state, Fqn subtree) throws Exception;\n"
+"\n"
+" /**\n"
+" * Sets the RegionManager this object should use to manage\n"
+" * marshalling/unmarshalling of different regions using different\n"
+" * classloaders.\n"
+" * \n"
+" * NOTE: This method is only intended to be used\n"
+" * by the <code>TreeCache</code> instance this cache loader is\n"
+" * associated with.\n"
+" * \n"
+" *\n"
+" * @param manager the region manager to use, or <code>null</code>.\n"
+" */\n"
+" void setRegionManager(RegionManager manager);"
#. Tag: para
#: Treecache_marshaller.xml:124
@@ -706,3 +930,6 @@
"<!-- takes values such as 1.2.3, 1.2.4 and 1.3.0 -->\n"
"<attribute name=\"ReplicationVersion\">1.2.4</attribute>"
msgstr ""
+"<!-- takes values such as 1.2.3, 1.2.4 and 1.3.0 -->\n"
+"<attribute name=\"ReplicationVersion\">1.2.4</attribute>"
+
16 years
JBoss Cache SVN: r6977 - enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR.
by jbosscache-commits@lists.jboss.org
Author: ldelima(a)redhat.com
Date: 2008-10-16 21:49:09 -0400 (Thu, 16 Oct 2008)
New Revision: 6977
Modified:
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Architecture.po
Log:
proofreading ongoing
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Architecture.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Architecture.po 2008-10-17 01:30:34 UTC (rev 6976)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Architecture.po 2008-10-17 01:49:09 UTC (rev 6977)
@@ -9,7 +9,7 @@
"Project-Id-Version: Architecture\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:57+0000\n"
-"PO-Revision-Date: 2008-10-16 16:05+1000\n"
+"PO-Revision-Date: 2008-10-17 11:40+1000\n"
"Last-Translator: Leticia de Lima <ldelima(a)redhat.com>\n"
"Language-Team: Brazilian Portuguese <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -64,7 +64,7 @@
"level read write. From the perspective of PojoCache, field level "
"interception is the appropriate mechanism to synchronize with the backend "
"cache store. Please note that,"
-msgstr "O JBossAop possui a capacidade de interceptar ambas chamada de nível do método e gravação e leitura de nível do campo. A intercepção do nível de campo é um mecanismo apropriado para sincronizar com o armazenamento do cache backend. Perceba que: "
+msgstr "O JBossAop possui a capacidade de interceptar ambas chamadas de nível do método e gravação e leitura de nível do campo. A intercepção do nível de campo é um mecanismo apropriado para sincronizar o armazenamento do cache backend. Perceba que: "
#. Tag: para
#: Architecture.xml:16
@@ -266,7 +266,7 @@
msgstr ""
"O PojoCache APIs será explicado em maiores detalhes mais a frente. No entanto, perceba a ilustração do mapeamento do objeto pela acessibilidade na seguinte figura. O <literal>/aop/joe</literal> fqn é associado com o POJO <literal>joe</"
"literal>. E, então, sob o fqn, existem três nós children: <literal>addr,"
-"</literal><literal>skills,</literal> e <literal>languages.</literal> Caso você observe na declaração da classe <literal>Person</literal>, você encontrará que o <literal>addr</literal> é uma classe <literal>Address</literal>, o"
+"</literal><literal>skills,</literal> e <literal>languages.</literal> Caso você observe na declaração da classe <literal>Person</literal>, você encontrará que o <literal>addr</literal> é uma classe <literal>Address</literal>, o "
"<literal>skills</literal> é uma <literal>Set</literal> e as "
"<literal>languages</literal> é um tipo de <literal>List</literal>."
@@ -417,7 +417,7 @@
"and update to the original node."
msgstr ""
"Durante o processo de mapeamento, checaremos se qualquer um dos objetos associados é múltiplo ou circular referenciado. O mecanismo de contagem de referência foi implementado em associação com o <literal>CacheInterceptor</"
-"literal>. Caso um novo objeto criado no cache referenciado a outro POJO, um <literal>fqn</literal> referenciado será armazenado e redirecionado qualquer consulta e atualização ao nó original."
+"literal>. Caso um novo objeto criado no cache referenciado a outro POJO, um <literal>fqn</literal> referenciado será armazenado e redirecionado a qualquer consulta e atualização ao nó original."
#. Tag: para
#: Architecture.xml:118
@@ -551,9 +551,9 @@
"literal> and <literal>mary</literal> under cache management as above. Then, "
"we failover to <literal>cache2.</literal> Here is the code snippet:"
msgstr ""
-"Para ilustrações futuras deste gerenciamento da relação, vamos examinar o código Java sob um ambiente replicado. Imagine que temos duas instâncias de cache separadas num cluster (<literal>cache1</literal> and <literal>cache2</"
+"Para ilustrações futuras deste gerenciamento da relação, vamos examinar o código Java sob um ambiente replicado. Imagine que temos duas instâncias de cache separadas num cluster (<literal>cache1</literal> e <literal>cache2</"
"literal>). Na primeira instância de cache colocamos ambos <literal>joe</"
-"literal> e <literal>mary</literal> sob o gerenciamento do cache como acima. E, então falhamos para o <literal>cache2.</literal>. Segue abaixo o trecho do código:"
+"literal> e <literal>mary</literal> sob o gerenciamento do cache como acima. E, então falhamos para o <literal>cache2.</literal> Segue abaixo o trecho do código:"
#. Tag: programlisting
#: Architecture.xml:139
16 years
JBoss Cache SVN: r6976 - enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES.
by jbosscache-commits@lists.jboss.org
Author: mospina
Date: 2008-10-16 21:30:34 -0400 (Thu, 16 Oct 2008)
New Revision: 6976
Modified:
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Mgmt_information.po
Log:
translation in progress
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Mgmt_information.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Mgmt_information.po 2008-10-17 00:02:42 UTC (rev 6975)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Mgmt_information.po 2008-10-17 01:30:34 UTC (rev 6976)
@@ -8,7 +8,7 @@
"Project-Id-Version: Mgmt_information\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:44+0000\n"
-"PO-Revision-Date: 2008-10-17 10:02+1000\n"
+"PO-Revision-Date: 2008-10-17 11:28+1000\n"
"Last-Translator: Angela Garcia\n"
"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -408,97 +408,97 @@
#: Mgmt_information.xml:282
#, no-c-format
msgid "CacheLoaderStores"
-msgstr ""
+msgstr "CacheLoaderStores"
#. Tag: entry
#: Mgmt_information.xml:288
#, no-c-format
msgid "Number of nodes written to the cache loader."
-msgstr ""
+msgstr "Número de nodos escritos en el cargador de caché. "
#. Tag: entry
#: Mgmt_information.xml:293
#, no-c-format
msgid "InvalidationInterceptor"
-msgstr ""
+msgstr "InvalidationInterceptor"
#. Tag: entry
#: Mgmt_information.xml:296
#, no-c-format
msgid "Invalidations"
-msgstr ""
+msgstr "Invalidaciones"
#. Tag: entry
#: Mgmt_information.xml:302
#, no-c-format
msgid "Number of cached nodes that have been invalidated."
-msgstr ""
+msgstr "Número de nodos en caché que han sido invalidados."
#. Tag: entry
#: Mgmt_information.xml:307
#, no-c-format
msgid "PassivationInterceptor"
-msgstr ""
+msgstr "PassivationInterceptor"
#. Tag: entry
#: Mgmt_information.xml:310
#, no-c-format
msgid "Passivations"
-msgstr ""
+msgstr "Pasivos"
#. Tag: entry
#: Mgmt_information.xml:316
#, no-c-format
msgid "Number of cached nodes that have been passivated."
-msgstr ""
+msgstr "Número de nodos en caché que han sido hechos pasivos. "
#. Tag: entry
#: Mgmt_information.xml:321 Mgmt_information.xml:335 Mgmt_information.xml:349
#, no-c-format
msgid "TxInterceptor"
-msgstr ""
+msgstr "TxInterceptor"
#. Tag: entry
#: Mgmt_information.xml:324
#, no-c-format
msgid "Prepares"
-msgstr ""
+msgstr "Prepara"
#. Tag: entry
#: Mgmt_information.xml:330
#, no-c-format
msgid "Number of transaction prepare operations performed by this interceptor."
-msgstr ""
+msgstr "Número de operaciones para preparar una transacción realizadas por este interceptor. "
#. Tag: entry
#: Mgmt_information.xml:338
#, no-c-format
msgid "Commits"
-msgstr ""
+msgstr "Guardar los cambios"
#. Tag: entry
#: Mgmt_information.xml:344
#, no-c-format
msgid "Number of transaction commit operations performed by this interceptor."
-msgstr ""
+msgstr "Número de operaciones para guardar los cambios de una transacción realizadas por este interceptor. "
#. Tag: entry
#: Mgmt_information.xml:352
#, no-c-format
msgid "Rollbacks"
-msgstr ""
+msgstr "Rollbacks"
#. Tag: entry
#: Mgmt_information.xml:358
#, no-c-format
msgid "Number of transaction rollbacks operations performed by this interceptor."
-msgstr ""
+msgstr "Número de operaciones para deshacer transacciones que este interceptor ha realizado."
#. Tag: title
#: Mgmt_information.xml:368
#, no-c-format
msgid "Receiving Cache Notifications"
-msgstr ""
+msgstr "Recepción de notificaciones caché"
#. Tag: para
#: Mgmt_information.xml:369
@@ -511,7 +511,7 @@
"registering a NotificationListener for the CacheMgmtInterceptor MBean. This "
"functionality is only available if cache statistics are enabled as described "
"in the previous section."
-msgstr ""
+msgstr "Los usuarios de JBoss Cache pueden registrar un escucha para recibir eventos caché como se describe en el capítulo de políticas de eliminación. Alternativamente los usuarios pueden utilizar la infraestructura de la información de administración del caché para recibir esos eventos a través de notificaciones JMX. Los eventos caché son accesibles como notificaciones al registrar un NotificationListener para el MBean CacheMgmtInterceptor. Esta funcionalidad sólo está disponible si las estadísticas del caché están habilitadas tal como se describió en la sección anterior. "
#. Tag: para
#: Mgmt_information.xml:372
@@ -522,66 +522,65 @@
"notifications that can be received through the CacheMgmtInterceptor MBean. "
"Each notification represents a single event published by JBoss Cache and "
"provides user data corresponding to the parameters of the event."
-msgstr ""
+msgstr "La siguiente tabla muestra las notificaciones JMX disponibles para JBoss Cache así como los eventos caché a los cuales corresponden. Estas son las notificaciones que se pueden recibir por medio del MBean CacheMgmtInterceptor. Cada notificación representa un sólo evento publicado por JBoss Cache y proporciona datos de usuario correspondientes a los parámetros del evento."
#. Tag: title
#: Mgmt_information.xml:376
#, no-c-format
msgid "JBoss Cache MBean Notifications"
-msgstr ""
+msgstr "Notificaciones MBean JBoss Cache"
#. Tag: entry
#: Mgmt_information.xml:380
#, no-c-format
msgid "Notification Type"
-msgstr ""
+msgstr "Tipo de notificación"
#. Tag: entry
#: Mgmt_information.xml:383
#, no-c-format
msgid "Notification Data"
-msgstr ""
+msgstr "Datos de notificación"
#. Tag: entry
#: Mgmt_information.xml:386
#, no-c-format
msgid "TreeCacheListener Event"
-msgstr ""
+msgstr "Evento TreeCacheListener"
#. Tag: entry
#: Mgmt_information.xml:393
#, no-c-format
msgid "org.jboss.cache.CacheStarted"
-msgstr ""
+msgstr "org.jboss.cache.CacheStarted"
#. Tag: entry
#: Mgmt_information.xml:396 Mgmt_information.xml:407
#, no-c-format
msgid "String : cache service name"
-msgstr ""
+msgstr "String : nombre del servicio caché"
#. Tag: entry
#: Mgmt_information.xml:399
#, no-c-format
msgid "cacheStarted"
-msgstr ""
+msgstr "cacheStarted"
#. Tag: entry
#: Mgmt_information.xml:404
#, no-c-format
msgid "org.jboss.cache.CacheStopped"
-msgstr ""
+msgstr "org.jboss.cache.CacheStopped"
#. Tag: entry
#: Mgmt_information.xml:410
#, no-c-format
msgid "cacheStopped"
-msgstr ""
+msgstr "cacheStopped"
#. Tag: entry
#: Mgmt_information.xml:415
#, no-c-format
-#, fuzzy
msgid "org.jboss.cache.NodeCreated"
msgstr "org.jboss.cache.NodeCreated"
@@ -589,112 +588,96 @@
#: Mgmt_information.xml:418 Mgmt_information.xml:429 Mgmt_information.xml:440
#: Mgmt_information.xml:451 Mgmt_information.xml:462 Mgmt_information.xml:473
#, no-c-format
-#, fuzzy
msgid "String : fqn"
msgstr "String : fqn"
#. Tag: entry
#: Mgmt_information.xml:421
#, no-c-format
-#, fuzzy
msgid "NodeCreated"
msgstr "NodeCreated"
#. Tag: entry
#: Mgmt_information.xml:426
#, no-c-format
-#, fuzzy
msgid "org.jboss.cache.NodeEvicted"
msgstr "org.jboss.cache.NodeEvicted"
#. Tag: entry
#: Mgmt_information.xml:432
#, no-c-format
-#, fuzzy
msgid "NodeEvicted"
msgstr "NodeEvicted"
#. Tag: entry
#: Mgmt_information.xml:437
#, no-c-format
-#, fuzzy
msgid "org.jboss.cache.NodeLoaded"
msgstr "org.jboss.cache.NodeLoaded"
#. Tag: entry
#: Mgmt_information.xml:443
#, no-c-format
-#, fuzzy
msgid "NodeLoaded"
msgstr "NodeLoaded"
#. Tag: entry
#: Mgmt_information.xml:448
#, no-c-format
-#, fuzzy
msgid "org.jboss.cache.NodeModifed"
msgstr "org.jboss.cache.NodeModifed"
#. Tag: entry
#: Mgmt_information.xml:454
#, no-c-format
-#, fuzzy
msgid "NodeModifed"
msgstr "NodeModifed"
#. Tag: entry
#: Mgmt_information.xml:459
#, no-c-format
-#, fuzzy
msgid "org.jboss.cache.NodeRemoved"
msgstr "org.jboss.cache.NodeRemoved"
#. Tag: entry
#: Mgmt_information.xml:465
#, no-c-format
-#, fuzzy
msgid "NodeRemoved"
msgstr "NodeRemoved"
#. Tag: entry
#: Mgmt_information.xml:470
#, no-c-format
-#, fuzzy
msgid "org.jboss.cache.NodeVisited"
msgstr "org.jboss.cache.NodeVisited"
#. Tag: entry
#: Mgmt_information.xml:476
#, no-c-format
-#, fuzzy
msgid "NodeVisited"
msgstr "NodeVisited"
#. Tag: entry
#: Mgmt_information.xml:481
#, no-c-format
-#, fuzzy
msgid "org.jboss.cache.ViewChange"
msgstr "org.jboss.cache.ViewChange"
#. Tag: entry
#: Mgmt_information.xml:484
#, no-c-format
-#, fuzzy
msgid "String : view"
msgstr "String : view"
#. Tag: entry
#: Mgmt_information.xml:487
#, no-c-format
-#, fuzzy
msgid "ViewChange"
msgstr "ViewChange"
#. Tag: entry
#: Mgmt_information.xml:492
#, no-c-format
-#, fuzzy
msgid "org.jboss.cache.NodeActivate:"
msgstr "org.jboss.cache.NodeActivate:"
@@ -702,7 +685,6 @@
#: Mgmt_information.xml:496 Mgmt_information.xml:517 Mgmt_information.xml:538
#: Mgmt_information.xml:564 Mgmt_information.xml:585
#, no-c-format
-#, fuzzy
msgid "Object[0]=String: fqn"
msgstr "Object[0]=String: fqn"
@@ -710,56 +692,48 @@
#: Mgmt_information.xml:501 Mgmt_information.xml:522 Mgmt_information.xml:543
#: Mgmt_information.xml:569 Mgmt_information.xml:590
#, no-c-format
-#, fuzzy
msgid "Object[1]=Boolean: pre"
msgstr "Object[1]=Boolean: pre"
#. Tag: entry
#: Mgmt_information.xml:508
#, no-c-format
-#, fuzzy
msgid "NodeActivate"
msgstr "NodeActivate"
#. Tag: entry
#: Mgmt_information.xml:513
#, no-c-format
-#, fuzzy
msgid "org.jboss.cache.NodeEvict"
msgstr "org.jboss.cache.NodeEvict"
#. Tag: entry
#: Mgmt_information.xml:528
#, no-c-format
-#, fuzzy
msgid "NodeEvict"
msgstr "NodeEvict"
#. Tag: entry
#: Mgmt_information.xml:533
#, no-c-format
-#, fuzzy
msgid "org.jboss.cache.NodeModify"
msgstr "org.jboss.cache.NodeModify"
#. Tag: para
#: Mgmt_information.xml:548 Mgmt_information.xml:595
#, no-c-format
-#, fuzzy
msgid "Object[2]=Boolean: isLocal"
msgstr "Object[2]=Boolean: isLocal"
#. Tag: entry
#: Mgmt_information.xml:554
#, no-c-format
-#, fuzzy
msgid "NodeModify"
msgstr "NodeModify"
#. Tag: entry
#: Mgmt_information.xml:559
#, no-c-format
-#, fuzzy
msgid "org.jboss.cache.NodePassivate"
msgstr "org.jboss.cache.NodePassivate"
@@ -767,19 +741,17 @@
#: Mgmt_information.xml:575
#, no-c-format
msgid "NodePassivate"
-msgstr ""
+msgstr "NodePassivate"
#. Tag: entry
#: Mgmt_information.xml:580
#, no-c-format
-#, fuzzy
msgid "org.jboss.cache.NodeRemove"
msgstr "org.jboss.cache.NodeRemove"
#. Tag: entry
#: Mgmt_information.xml:601
#, no-c-format
-#, fuzzy
msgid "NodeRemove"
msgstr "NodeRemove"
@@ -791,12 +763,11 @@
"notifications when running in a JBoss application server environment. In "
"this example, the client uses a filter to specify which events are of "
"interest."
-msgstr ""
+msgstr "El siguiente es un ejemplo de como recibir programáticamente notificaciones de caché al ejecutar en un entorno del servidor de aplicaciones de JBoss. En este ejemplo, el cliente utiliza un filtro para especificar cuales eventos son de interés. "
#. Tag: programlisting
#: Mgmt_information.xml:611
#, no-c-format
-#, fuzzy
msgid ""
"MyListener listener = new MyListener();\n"
"NotificationFilterSupport filter = null;\n"
@@ -862,12 +833,11 @@
msgid ""
"The following is the simple notification listener implementation used in the "
"previous example."
-msgstr ""
+msgstr "La siguiente es la implementación del escucha de notificaciones utilizado en el ejemplo anterior. "
#. Tag: programlisting
#: Mgmt_information.xml:615
#, no-c-format
-#, fuzzy
msgid ""
"private class MyListener implements NotificationListener, Serializable {\n"
" public void handleNotification(Notification notification, Object "
@@ -929,13 +899,13 @@
"after a client registers to receive MBean notifications. As soon as no "
"clients are registered for notifications, the MBean will remove itself as a "
"cache listener."
-msgstr ""
+msgstr "Nota: La implementación de administración de JBoss Cache sólo escucha eventos caché después de que un cliente se registra para recibir notificaciones MBean. En el momento en que no hayan clientes registrados para notificaciones, el MBean se borrará a sí mismo como un escucha de caché. "
#. Tag: title
#: Mgmt_information.xml:622
#, no-c-format
msgid "Accessing Cache MBeans in a Standalone Environment"
-msgstr ""
+msgstr "Acceso a MBeans Cache en un entorno autónomo"
#. Tag: para
#: Mgmt_information.xml:623
@@ -946,6 +916,8 @@
"Console. Refer to server documentation for instructions on how to access "
"MBeans running in a server's MBean container."
msgstr ""
+"JBoss Cache MBeans son accesibles rápidamente al ejecutar instancias de caché en un servidor de aplicaciones que proporcione una interfaz del servidor MBean tal como JBoss JMX "
+"Console. Consulte la documentación del servidor para obtener instrucciones sobre cómo acceder MBeans ejecutando en el contendor MBean de un servidor. "
#. Tag: para
#: Mgmt_information.xml:626
@@ -954,7 +926,7 @@
"JBoss Cache MBeans are also accessible when running in a non-server "
"environment if the JVM is JDK 5.0 or later. When running a standalone cache "
"in a JDK 5 environment, you can access the cache's MBeans as follows."
-msgstr ""
+msgstr "JBoss Cache MBeans También son accessibles al ejecutar en un entorno que no es servidor si la MVJ es JDK 5.0 o más avanzado. Al ejecutar un caché autónomo en un entorno JDK 5, puede acceder los MBeans del caché como lo puede ver a continuación."
#. Tag: para
#: Mgmt_information.xml:632
@@ -962,7 +934,7 @@
msgid ""
"Set the system property <emphasis>-Dcom.sun.management.jmxremote</emphasis> "
"when starting the JVM where the cache will run."
-msgstr ""
+msgstr "Configure la propiedad del sistema <emphasis>-Dcom.sun.management.jmxremote</emphasis> al iniciar la MVJ en donde ejecutará el caché."
#. Tag: para
#: Mgmt_information.xml:635
@@ -970,7 +942,7 @@
msgid ""
"Once the JVM is running, start the JDK 5 <emphasis>jconsole</emphasis> "
"utility, located in the JDK's /bin directory."
-msgstr ""
+msgstr "Una vez que la MVJ esté ejecutando, inicie la utilidad <emphasis>jconsole</emphasis> de JDK 5, que se encuentra en el directio /bin de JDK."
#. Tag: para
#: Mgmt_information.xml:638
@@ -978,7 +950,7 @@
msgid ""
"When the utility loads, you will be able to select your JVM and connect to "
"it. The JBoss Cache MBeans will be available on the MBeans panel."
-msgstr ""
+msgstr "Cuando la utilidad carga podrá seleccionar su MVJ y podrá conectarse a esta. Los MBeans JBoss Cache estarán disponibles en el panel MBean. "
#. Tag: para
#: Mgmt_information.xml:642
@@ -987,7 +959,7 @@
"Note: The <emphasis>jconsole</emphasis> utility will automatically register "
"as a listener for cache notifications when connected to a JVM running JBoss "
"Cache instances."
-msgstr ""
+msgstr "Nota: La utilidad <emphasis>jconsole</emphasis> registrará automáticamente como escucha de notificaciones caché cuando esté conectado a unaMVJ ejecutando instancias JBoss Cache."
#. Tag: para
#: Mgmt_information.xml:645
@@ -996,10 +968,12 @@
"The following figure shows cache interceptor MBeans in <emphasis>jconsole</"
"emphasis>. Cache statistics are displayed for the CacheMgmt interceptor:"
msgstr ""
+"La siguiente figura muestra MBeans del interceptor caché en <emphasis>jconsole</"
+"emphasis>. Las estadísticas del caché se presentan para el interceptor CacheMgmt:"
#. Tag: title
#: Mgmt_information.xml:649
#, no-c-format
msgid "CacheMgmtInterceptor MBean"
-msgstr ""
+msgstr "MBean CacheMgmtInterceptor"
16 years
JBoss Cache SVN: r6975 - enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES.
by jbosscache-commits@lists.jboss.org
Author: mospina
Date: 2008-10-16 20:02:42 -0400 (Thu, 16 Oct 2008)
New Revision: 6975
Modified:
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Mgmt_information.po
Log:
in progress
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Mgmt_information.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Mgmt_information.po 2008-10-16 21:12:47 UTC (rev 6974)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Tree_Cache_Guide/es-ES/Mgmt_information.po 2008-10-17 00:02:42 UTC (rev 6975)
@@ -1,24 +1,26 @@
+# translation of Mgmt_information.po to
# Language /tmp/mike/JBEAP420/Cache translations for JBEAP package.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
# Automatically generated, 2007.
#
msgid ""
msgstr ""
-"Project-Id-Version: JBEAP 420\n"
+"Project-Id-Version: Mgmt_information\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:44+0000\n"
-"PO-Revision-Date: 2001-02-09 01:25+0100\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
+"PO-Revision-Date: 2008-10-17 10:02+1000\n"
+"Last-Translator: Angela Garcia\n"
+"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
#. Tag: title
#: Mgmt_information.xml:5
#, no-c-format
msgid "Management Information"
-msgstr ""
+msgstr "Información de administración"
#. Tag: para
#: Mgmt_information.xml:6
@@ -28,13 +30,13 @@
"statistics that can be used to analyze cache operations. JBoss Cache can "
"also broadcast cache events as MBean notifications for handling via JMX "
"monitoring tools."
-msgstr ""
+msgstr "JBoss Cache incluye MBeans JMX para exponer funcionalidad de caché y proporcionar estadísticas que se pueden utilizar para analizar operaciones caché. JBoss Cache también puede transmitir eventos caché como notificaciones MBean para manejar por medio de herramientas de monitoreamiento JMX. "
#. Tag: title
#: Mgmt_information.xml:10
#, no-c-format
msgid "JBoss Cache MBeans"
-msgstr ""
+msgstr "MBeans JBoss Cache"
#. Tag: para
#: Mgmt_information.xml:11
@@ -47,6 +49,8 @@
"cache:service=TomcatClusteringCache.\" This MBean can be used to perform "
"most cache operations via JMX."
msgstr ""
+"JBoss Cache proporciona un MBean que permite acceso JMX a una instancia en caché. Este MBean es accesible desde un servidor MBean por medio del nombre del servicio especificado en la configuración de la instancia del caché. Por ejemplo, la instancia del caché en clúster de Tomcat es accesible por medio del servicio llamado \"jboss."
+"cache:service=TomcatClusteringCache.\" Este MBean se puede utilizar para realizar la mayoría de las operaciones caché a través de JMX. "
#. Tag: para
#: Mgmt_information.xml:14
@@ -61,12 +65,14 @@
"\"jboss.cache:service=TomcatClusteringCache,treecache-"
"interceptor=ReplicationInterceptor.\""
msgstr ""
+"JBoss Cache también proporciona MBeans para cada interceptor configurado en la pila del interceptor del caché. Estos MBeans se utilizan para capturar y exponer estadísticas relacionadas con operaciones caché. Están jerárquicamente asociadas con el MBean primario del caché y tienen nombres de servicio que reflejan esta relación. Por ejemplo, un MBean interceptor de replicación para la instancia TomcatClusteringCache será accesible por medio del servicio llamado \"jboss.cache:service=TomcatClusteringCache,treecache-"
+"interceptor=ReplicationInterceptor.\""
#. Tag: title
#: Mgmt_information.xml:20
#, no-c-format
msgid "JBoss Cache Statistics"
-msgstr ""
+msgstr "Estadísticas de JBoss Cache"
#. Tag: para
#: Mgmt_information.xml:21
@@ -77,7 +83,7 @@
"by default; these MBeans can be disabled for a specific cache instance "
"through the <emphasis>UseInterceptorMbeans</emphasis> attribute. See the "
"Configuration chapter for further details on configuration of this attribute."
-msgstr ""
+msgstr "JBoss Cache captura estadísticas en sus interceptores y expone las estadísticas por medio de MBeans interceptoras. Las MBeans interceptoras de cache están habilitadas por defecto; estas MBeans se pueden deshabilitar para una instancia de caché en especifico por medio del atributo <emphasis>UseInterceptorMbeans</emphasis>. Consulte el capítulo sobre configuración para obtener mayores detalles sobre la configuración de este atributo."
#. Tag: para
#: Mgmt_information.xml:24
@@ -91,14 +97,13 @@
"<emphasis>UseInterceptorMbeans</emphasis> configuration setting as this will "
"prevent the CacheMgmtInterceptor from being included in the cache's "
"interceptor stack when the cache is started."
-msgstr ""
+msgstr "Cada MBean del interceptor proporciona un atributo que se puede utilizar para deshabilitar el mantenimiento de estadísticas para ese inteceptor. Observe que la mayoría de las estadísticas las proporciona el MBean CacheMgmtInterceptor así que este interceptor es el más importante con referencia a esto. Si quiere deshabilitar todas las estadísticas por razones de rendimiento entonces debe utilizar la función de configuración <emphasis>UseInterceptorMbeans</emphasis> ya que esto va a prevenir que el CacheMgmtInterceptor sea incluido en la pila de interceptores del caché cuando se inicia el caché. "
#. Tag: para
#: Mgmt_information.xml:27
#, no-c-format
-msgid ""
-"Each interceptor provides the following common operations and attributes."
-msgstr ""
+msgid "Each interceptor provides the following common operations and attributes."
+msgstr "Cada interceptor proporciona los siguientes atributos y operaciones comunes. "
#. Tag: para
#: Mgmt_information.xml:32
@@ -106,13 +111,13 @@
msgid ""
"dumpStatistics - returns a Map containing the interceptor's attributes and "
"values."
-msgstr ""
+msgstr "dumpStatistics - retorna un Map que contiene los atributos y valores del interceptor."
#. Tag: para
#: Mgmt_information.xml:35
#, no-c-format
msgid "resetStatistics - resets all statistics maintained by the interceptor."
-msgstr ""
+msgstr "resetStatistics - reestablece todas las estadísticas que el interceptor mantiene."
#. Tag: para
#: Mgmt_information.xml:38
@@ -120,7 +125,7 @@
msgid ""
"setStatisticsEnabled(boolean) - allows statistics to be disabled for a "
"specific interceptor."
-msgstr ""
+msgstr "setStatisticsEnabled(boolean) - permite deshabilitar las estadísticas para un interceptor en especifico."
#. Tag: para
#: Mgmt_information.xml:41
@@ -129,48 +134,50 @@
"The following table describes the statistics currently available for JBoss "
"Cache."
msgstr ""
+"La siguiente tabla describe las estadísticas actualmente disponibles para JBoss "
+"Cache."
#. Tag: title
#: Mgmt_information.xml:45
#, no-c-format
msgid "JBoss Cache Management Statistics"
-msgstr ""
+msgstr "Estadísticas de administración de JBoss Cache"
#. Tag: entry
#: Mgmt_information.xml:53
#, no-c-format
msgid "MBean Name"
-msgstr ""
+msgstr "Nombre del MBean"
#. Tag: entry
#: Mgmt_information.xml:56
#, no-c-format
msgid "Attribute"
-msgstr ""
+msgstr "Atributo"
#. Tag: entry
#: Mgmt_information.xml:59
#, no-c-format
msgid "Type"
-msgstr ""
+msgstr "Tipo"
#. Tag: entry
#: Mgmt_information.xml:62
#, no-c-format
msgid "Description"
-msgstr ""
+msgstr "Descripción"
#. Tag: entry
#: Mgmt_information.xml:69
#, no-c-format
msgid "ActivationInterceptor"
-msgstr ""
+msgstr "ActivationInterceptor"
#. Tag: entry
#: Mgmt_information.xml:72
#, no-c-format
msgid "Activations"
-msgstr ""
+msgstr "Activaciones"
#. Tag: entry
#: Mgmt_information.xml:75 Mgmt_information.xml:89 Mgmt_information.xml:103
@@ -181,43 +188,43 @@
#: Mgmt_information.xml:341 Mgmt_information.xml:355
#, no-c-format
msgid "long"
-msgstr ""
+msgstr "largo"
#. Tag: entry
#: Mgmt_information.xml:78
#, no-c-format
msgid "Number of passivated nodes that have been activated."
-msgstr ""
+msgstr "Número de nodos pasivos que han sido activados."
#. Tag: entry
#: Mgmt_information.xml:83 Mgmt_information.xml:97
#, no-c-format
msgid "CacheLoaderInterceptor"
-msgstr ""
+msgstr "CacheLoaderInterceptor"
#. Tag: entry
#: Mgmt_information.xml:86
#, no-c-format
msgid "CacheLoaderLoads"
-msgstr ""
+msgstr "CacheLoaderLoads "
#. Tag: entry
#: Mgmt_information.xml:92
#, no-c-format
msgid "Number of nodes loaded through a cache loader."
-msgstr ""
+msgstr "Número de nodos cargados por medio de un cargador de caché. "
#. Tag: entry
#: Mgmt_information.xml:100
#, no-c-format
msgid "CacheLoaderMisses"
-msgstr ""
+msgstr "CacheLoaderMisses"
#. Tag: entry
#: Mgmt_information.xml:106
#, no-c-format
msgid "Number of unsuccessful attempts to load a node through a cache loader."
-msgstr ""
+msgstr "Número de intentos que no han tenido éxito al cargar un nodo por medio de un cargador de caché. "
#. Tag: entry
#: Mgmt_information.xml:111 Mgmt_information.xml:125 Mgmt_information.xml:139
@@ -226,115 +233,115 @@
#: Mgmt_information.xml:237 Mgmt_information.xml:251 Mgmt_information.xml:265
#, no-c-format
msgid "CacheMgmtInterceptor"
-msgstr ""
+msgstr "CacheMgmtInterceptor"
#. Tag: entry
#: Mgmt_information.xml:114
#, no-c-format
msgid "Hits"
-msgstr ""
+msgstr "Hits"
#. Tag: entry
#: Mgmt_information.xml:120
#, no-c-format
msgid "Number of successful attribute retrievals."
-msgstr ""
+msgstr "Número de recuperaciones exitosas de atributos "
#. Tag: entry
#: Mgmt_information.xml:128
#, no-c-format
msgid "Misses"
-msgstr ""
+msgstr "Sin coincidencias"
#. Tag: entry
#: Mgmt_information.xml:134
#, no-c-format
msgid "Number of unsuccessful attribute retrievals."
-msgstr ""
+msgstr "Número de recuperaciones no exitosas de atributos."
#. Tag: entry
#: Mgmt_information.xml:142
#, no-c-format
msgid "Stores"
-msgstr ""
+msgstr "Almacenamientos "
#. Tag: entry
#: Mgmt_information.xml:148
#, no-c-format
msgid "Number of attribute store operations."
-msgstr ""
+msgstr "Número de operaciones de almacenamiento de atributos. "
#. Tag: entry
#: Mgmt_information.xml:156
#, no-c-format
msgid "Evictions"
-msgstr ""
+msgstr "Eliminaciones"
#. Tag: entry
#: Mgmt_information.xml:162
#, no-c-format
msgid "Number of node evictions."
-msgstr ""
+msgstr "Número de elminaciones de nodos. "
#. Tag: entry
#: Mgmt_information.xml:170
#, no-c-format
msgid "NumberOfAttributes"
-msgstr ""
+msgstr "NumberOfAttributes"
#. Tag: entry
#: Mgmt_information.xml:173 Mgmt_information.xml:187
#, no-c-format
msgid "<entry>int</entry>"
-msgstr ""
+msgstr "<entry>int</entry>"
#. Tag: entry
#: Mgmt_information.xml:176
#, no-c-format
msgid "Number of attributes currently cached."
-msgstr ""
+msgstr "Número de atributos actualmente en caché. "
#. Tag: entry
#: Mgmt_information.xml:184
#, no-c-format
msgid "NumberOfNodes"
-msgstr ""
+msgstr "NumberOfNodes"
#. Tag: entry
#: Mgmt_information.xml:190
#, no-c-format
msgid "Number of nodes currently cached."
-msgstr ""
+msgstr "Número de nodos actualmente en caché."
#. Tag: entry
#: Mgmt_information.xml:198
#, no-c-format
msgid "ElapsedTime"
-msgstr ""
+msgstr "ElapsedTime"
#. Tag: entry
#: Mgmt_information.xml:204
#, no-c-format
msgid "Number of seconds that the cache has been running."
-msgstr ""
+msgstr "Número de segundos que el caché ha estado ejecutando. "
#. Tag: entry
#: Mgmt_information.xml:212
#, no-c-format
msgid "TimeSinceReset"
-msgstr ""
+msgstr "TimeSinceReset"
#. Tag: entry
#: Mgmt_information.xml:218
#, no-c-format
msgid "Number of seconds since the cache statistics have been reset."
-msgstr ""
+msgstr "Número de segundos desde que las estadísticas del caché han sido reestablecidas."
#. Tag: entry
#: Mgmt_information.xml:226
#, no-c-format
msgid "AverageReadTime"
-msgstr ""
+msgstr "AverageReadTime"
#. Tag: entry
#: Mgmt_information.xml:232
@@ -342,31 +349,31 @@
msgid ""
"Average time in milliseconds to retrieve a cache attribute, including "
"unsuccessful attribute retrievals."
-msgstr ""
+msgstr "El tiempo promedio en milisegundos para recuperar un atributo caché, incluyendo recuperaciones no exitosas de atributos. "
#. Tag: entry
#: Mgmt_information.xml:240
#, no-c-format
msgid "AverageWriteTime"
-msgstr ""
+msgstr "AverageWriteTime"
#. Tag: entry
#: Mgmt_information.xml:246
#, no-c-format
msgid "Average time in milliseconds to write a cache attribute."
-msgstr ""
+msgstr "El tiempo promedio en milisegundos para escribir un atributo caché. "
#. Tag: entry
#: Mgmt_information.xml:254
#, no-c-format
msgid "HitMissRatio"
-msgstr ""
+msgstr "HitMissRatio"
#. Tag: entry
#: Mgmt_information.xml:257 Mgmt_information.xml:271
#, no-c-format
msgid "double"
-msgstr ""
+msgstr "doble"
#. Tag: entry
#: Mgmt_information.xml:260
@@ -375,13 +382,13 @@
"Ratio of hits to hits and misses. A hit is a get attribute operation that "
"results in an object being returned to the client. The retrieval may be from "
"a cache loader if the entry isn't in the local cache."
-msgstr ""
+msgstr "El radio de hits para los hits y los que no tienen coincidencias. Un hit es una operación del atributo get que hace que un objeto sea retornado al cliente. Puede que la recuperación sea desde un cargador de caché si la entrada no se encuentra en el caché local. "
#. Tag: entry
#: Mgmt_information.xml:268
#, no-c-format
msgid "ReadWriteRatio"
-msgstr ""
+msgstr "ReadWriteRatio"
#. Tag: entry
#: Mgmt_information.xml:274
@@ -389,13 +396,13 @@
msgid ""
"Ratio of read operations to write operations. This is the ratio of cache "
"hits and misses to cache stores."
-msgstr ""
+msgstr "El radio de operaciones de lectura a operaciones de escritura. Este es el radio de hits y de no coincidencias caché en almacenamientos caché. "
#. Tag: entry
#: Mgmt_information.xml:279
#, no-c-format
msgid "CacheStoreInterceptor"
-msgstr ""
+msgstr "CacheStoreInterceptor"
#. Tag: entry
#: Mgmt_information.xml:282
@@ -484,8 +491,7 @@
#. Tag: entry
#: Mgmt_information.xml:358
#, no-c-format
-msgid ""
-"Number of transaction rollbacks operations performed by this interceptor."
+msgid "Number of transaction rollbacks operations performed by this interceptor."
msgstr ""
#. Tag: title
@@ -575,161 +581,187 @@
#. Tag: entry
#: Mgmt_information.xml:415
#, no-c-format
+#, fuzzy
msgid "org.jboss.cache.NodeCreated"
-msgstr ""
+msgstr "org.jboss.cache.NodeCreated"
#. Tag: entry
#: Mgmt_information.xml:418 Mgmt_information.xml:429 Mgmt_information.xml:440
#: Mgmt_information.xml:451 Mgmt_information.xml:462 Mgmt_information.xml:473
#, no-c-format
+#, fuzzy
msgid "String : fqn"
-msgstr ""
+msgstr "String : fqn"
#. Tag: entry
#: Mgmt_information.xml:421
#, no-c-format
+#, fuzzy
msgid "NodeCreated"
-msgstr ""
+msgstr "NodeCreated"
#. Tag: entry
#: Mgmt_information.xml:426
#, no-c-format
+#, fuzzy
msgid "org.jboss.cache.NodeEvicted"
-msgstr ""
+msgstr "org.jboss.cache.NodeEvicted"
#. Tag: entry
#: Mgmt_information.xml:432
#, no-c-format
+#, fuzzy
msgid "NodeEvicted"
-msgstr ""
+msgstr "NodeEvicted"
#. Tag: entry
#: Mgmt_information.xml:437
#, no-c-format
+#, fuzzy
msgid "org.jboss.cache.NodeLoaded"
-msgstr ""
+msgstr "org.jboss.cache.NodeLoaded"
#. Tag: entry
#: Mgmt_information.xml:443
#, no-c-format
+#, fuzzy
msgid "NodeLoaded"
-msgstr ""
+msgstr "NodeLoaded"
#. Tag: entry
#: Mgmt_information.xml:448
#, no-c-format
+#, fuzzy
msgid "org.jboss.cache.NodeModifed"
-msgstr ""
+msgstr "org.jboss.cache.NodeModifed"
#. Tag: entry
#: Mgmt_information.xml:454
#, no-c-format
+#, fuzzy
msgid "NodeModifed"
-msgstr ""
+msgstr "NodeModifed"
#. Tag: entry
#: Mgmt_information.xml:459
#, no-c-format
+#, fuzzy
msgid "org.jboss.cache.NodeRemoved"
-msgstr ""
+msgstr "org.jboss.cache.NodeRemoved"
#. Tag: entry
#: Mgmt_information.xml:465
#, no-c-format
+#, fuzzy
msgid "NodeRemoved"
-msgstr ""
+msgstr "NodeRemoved"
#. Tag: entry
#: Mgmt_information.xml:470
#, no-c-format
+#, fuzzy
msgid "org.jboss.cache.NodeVisited"
-msgstr ""
+msgstr "org.jboss.cache.NodeVisited"
#. Tag: entry
#: Mgmt_information.xml:476
#, no-c-format
+#, fuzzy
msgid "NodeVisited"
-msgstr ""
+msgstr "NodeVisited"
#. Tag: entry
#: Mgmt_information.xml:481
#, no-c-format
+#, fuzzy
msgid "org.jboss.cache.ViewChange"
-msgstr ""
+msgstr "org.jboss.cache.ViewChange"
#. Tag: entry
#: Mgmt_information.xml:484
#, no-c-format
+#, fuzzy
msgid "String : view"
-msgstr ""
+msgstr "String : view"
#. Tag: entry
#: Mgmt_information.xml:487
#, no-c-format
+#, fuzzy
msgid "ViewChange"
-msgstr ""
+msgstr "ViewChange"
#. Tag: entry
#: Mgmt_information.xml:492
#, no-c-format
+#, fuzzy
msgid "org.jboss.cache.NodeActivate:"
-msgstr ""
+msgstr "org.jboss.cache.NodeActivate:"
#. Tag: para
#: Mgmt_information.xml:496 Mgmt_information.xml:517 Mgmt_information.xml:538
#: Mgmt_information.xml:564 Mgmt_information.xml:585
#, no-c-format
+#, fuzzy
msgid "Object[0]=String: fqn"
-msgstr ""
+msgstr "Object[0]=String: fqn"
#. Tag: para
#: Mgmt_information.xml:501 Mgmt_information.xml:522 Mgmt_information.xml:543
#: Mgmt_information.xml:569 Mgmt_information.xml:590
#, no-c-format
+#, fuzzy
msgid "Object[1]=Boolean: pre"
-msgstr ""
+msgstr "Object[1]=Boolean: pre"
#. Tag: entry
#: Mgmt_information.xml:508
#, no-c-format
+#, fuzzy
msgid "NodeActivate"
-msgstr ""
+msgstr "NodeActivate"
#. Tag: entry
#: Mgmt_information.xml:513
#, no-c-format
+#, fuzzy
msgid "org.jboss.cache.NodeEvict"
-msgstr ""
+msgstr "org.jboss.cache.NodeEvict"
#. Tag: entry
#: Mgmt_information.xml:528
#, no-c-format
+#, fuzzy
msgid "NodeEvict"
-msgstr ""
+msgstr "NodeEvict"
#. Tag: entry
#: Mgmt_information.xml:533
#, no-c-format
+#, fuzzy
msgid "org.jboss.cache.NodeModify"
-msgstr ""
+msgstr "org.jboss.cache.NodeModify"
#. Tag: para
#: Mgmt_information.xml:548 Mgmt_information.xml:595
#, no-c-format
+#, fuzzy
msgid "Object[2]=Boolean: isLocal"
-msgstr ""
+msgstr "Object[2]=Boolean: isLocal"
#. Tag: entry
#: Mgmt_information.xml:554
#, no-c-format
+#, fuzzy
msgid "NodeModify"
-msgstr ""
+msgstr "NodeModify"
#. Tag: entry
#: Mgmt_information.xml:559
#, no-c-format
+#, fuzzy
msgid "org.jboss.cache.NodePassivate"
-msgstr ""
+msgstr "org.jboss.cache.NodePassivate"
#. Tag: entry
#: Mgmt_information.xml:575
@@ -740,14 +772,16 @@
#. Tag: entry
#: Mgmt_information.xml:580
#, no-c-format
+#, fuzzy
msgid "org.jboss.cache.NodeRemove"
-msgstr ""
+msgstr "org.jboss.cache.NodeRemove"
#. Tag: entry
#: Mgmt_information.xml:601
#, no-c-format
+#, fuzzy
msgid "NodeRemove"
-msgstr ""
+msgstr "NodeRemove"
#. Tag: para
#: Mgmt_information.xml:608
@@ -762,6 +796,7 @@
#. Tag: programlisting
#: Mgmt_information.xml:611
#, no-c-format
+#, fuzzy
msgid ""
"MyListener listener = new MyListener();\n"
"NotificationFilterSupport filter = null;\n"
@@ -792,6 +827,34 @@
"// on completion of processing, unregister the listener\n"
"server.removeNotificationListener(mgmt_name, listener, filter, null);"
msgstr ""
+"MyListener listener = new MyListener();\n"
+"NotificationFilterSupport filter = null;\n"
+" \n"
+"// get reference to MBean server\n"
+"Context ic = new InitialContext();\n"
+"MBeanServerConnection server = (MBeanServerConnection)ic.lookup(\"jmx/"
+"invoker/RMIAdaptor\");\n"
+" \n"
+"// get reference to CacheMgmtInterceptor MBean\n"
+"String cache_service = \"jboss.cache:service=TomcatClusteringCache\";\n"
+"String mgmt_service = cache_service + \",treecache-"
+"interceptor=CacheMgmtInterceptor\";\n"
+"ObjectName mgmt_name = new ObjectName(mgmt_service);\n"
+" \n"
+"// configure a filter to only receive node created and removed events\n"
+"filter = new NotificationFilterSupport();\n"
+"filter.disableAllTypes();\n"
+"filter.enableType(CacheMgmtInterceptor.NOTIF_NODE_CREATED);\n"
+"filter.enableType(CacheMgmtInterceptor.NOTIF_NODE_REMOVED);\n"
+" \n"
+"// register the listener with a filter\n"
+"// leave the filter null to receive all cache events\n"
+"server.addNotificationListener(mgmt_name, listener, filter, null);\n"
+" \n"
+"// ...\n"
+" \n"
+"// on completion of processing, unregister the listener\n"
+"server.removeNotificationListener(mgmt_name, listener, filter, null);"
#. Tag: para
#: Mgmt_information.xml:612
@@ -804,6 +867,7 @@
#. Tag: programlisting
#: Mgmt_information.xml:615
#, no-c-format
+#, fuzzy
msgid ""
"private class MyListener implements NotificationListener, Serializable {\n"
" public void handleNotification(Notification notification, Object "
@@ -831,6 +895,31 @@
" }\n"
"}"
msgstr ""
+"private class MyListener implements NotificationListener, Serializable {\n"
+" public void handleNotification(Notification notification, Object "
+"handback) {\n"
+" String message = notification.getMessage();\n"
+" String type = notification.getType();\n"
+" Object userData = notification.getUserData();\n"
+" System.out.println(type + \": \"+message);\n"
+" if (userData == null) {\n"
+" System.out.println(\"notification data is null\");\n"
+" }\n"
+" else if (userData instanceof String) {\n"
+" System.out.println(\"notification data: \"+(String)userData);\n"
+" }\n"
+" else if (userData instanceof Object[]) {\n"
+" Object[] ud = (Object[])userData;\n"
+" for (int i = 0; i > ud.length; i++) {\n"
+" System.out.println(\"notification data: \"+ud[i].toString());\n"
+" }\n"
+" }\n"
+" else {\n"
+" System.out.println(\"notification data class: \" + userData.getClass"
+"().getName());\n"
+" }\n"
+" }\n"
+"}"
#. Tag: para
#: Mgmt_information.xml:616
@@ -913,3 +1002,4 @@
#, no-c-format
msgid "CacheMgmtInterceptor MBean"
msgstr ""
+
16 years
JBoss Cache SVN: r6974 - in core/branches/flat/src: main/java/org/jboss/starobrno/interceptors and 6 other directories.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-10-16 17:12:47 -0400 (Thu, 16 Oct 2008)
New Revision: 6974
Added:
core/branches/flat/src/test/java/org/jboss/starobrno/replication/
core/branches/flat/src/test/java/org/jboss/starobrno/replication/AsyncReplTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/replication/ExceptionTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/replication/ReplicationExceptionTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncCacheListenerTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncReplTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/util/internals/ReplicationListener.java
Modified:
core/branches/flat/src/main/java/org/jboss/starobrno/CacheDelegate.java
core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/CallInterceptor.java
core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/base/BaseRpcInterceptor.java
core/branches/flat/src/main/java/org/jboss/starobrno/marshall/CommandAwareRpcDispatcher.java
core/branches/flat/src/test/java/org/jboss/starobrno/util/TestingUtil.java
Log:
added replication tests
Modified: core/branches/flat/src/main/java/org/jboss/starobrno/CacheDelegate.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/CacheDelegate.java 2008-10-16 06:10:36 UTC (rev 6973)
+++ core/branches/flat/src/main/java/org/jboss/starobrno/CacheDelegate.java 2008-10-16 21:12:47 UTC (rev 6974)
@@ -74,7 +74,6 @@
protected TransactionManager transactionManager;
protected RPCManager rpcManager;
-
@Inject
private void injectDependencies(InvocationContextContainer invocationContextContainer,
CommandsFactory commandsFactory,
@@ -252,47 +251,47 @@
public List<CommandInterceptor> getInterceptorChain()
{
- return null; //TODO: Autogenerated. Implement me properly
+ throw new IllegalStateException();//todo Implement me properly
}
public Marshaller getMarshaller()
{
- return null; //TODO: Autogenerated. Implement me properly
+ throw new IllegalStateException();//todo Implement me properly
}
public void addInterceptor(CommandInterceptor i, int position)
{
- //TODO: Autogenerated. Implement me properly
+ throw new IllegalStateException();//todo Implement me properly
}
public void addInterceptor(CommandInterceptor i, Class<? extends CommandInterceptor> afterInterceptor)
{
- //TODO: Autogenerated. Implement me properly
+ throw new IllegalStateException();//todo Implement me properly
}
public void removeInterceptor(int position)
{
- //TODO: Autogenerated. Implement me properly
+ throw new IllegalStateException();//todo Implement me properly
}
public void removeInterceptor(Class<? extends CommandInterceptor> interceptorType)
{
- //TODO: Autogenerated. Implement me properly
+ throw new IllegalStateException();//todo Implement me properly
}
public CacheLoaderManager getCacheLoaderManager()
{
- return null; //TODO: Autogenerated. Implement me properly
+ throw new IllegalStateException();//todo Implement me properly
}
public BuddyManager getBuddyManager()
{
- return null; //TODO: Autogenerated. Implement me properly
+ throw new IllegalStateException();//todo Implement me properly
}
public TransactionTable getTransactionTable()
{
- return null; //TODO: Autogenerated. Implement me properly
+ throw new IllegalStateException();//todo Implement me properly
}
public RPCManager getRPCManager()
@@ -302,32 +301,32 @@
public StateTransferManager getStateTransferManager()
{
- return null; //TODO: Autogenerated. Implement me properly
+ throw new IllegalStateException();//todo Implement me properly
}
public Notifier getNotifier()
{
- return null; //TODO: Autogenerated. Implement me properly
+ return notifier;
}
public String getClusterName()
{
- return null; //TODO: Autogenerated. Implement me properly
+ throw new IllegalStateException();//todo Implement me properly
}
public GlobalTransaction getCurrentTransaction(Transaction tx, boolean createIfNotExists)
{
- return null; //TODO: Autogenerated. Implement me properly
+ throw new IllegalStateException();//todo Implement me properly
}
public GlobalTransaction getCurrentTransaction()
{
- return null; //TODO: Autogenerated. Implement me properly
+ throw new IllegalStateException();//todo Implement me properly
}
public GravitateResult gravitateData(K key, boolean searchBuddyBackupSubtrees, InvocationContext ctx)
{
- return null; //TODO: Autogenerated. Implement me properly
+ throw new IllegalStateException();//todo Implement me properly
}
public ComponentRegistry getComponentRegistry()
Modified: core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/CallInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/CallInterceptor.java 2008-10-16 06:10:36 UTC (rev 6973)
+++ core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/CallInterceptor.java 2008-10-16 21:12:47 UTC (rev 6974)
@@ -50,14 +50,6 @@
*/
public class CallInterceptor extends CommandInterceptor
{
- private boolean notOptimisticLocking;
-
- @Start
- protected void start()
- {
- notOptimisticLocking = false;
- }
-
@Override
public Object visitPrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
{
@@ -135,7 +127,7 @@
throws Throwable
{
Object result = invokeCommand(ctx, command);
- if (notOptimisticLocking && ctx.isValidTransaction())
+ if (ctx.isValidTransaction())
{
GlobalTransaction gtx = ctx.getGlobalTransaction();
if (gtx == null)
Modified: core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/base/BaseRpcInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/base/BaseRpcInterceptor.java 2008-10-16 06:10:36 UTC (rev 6973)
+++ core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/base/BaseRpcInterceptor.java 2008-10-16 21:12:47 UTC (rev 6974)
@@ -40,7 +40,6 @@
/**
* Acts as a base for all RPC calls - subclassed by
- * {@link org.jboss.cache.interceptors.ReplicationInterceptor} and {@link OptimisticReplicationInterceptor}.
*
* @author <a href="mailto:manik@jboss.org">Manik Surtani (manik(a)jboss.org)</a>
*/
Modified: core/branches/flat/src/main/java/org/jboss/starobrno/marshall/CommandAwareRpcDispatcher.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/marshall/CommandAwareRpcDispatcher.java 2008-10-16 06:10:36 UTC (rev 6973)
+++ core/branches/flat/src/main/java/org/jboss/starobrno/marshall/CommandAwareRpcDispatcher.java 2008-10-16 21:12:47 UTC (rev 6974)
@@ -287,7 +287,8 @@
// JGroups supports http://jira.jboss.com/jira/browse/JGRP-193
// the serialization problem could be on the remote end and this is why we cannot catch this above, when marshalling.
if (retval == null)
- throw new NotSerializableException("RpcDispatcher returned a null. This is most often caused by args for " + command.getClass().getSimpleName() + " not being serializable.");
+ throw new NotSerializableException("RpcDispatcher returned a null. This is most often caused by args for "
+ + command.getClass().getSimpleName() + " not being serializable.");
return retval;
}
}
Added: core/branches/flat/src/test/java/org/jboss/starobrno/replication/AsyncReplTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/replication/AsyncReplTest.java (rev 0)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/replication/AsyncReplTest.java 2008-10-16 21:12:47 UTC (rev 6974)
@@ -0,0 +1,232 @@
+/*
+ *
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+
+package org.jboss.starobrno.replication;
+
+import org.jboss.cache.Fqn;
+import org.jboss.cache.transaction.DummyTransactionManagerLookup;
+import static org.testng.AssertJUnit.*;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import javax.transaction.TransactionManager;
+import org.jboss.starobrno.CacheSPI;
+import org.jboss.starobrno.Cache;
+import org.jboss.starobrno.manager.CacheManager;
+import org.jboss.starobrno.config.Configuration;
+import org.jboss.starobrno.util.internals.ReplicationListener;
+import org.jboss.starobrno.util.TestingUtil;
+
+/**
+ * Unit test for replicated async CacheSPI. Use locking and multiple threads to test
+ * concurrent access to the tree.
+ */
+@Test(groups = {"functional", "jgroups"})
+public class AsyncReplTest
+{
+ private Configuration configuration;
+
+ private class AsyncReplTestTL {
+ private CacheSPI<Object, Object> cache1, cache2;
+ private CacheManager cacheManager1, cacheManager2;
+ private ReplicationListener replListener1, replListener2;
+ }
+
+ private ThreadLocal<AsyncReplTestTL> threadLocal = new ThreadLocal<AsyncReplTestTL>();
+
+ @BeforeMethod(alwaysRun = true)
+ public void setUp() throws Exception
+ {
+ AsyncReplTestTL tl = new AsyncReplTestTL();
+ threadLocal.set(tl);
+
+ configuration = new Configuration();
+ configuration.setCacheMode(Configuration.CacheMode.REPL_ASYNC);
+ configuration.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
+
+ log("creating cache1");
+ tl.cacheManager1 = new CacheManager(configuration);
+ tl.cache1 = (CacheSPI) tl.cacheManager1.createCache("testCache");
+ tl.replListener1 = new ReplicationListener(tl.cache1);
+
+ log("creating cache2");
+ tl.cacheManager2 = new CacheManager(configuration);
+ tl.cache2 = (CacheSPI) tl.cacheManager2.createCache("testCache");
+ tl.replListener2 = new ReplicationListener(tl.cache2);
+ }
+
+ /**
+ * Provides a hook for multiplexer integration. This default implementation
+ * is a no-op; subclasses that test mux integration would override
+ * to integrate the given cache with a multiplexer.
+ * <p/>
+ * param cache a cache that has been configured but not yet created.
+ */
+ protected void configureMultiplexer(Cache cache) throws Exception
+ {
+ // default does nothing
+ }
+
+ /**
+ * Provides a hook to check that the cache's channel came from the
+ * multiplexer, or not, as expected. This default impl asserts that
+ * the channel did not come from the multiplexer.
+ *
+ * @param cache a cache that has already been started
+ */
+ protected void validateMultiplexer(Cache cache)
+ {
+ assertFalse("Cache is not using multiplexer", cache.getConfiguration().isUsingMultiplexer());
+ }
+
+ @AfterMethod(alwaysRun = true)
+ public void tearDown() throws Exception
+ {
+ AsyncReplTestTL tl = threadLocal.get();
+ TestingUtil.killCaches(tl.cache1, tl.cache2);
+ threadLocal.set(null);
+ }
+
+ public void testTxCompletion() throws Exception
+ {
+ AsyncReplTestTL tl = threadLocal.get();
+ CacheSPI<Object, Object> cache1 = tl.cache1;
+ CacheSPI<Object, Object> cache2 = tl.cache2;
+ ReplicationListener replListener1 = tl.replListener1;
+ ReplicationListener replListener2 = tl.replListener2;
+
+ String key = "key";
+
+ replListener2.expectAny();
+ cache1.put(key, "value1");
+ // allow for replication
+ replListener2.waitForReplicationToOccur(500);
+ assertEquals("value1", cache1.get( key));
+ assertEquals("value1", cache2.get(key));
+
+ TransactionManager mgr = cache1.getTransactionManager();
+ mgr.begin();
+
+ replListener2.expectAny();
+ cache1.put(key, "value2");
+ assertEquals("value2", cache1.get(key));
+ assertEquals("value1", cache2.get(key));
+
+ mgr.commit();
+
+ replListener2.waitForReplicationToOccur(500);
+
+ assertEquals("value2", cache1.get(key));
+ assertEquals("value2", cache2.get(key));
+
+ mgr.begin();
+ cache1.put(key, "value3");
+ assertEquals("value3", cache1.get(key));
+ assertEquals("value2", cache2.get(key));
+
+ mgr.rollback();
+
+ assertEquals("value2", cache1.get(key));
+ assertEquals("value2", cache2.get(key));
+ }
+
+ public void testPutShouldNotReplicateToDifferentCluster()
+ {
+ AsyncReplTestTL tl = threadLocal.get();
+ CacheSPI<Object, Object> cache1 = tl.cache1;
+ CacheSPI<Object, Object> cache2 = tl.cache2;
+ ReplicationListener replListener1 = tl.replListener1;
+ ReplicationListener replListener2 = tl.replListener2;
+
+ CacheSPI<Object, Object> cache3 = null, cache4 = null;
+ try
+ {
+ configuration.setClusterName("otherTest");
+ cache3 = (CacheSPI<Object, Object>) new CacheManager(configuration).createCache("testCache");
+ cache4 = (CacheSPI<Object, Object>) new CacheManager(configuration).createCache("testCache");
+ replListener2.expectAny();
+ cache1.put("age", 38);
+ // because we use async repl, modfication may not yet have been propagated to cache2, so
+ // we have to wait a little
+ replListener2.waitForReplicationToOccur(500);
+ assertNull("Should not have replicated", cache3.get("age"));
+ }
+ catch (Exception e)
+ {
+ fail(e.toString());
+ }
+ finally
+ {
+ if (cache3 != null)
+ {
+ cache3.stop();
+ }
+ if (cache4 != null)
+ {
+ cache4.stop();
+ }
+ }
+ }
+
+ public void testAsyncReplDelay()
+ {
+ Integer age;
+ AsyncReplTestTL tl = threadLocal.get();
+ CacheSPI<Object, Object> cache1 = tl.cache1;
+ CacheSPI<Object, Object> cache2 = tl.cache2;
+ ReplicationListener replListener1 = tl.replListener1;
+ ReplicationListener replListener2 = tl.replListener2;
+
+ try
+ {
+ cache1.put("age", 38);
+
+ // value on cache2 may be 38 or not yet replicated
+ age = (Integer) cache2.get("age");
+ log("attr \"age\" of \"/a/b/c\" on cache2=" + age);
+ assertTrue("should be either null or 38", age == null || age == 38);
+ }
+ catch (Exception e)
+ {
+ fail(e.toString());
+ }
+ }
+
+ public void testAsyncReplTxDelay()
+ {
+ Integer age;
+ AsyncReplTestTL tl = threadLocal.get();
+ CacheSPI<Object, Object> cache1 = tl.cache1;
+ CacheSPI<Object, Object> cache2 = tl.cache2;
+ ReplicationListener replListener1 = tl.replListener1;
+ ReplicationListener replListener2 = tl.replListener2;
+
+ try
+ {
+ TransactionManager tm = cache1.getTransactionManager();
+ tm.begin();
+ cache1.put( "age", 38);
+ tm.commit();
+
+ // value on cache2 may be 38 or not yet replicated
+ age = (Integer) cache2.get("age");
+ log("attr \"age\" of \"/a/b/c\" on cache2=" + age);
+ assertTrue("should be either null or 38", age == null || age == 38);
+ }
+ catch (Exception e)
+ {
+ fail(e.toString());
+ }
+ }
+
+ private void log(String msg)
+ {
+ System.out.println("-- [" + Thread.currentThread() + "]: " + msg);
+ }
+}
Added: core/branches/flat/src/test/java/org/jboss/starobrno/replication/ExceptionTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/replication/ExceptionTest.java (rev 0)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/replication/ExceptionTest.java 2008-10-16 21:12:47 UTC (rev 6974)
@@ -0,0 +1,98 @@
+package org.jboss.starobrno.replication;
+
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
+import org.jboss.starobrno.Cache;
+import org.jboss.starobrno.manager.CacheManager;
+import org.jboss.starobrno.util.TestingUtil;
+import org.jboss.starobrno.lock.TimeoutException;
+import org.jboss.starobrno.config.Configuration;
+import org.jboss.cache.transaction.DummyTransactionManagerLookup;
+
+/**
+ * Tests the type of exceptions thrown for Lock Acquisition Timeouts versus Sync Repl Timeouts
+ * @author <a href="mailto:manik@jboss.org">Manik Surtani</a>
+ */
+@Test(groups = {"functional"}, sequential = true)
+public class ExceptionTest
+{
+ private Cache cache1;
+ private Cache cache2;
+
+ private static String DELAYED_CLUSTER_CONFIG =
+ "UDP(mcast_addr=224.0.0.36;mcast_port=55566;ip_ttl=32;" +
+ " mcast_send_buf_size=150000;mcast_recv_buf_size=80000):" +
+ "PING(timeout=1000;num_initial_members=2):" +
+ "MERGE2(min_interval=5000;max_interval=10000):" +
+ "FD_SOCK:" +
+ "VERIFY_SUSPECT(timeout=1500):" +
+ "pbcast.NAKACK(gc_lag=50;max_xmit_size=8192;retransmit_timeout=600,1200,2400,4800):" +
+ "UNICAST(timeout=600,1200,2400,4800):" +
+ "pbcast.STABLE(desired_avg_gossip=20000):" +
+ "FRAG(frag_size=8192;down_thread=false;up_thread=false):" +
+ "pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;" +
+ "shun=false;print_local_addr=true):" +
+ "pbcast.STATE_TRANSFER:" +
+ "DELAY(in_delay=100;out_delay=100)";
+
+ private Cache createCache(String jgroupsConfig)
+ {
+ Configuration c = new Configuration();
+ c.setSyncCommitPhase(true);
+ c.setSyncRollbackPhase(true);
+ c.setCacheMode(Configuration.CacheMode.REPL_SYNC);
+ if (jgroupsConfig != null) c.setClusterConfig(jgroupsConfig);
+ c.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
+ Cache cache = new CacheManager(c).createCache("testCache");
+ return cache;
+ }
+
+ @AfterMethod
+ public void tearDown()
+ {
+ TestingUtil.killCaches(cache1, cache2);
+ cache1 = null;
+ cache2 = null;
+ }
+
+ @Test(groups = {"functional"}, expectedExceptions = {TimeoutException.class})
+ public void testSyncReplTimeout()
+ {
+ cache1 = createCache(DELAYED_CLUSTER_CONFIG);
+ cache2 = createCache(DELAYED_CLUSTER_CONFIG);
+
+ cache1.getConfiguration().setSyncReplTimeout(1); // 1ms. this is *bound* to fail.
+ cache2.getConfiguration().setSyncReplTimeout(1);
+
+ cache1.start();
+ cache2.start();
+
+ TestingUtil.blockUntilViewsReceived(60000, cache1, cache2);
+
+ cache1.put("k", "v");
+ }
+
+ @Test(groups = {"functional"}, expectedExceptions = {TimeoutException.class})
+ public void testLockAcquisitionTimeout() throws Exception
+ {
+ cache1 = createCache(null);
+ cache2 = createCache(null);
+ cache2.getConfiguration().setLockAcquisitionTimeout(1);
+
+ cache1.start();
+ cache2.start();
+
+ TestingUtil.blockUntilViewsReceived(10000, cache1, cache2);
+
+ // get a lock on cache 2 and hold on to it.
+ TransactionManager tm = cache2.getConfiguration().getRuntimeConfig().getTransactionManager();
+ tm.begin();
+ cache2.put("block", "block");
+ Transaction t = tm.suspend();
+ cache1.put("block", "v");
+ }
+}
Added: core/branches/flat/src/test/java/org/jboss/starobrno/replication/ReplicationExceptionTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/replication/ReplicationExceptionTest.java (rev 0)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/replication/ReplicationExceptionTest.java 2008-10-16 21:12:47 UTC (rev 6974)
@@ -0,0 +1,175 @@
+/*
+ *
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.starobrno.replication;
+
+import static org.testng.AssertJUnit.assertNotNull;
+import static org.testng.AssertJUnit.fail;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import org.jboss.starobrno.CacheSPI;
+import org.jboss.starobrno.manager.CacheManager;
+import org.jboss.starobrno.config.Configuration;
+import org.jboss.starobrno.util.TestingUtil;
+import org.jboss.cache.transaction.DummyTransactionManager;
+import org.jboss.cache.lock.IsolationLevel;
+
+import javax.naming.Context;
+import javax.transaction.NotSupportedException;
+import javax.transaction.RollbackException;
+import javax.transaction.SystemException;
+import javax.transaction.TransactionManager;
+import java.io.NotSerializableException;
+import java.io.Serializable;
+
+/**
+ * Teting of replication exception for a Nonerislizable object
+ *
+ * @author Ben Wang
+ * @version $Revision: 6905 $
+ */
+@Test(groups = {"functional"}, sequential = true)
+public class ReplicationExceptionTest
+{
+ private CacheSPI<String, ContainerData> cache1, cache2;
+
+ //String old_factory = null;
+ final String FACTORY = "org.jboss.cache.transaction.DummyContextFactory";
+
+ @BeforeMethod(alwaysRun = true)
+ public void setUp() throws Exception
+ {
+ //old_factory = System.getProperty(Context.INITIAL_CONTEXT_FACTORY);
+ System.setProperty(Context.INITIAL_CONTEXT_FACTORY, FACTORY);
+ }
+
+ @AfterMethod(alwaysRun = true)
+ public void tearDown() throws Exception
+ {
+ // We just can't kill DummyTransactionManager. We are sharing single instance in more tests.
+ TestingUtil.killTransaction(DummyTransactionManager.getInstance());
+ destroyCaches();
+ /*
+ if (old_factory != null)
+ {
+ System.setProperty(Context.INITIAL_CONTEXT_FACTORY, old_factory);
+ old_factory = null;
+ }
+ */
+ }
+
+ private TransactionManager beginTransaction() throws SystemException, NotSupportedException
+ {
+ TransactionManager mgr = cache1.getConfiguration().getRuntimeConfig().getTransactionManager();
+ mgr.begin();
+ return mgr;
+ }
+
+ private void initCaches(Configuration.CacheMode cachingMode)
+ {
+ Configuration conf1 = new Configuration();
+ Configuration conf2 = new Configuration();
+
+ conf1.setCacheMode(cachingMode);
+ conf2.setCacheMode(cachingMode);
+ conf1.setIsolationLevel(IsolationLevel.SERIALIZABLE);
+ conf2.setIsolationLevel(IsolationLevel.SERIALIZABLE);
+
+ conf1.setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
+ conf2.setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
+ /*
+ cache1.setTransactionManagerLookupClass("org.jboss.cache.transaction.GenericTransactionManagerLookup");
+ cache2.setTransactionManagerLookupClass("org.jboss.cache.transaction.GenericTransactionManagerLookup");
+ */
+ conf1.setLockAcquisitionTimeout(5000);
+ conf2.setLockAcquisitionTimeout(5000);
+
+ cache1 = (CacheSPI) new CacheManager(conf1).createCache("testCache");
+ cache2 = (CacheSPI) new CacheManager(conf2).createCache("testCache");
+
+
+ cache1.start();
+ cache2.start();
+ }
+
+ void destroyCaches() throws Exception
+ {
+ TestingUtil.killCaches(cache1, cache2);
+ cache1 = null;
+ cache2 = null;
+ }
+
+ public void testNonSerializableRepl() throws Exception
+ {
+ try
+ {
+ initCaches(Configuration.CacheMode.REPL_SYNC);
+
+ cache1.put("test", new ContainerData());
+
+ // We should not come here.
+ assertNotNull("NonSerializableData should not be null on cache2", cache2.get("test"));
+ }
+ catch (RuntimeException runtime)
+ {
+ Throwable t = runtime.getCause();
+ if (t instanceof NotSerializableException)
+ {
+ System.out.println("received NotSerializableException - as expected");
+ }
+ else
+ {
+ throw runtime;
+ }
+ }
+ }
+
+ public void testNonSerializableReplWithTx() throws Exception
+ {
+ TransactionManager tm;
+
+ try
+ {
+ initCaches(Configuration.CacheMode.REPL_SYNC);
+
+ tm = beginTransaction();
+ cache1.put("test", new ContainerData());
+ tm.commit();
+
+ // We should not come here.
+ assertNotNull("NonSerializableData should not be null on cache2", cache2.get("test"));
+ }
+ catch (RollbackException rollback)
+ {
+ System.out.println("received RollbackException - as expected");
+ }
+ catch (Exception e)
+ {
+ // We should also examine that it is indeed throwing a NonSerilaizable exception.
+ fail(e.toString());
+ }
+ }
+
+ static class NonSerializabeData
+ {
+ int i;
+ }
+
+ static class ContainerData implements Serializable
+ {
+ int i;
+ NonSerializabeData non_serializable_data;
+ private static final long serialVersionUID = -8322197791060897247L;
+
+ public ContainerData()
+ {
+ i = 99;
+ non_serializable_data = new NonSerializabeData();
+ }
+ }
+}
Added: core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncCacheListenerTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncCacheListenerTest.java (rev 0)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncCacheListenerTest.java 2008-10-16 21:12:47 UTC (rev 6974)
@@ -0,0 +1,256 @@
+/*
+ *
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.starobrno.replication;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.cache.lock.IsolationLevel;
+import org.jboss.cache.transaction.DummyTransactionManager;
+import org.jboss.cache.transaction.DummyTransactionManagerLookup;
+import org.jboss.starobrno.CacheException;
+import org.jboss.starobrno.CacheSPI;
+import org.jboss.starobrno.config.Configuration;
+import org.jboss.starobrno.manager.CacheManager;
+import org.jboss.starobrno.notifications.annotation.CacheEntryModified;
+import org.jboss.starobrno.notifications.annotation.CacheEntryRemoved;
+import org.jboss.starobrno.notifications.annotation.CacheListener;
+import org.jboss.starobrno.notifications.event.Event;
+import org.jboss.starobrno.notifications.event.TransactionalEvent;
+import org.jboss.starobrno.util.TestingUtil;
+import static org.testng.AssertJUnit.*;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import javax.naming.Context;
+import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Test out the TreeCacheListener
+ *
+ * @version $Revision: 6905 $
+ */
+@Test(groups = {"functional"}, sequential = true)
+public class SyncCacheListenerTest
+{
+ private CacheSPI<Object, Object> cache1, cache2;
+ private final static Log log_ = LogFactory.getLog(SyncCacheListenerTest.class);
+ //private String old_factory = null;
+ private final static String FACTORY = "org.jboss.cache.transaction.DummyContextFactory";
+
+ @BeforeMethod(alwaysRun = true)
+ public void setUp() throws Exception
+ {
+ System.out.println("*** starting setUp()");
+ //old_factory = System.getProperty(Context.INITIAL_CONTEXT_FACTORY);
+ System.setProperty(Context.INITIAL_CONTEXT_FACTORY, FACTORY);
+
+ initCaches();
+ System.out.println("*** finished setUp()");
+ }
+
+ @AfterMethod(alwaysRun = true)
+ public void tearDown() throws Exception
+ {
+ System.out.println("*** starting tearDown()");
+ // We just can't kill DummyTransactionManager. We are sharing single instance in more tests.
+ TestingUtil.killTransaction(DummyTransactionManager.getInstance());
+ destroyCaches();
+ /*
+ if (old_factory != null)
+ {
+ System.setProperty(Context.INITIAL_CONTEXT_FACTORY, old_factory);
+ old_factory = null;
+ }
+ */
+ System.out.println("*** finished tearDown()");
+ }
+
+ private void initCaches()
+ {
+ Configuration conf = new Configuration();
+ conf.setSyncCommitPhase(true);
+ conf.setCacheMode(Configuration.CacheMode.REPL_SYNC);
+ conf.setIsolationLevel(IsolationLevel.SERIALIZABLE);
+ conf.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
+ conf.setLockAcquisitionTimeout(5000);
+
+ cache1 = (CacheSPI) new CacheManager(conf).createCache("firstCache");
+ cache2 = (CacheSPI) new CacheManager(conf).createCache("firstCache");
+ TestingUtil.blockUntilViewReceived(cache2, 2, 1000);
+ }
+
+ private void destroyCaches()
+ {
+ TestingUtil.killCaches(cache1, cache2);
+ cache1 = null;
+ cache2 = null;
+ }
+
+ public void testSyncTxRepl() throws Exception
+ {
+ Integer age;
+ TransactionManager tm = cache1.getTransactionManager();
+
+ tm.begin();
+ Transaction tx = tm.getTransaction();
+ Listener lis = new Listener();
+ cache1.getNotifier().addCacheListener(lis);
+ lis.put("age", 38);
+
+ tm.suspend();
+ assertNull("age on cache2 must be null as the TX has not yet been committed", cache2.get("age"));
+ tm.resume(tx);
+ tm.commit();
+
+ // value on cache2 must be 38
+ age = (Integer) cache2.get("age");
+ assertNotNull("\"age\" obtained from cache2 must be non-null ", age);
+ assertTrue("\"age\" must be 38", age == 38);
+ }
+
+ public void testRemoteCacheListener() throws Exception
+ {
+ Integer age;
+ RemoteListener lis = new RemoteListener();
+ cache2.getNotifier().addCacheListener(lis);
+ cache1.put("age", 38);
+
+ // value on cache2 must be 38
+ age = (Integer) cache2.get("age");
+ assertNotNull("\"age\" obtained from cache2 must be non-null ", age);
+ assertTrue("\"age\" must be 38", age == 38);
+ cache1.remove("age");
+ }
+
+ public void testSyncRepl() throws Exception
+ {
+ Integer age;
+ Listener lis = new Listener();
+ cache1.addCacheListener(lis);
+ lis.put("age", 38);
+
+ // value on cache2 must be 38
+ age = (Integer) cache2.get("age");
+ assertNotNull("\"age\" obtained from cache2 must be non-null ", age);
+ assertTrue("\"age\" must be 38", age == 38);
+ }
+
+
+ public void simpleReplicationTest() throws Exception
+ {
+ TransactionManager tm = cache1.getConfiguration().getRuntimeConfig().getTransactionManager();
+ tm.begin();
+ cache1.put("key","value");
+ tm.commit();
+
+ assert cache2.get("key").equals("value");
+
+ }
+
+ public void testSyncTxReplMap() throws Exception
+ {
+ Integer age;
+ TransactionManager tm = cache1.getConfiguration().getRuntimeConfig().getTransactionManager();
+ tm.begin();
+ Transaction tx = tm.getTransaction();
+ Listener lis = new Listener();
+
+ cache1.put("age", 38);
+ lis.put("name", "Ben");
+
+ assert cache1.get("age").equals(38);
+ tm.suspend();
+ assertNull("age on cache2 must be null as the TX has not yet been committed", cache2.get("age"));
+ assertNull("age on cache1 must be null as the TX has been resumed", cache1.get("age"));
+ tm.resume(tx);
+ assertNotNull("age on cache1 must be not be null", cache1.get("age"));
+ tm.commit();
+ assertNotNull("age on cache1 must be not be null", cache1.get("age"));
+
+ System.out.println(" ********************** ");
+ // value on cache2 must be 38
+ age = (Integer) cache2.get("age");
+ assertNotNull("\"age\" obtained from cache2 must be non-null ", age);
+ assertTrue("\"age\" must be 38", age == 38);
+ }
+
+ public void testSyncReplMap() throws Exception
+ {
+ Integer age;
+
+ Listener lis = new Listener();
+ cache1.getNotifier().addCacheListener(lis);
+ lis.put("age", 38);
+
+ cache1.put("name", "Ben");
+ // value on cache2 must be 38
+ age = (Integer) cache2.get("age");
+ assertNotNull("\"age\" obtained from cache2 must be non-null ", age);
+ assertTrue("\"age\" must be 38", age == 38);
+ }
+
+ @CacheListener
+ public class Listener
+ {
+ Object key = null;
+
+ public void put(Object key, Object val)
+ {
+ this.key = key;
+ cache1.put(key, val);
+ }
+
+ public void put(String fqn, Map map)
+ {
+ if (map.size() == 0)
+ fail("put(): map size can't be 0");
+ Set<String> set = map.keySet();
+ key = set.iterator().next();// take anyone
+ cache1.put(fqn, map);
+ }
+
+ @CacheEntryModified
+ public void nodeModified(Event ne)
+ {
+ if (!ne.isPre())
+ {
+ log_.debug("nodeModified visited with fqn: " + key);
+ try
+ {
+ // test out if we can get the read lock since there is a write lock going as well.
+ cache1.get(key);
+ }
+ catch (CacheException e)
+ {
+ e.printStackTrace();//To change body of catch statement use File | Settings | File Templates.
+ fail("nodeModified: test failed with exception: " + e);
+ }
+ }
+ }
+
+ }
+
+ @CacheListener
+ public class RemoteListener
+ {
+
+ @CacheEntryRemoved
+ @CacheEntryModified
+ public void callback(TransactionalEvent e)
+ {
+ System.out.println("Callback got event " + e);
+ log_.debug("Callback got event " + e);
+ assertFalse("node was removed on remote cache so isLocal should be false", e.isOriginLocal());
+ }
+ }
+}
Added: core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncReplTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncReplTest.java (rev 0)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncReplTest.java 2008-10-16 21:12:47 UTC (rev 6974)
@@ -0,0 +1,92 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.starobrno.replication;
+
+import static org.testng.AssertJUnit.*;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import org.jboss.starobrno.Cache;
+import org.jboss.starobrno.context.InvocationContext;
+import org.jboss.starobrno.manager.CacheManager;
+import org.jboss.starobrno.util.TestingUtil;
+import org.jboss.starobrno.config.Configuration;
+
+/**
+ * @author <a href="mailto:manik@jboss.org">Manik Surtani (manik(a)jboss.org)</a>
+ */
+@Test(groups = {"functional", "jgroups"})
+public class SyncReplTest
+{
+ private ThreadLocal<Cache<Object, Object>[]> cachesTL = new ThreadLocal<Cache<Object, Object>[]>();
+
+ @BeforeMethod(alwaysRun = true)
+ public void setUp()
+ {
+ System.out.println("*** In setUp()");
+ Cache<Object, Object>[] caches = new Cache[2];
+ Configuration configuration = new Configuration();
+ configuration.setCacheMode(Configuration.CacheMode.REPL_SYNC);
+ caches[0] = new CacheManager(configuration).createCache("test");
+ caches[1] = new CacheManager(configuration).createCache("test");
+ cachesTL.set(caches);
+ TestingUtil.blockUntilViewsReceived(caches, 5000);
+ System.out.println("*** Finished setUp()");
+ }
+
+ @AfterMethod(alwaysRun = true)
+ public void tearDown()
+ {
+ Cache<Object, Object>[] caches = cachesTL.get();
+ if (caches != null) TestingUtil.killCaches(caches);
+ cachesTL.set(null);
+ }
+
+ public void testBasicOperation()
+ {
+ Cache<Object, Object>[] caches = cachesTL.get();
+ assertClusterSize("Should only be 2 caches in the cluster!!!", 2);
+
+ String k = "key", v = "value";
+
+ assertNull("Should be null", caches[0].get(k));
+ assertNull("Should be null", caches[1].get(k));
+
+ caches[0].put(k, v);
+
+ assertEquals(v, caches[0].get(k));
+ assertEquals("Should have replicated", v, caches[1].get(k));
+ }
+
+ @SuppressWarnings("unchecked")
+ public void testSyncRepl()
+ {
+ Cache<Object, Object>[] caches = cachesTL.get();
+ assertClusterSize("Should only be 2 caches in the cluster!!!", 2);
+
+ caches[0].getConfiguration().setSyncCommitPhase(true);
+ caches[1].getConfiguration().setSyncCommitPhase(true);
+
+ caches[0].put("age", 38);
+ assertEquals("Value should be set", 38, caches[0].get("age"));
+ assertEquals("Value should have replicated", 38, caches[1].get("age"));
+ }
+
+ private void assertClusterSize(String message, int size)
+ {
+ Cache<Object, Object>[] caches = cachesTL.get();
+ for (Cache c : caches)
+ {
+ assertClusterSize(message, size, c);
+ }
+ }
+
+ private void assertClusterSize(String message, int size, Cache c)
+ {
+ assertEquals(message, size, c.getMembers().size());
+ }
+}
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/util/TestingUtil.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/util/TestingUtil.java 2008-10-16 06:10:36 UTC (rev 6973)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/util/TestingUtil.java 2008-10-16 21:12:47 UTC (rev 6974)
@@ -19,6 +19,7 @@
import org.jboss.starobrno.lock.LockManager;
import org.jgroups.JChannel;
+import javax.transaction.TransactionManager;
import java.io.File;
import java.lang.reflect.Field;
import java.util.Arrays;
@@ -463,6 +464,21 @@
}
/**
+ * Clears transaction with the current thread in the given transaction manager.
+ * @param txManager a TransactionManager to be cleared
+ */
+ public static void killTransaction(TransactionManager txManager) {
+ if (txManager != null) {
+ try {
+ txManager.rollback();
+ } catch (Exception e) {
+ // don't care
+ }
+ }
+ }
+
+
+ /**
* Clears any associated transactions with the current thread in the caches' transaction managers.
*/
public static void killTransactions(Cache... caches)
Added: core/branches/flat/src/test/java/org/jboss/starobrno/util/internals/ReplicationListener.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/util/internals/ReplicationListener.java (rev 0)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/util/internals/ReplicationListener.java 2008-10-16 21:12:47 UTC (rev 6974)
@@ -0,0 +1,269 @@
+package org.jboss.starobrno.util.internals;
+
+import org.jboss.starobrno.Cache;
+import org.jboss.starobrno.RPCManager;
+import org.jboss.starobrno.commands.ReplicableCommand;
+import org.jboss.starobrno.commands.remote.ReplicateCommand;
+import org.jboss.starobrno.commands.tx.PrepareCommand;
+import org.jboss.starobrno.context.InvocationContext;
+import org.jboss.starobrno.factories.ComponentRegistry;
+import org.jboss.starobrno.io.ByteBuffer;
+import org.jboss.starobrno.marshall.CacheMarshallerStarobrno;
+import org.jboss.starobrno.marshall.CommandAwareRpcDispatcher;
+import org.jboss.starobrno.marshall.ExtendedMarshaller;
+import org.jboss.starobrno.util.TestingUtil;
+import org.jgroups.blocks.RpcDispatcher;
+import org.jgroups.util.Buffer;
+
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+
+/*
+* Utility class that notifies when certain commands were asynchronously replicated on secondary cache.
+ * Especially useful for avaoiding Thread.sleep() statements.
+ * <p/>
+ * Usage:
+ * <pre>
+ * Cache c1, c2; //these being two async caches
+ * AsyncReplicationListener listener2 = new AsyncReplicationListener(c2);
+ * listener2.expect(PutKeyValueCommand.class);
+ * c1.put(fqn, key, value);
+ * listener2.waitForReplicationToOccur(1000); // -this will block here untill c2 recieves the PutKeyValueCommand command
+ * </pre>
+ * Lifecycle - after being used (i.e. waitForReplicationToOccur returns sucessfully) the object returns to the
+ * non-initialized state and *can* be reused through expect-wait cycle.
+ * <b>Note</b>: this class might be used aswell for sync caches, e.g. a test could have subclasses which use sync and
+ * async replication
+ *
+ * @author Mircea.Markus(a)jboss.com
+ * @since 2.2
+ */
+public class ReplicationListener
+{
+ private CountDownLatch latch = new CountDownLatch(1);
+ private Set<Class<? extends ReplicableCommand>> expectedCommands;
+
+ /**
+ * Builds a listener that will observe the given cache for recieving replication commands.
+ */
+ public ReplicationListener(Cache cache)
+ {
+ ComponentRegistry componentRegistry = TestingUtil.extractComponentRegistry(cache);
+ RPCManager rpcManager = componentRegistry.getComponent(RPCManager.class);
+ CommandAwareRpcDispatcher realDispatcher = (CommandAwareRpcDispatcher) TestingUtil.extractField(rpcManager, "rpcDispatcher");
+ RpcDispatcher.Marshaller2 realMarshaller = (RpcDispatcher.Marshaller2) realDispatcher.getMarshaller();
+ RpcDispatcher.Marshaller2 delegate = null;
+ delegate = new MarshallerDelegate(realMarshaller);
+ realDispatcher.setMarshaller(delegate);
+ realDispatcher.setRequestMarshaller(delegate);
+ realDispatcher.setResponseMarshaller(delegate);
+ }
+
+ private class MarshallerDelegate implements RpcDispatcher.Marshaller2
+ {
+ RpcDispatcher.Marshaller2 marshaller;
+
+ private MarshallerDelegate(RpcDispatcher.Marshaller2 marshaller)
+ {
+ this.marshaller = marshaller;
+ }
+
+ public byte[] objectToByteBuffer(Object obj) throws Exception
+ {
+ return marshaller.objectToByteBuffer(obj);
+ }
+
+ public Object objectFromByteBuffer(byte bytes[]) throws Exception
+ {
+ Object result = marshaller.objectFromByteBuffer(bytes);
+ if (result instanceof ReplicateCommand && expectedCommands != null)
+ {
+ ReplicateCommand replicateCommand = (ReplicateCommand) result;
+ return new ReplicateCommandDelegate(replicateCommand);
+ }
+ return result;
+ }
+
+ public Buffer objectToBuffer(Object o) throws Exception
+ {
+ return marshaller.objectToBuffer(o);
+ }
+
+ public Object objectFromByteBuffer(byte[] bytes, int i, int i1) throws Exception
+ {
+ Object result = marshaller.objectFromByteBuffer(bytes, i, i1);
+ if (result instanceof ReplicateCommand && expectedCommands != null)
+ {
+ ReplicateCommand replicateCommand = (ReplicateCommand) result;
+ return new ReplicateCommandDelegate(replicateCommand);
+ }
+ return result;
+ }
+ }
+
+ /**
+ * We want the notification to be performed only *after* the remote command is executed.
+ */
+ private class ReplicateCommandDelegate extends ReplicateCommand
+ {
+ ReplicateCommand realOne;
+
+ private ReplicateCommandDelegate(ReplicateCommand realOne)
+ {
+ this.realOne = realOne;
+ }
+
+ @Override
+ public Object perform(InvocationContext ctx) throws Throwable
+ {
+ try
+ {
+ return realOne.perform(ctx);
+ }
+ finally
+ {
+ System.out.println("Processed command: " + realOne);
+ Iterator<Class<? extends ReplicableCommand>> it = expectedCommands.iterator();
+ while (it.hasNext())
+ {
+ Class<? extends ReplicableCommand> replicableCommandClass = it.next();
+ if (realOne.containsCommandType(replicableCommandClass))
+ {
+ it.remove();
+ } else if (realOne.getSingleModification() instanceof PrepareCommand) //explicit transaction
+ {
+ PrepareCommand prepareCommand = (PrepareCommand) realOne.getSingleModification();
+ if (prepareCommand.containsModificationType(replicableCommandClass))
+ {
+ it.remove();
+ }
+ }
+ }
+ if (expectedCommands.isEmpty())
+ {
+ latch.countDown();
+ }
+ }
+ }
+ }
+
+ /**
+ * Needed for region based marshalling.
+ */
+ private class RegionMarshallerDelegate extends CacheMarshallerStarobrno
+ {
+ private ExtendedMarshaller realOne;
+
+ private RegionMarshallerDelegate(ExtendedMarshaller realOne)
+ {
+ this.realOne = realOne;
+ }
+
+ @Override
+ public void objectToObjectStream(Object obj, ObjectOutputStream out) throws Exception
+ {
+ realOne.objectToObjectStream(obj, out);
+ }
+
+ @Override
+ public Object objectFromObjectStream(ObjectInputStream in) throws Exception
+ {
+ return realOne.objectFromObjectStream(in);
+ }
+
+ @Override
+ public Object objectFromStream(InputStream is) throws Exception
+ {
+ return realOne.objectFromStream(is);
+ }
+
+ public Object objectFromByteBuffer(byte[] bytes) throws Exception
+ {
+ return this.objectFromByteBuffer(bytes, 0, bytes.length);
+ }
+
+
+ public ByteBuffer objectToBuffer(Object o) throws Exception
+ {
+ return realOne.objectToBuffer(o);
+ }
+
+ public Object objectFromByteBuffer(byte[] buffer, int i, int i1) throws Exception
+ {
+ Object result = realOne.objectFromByteBuffer(buffer, i , i1);
+ if (result instanceof ReplicateCommand && expectedCommands != null)
+ {
+ ReplicateCommand replicateCommand = (ReplicateCommand) result;
+ result = new ReplicateCommandDelegate(replicateCommand);
+ }
+ return result;
+ }
+ }
+
+ /**
+ * Blocks for the elements specified through {@link #expect(Class[])} invocations to be replicated in this cache.
+ * if replication does not occur in the give timeout then an exception is being thrown.
+ */
+ public void waitForReplicationToOccur(long timeoutMillis)
+ {
+ System.out.println("enter... ReplicationListener.waitForReplicationToOccur");
+ waitForReplicationToOccur(timeoutMillis, TimeUnit.MILLISECONDS);
+ System.out.println("exit... ReplicationListener.waitForReplicationToOccur");
+ }
+
+ /**
+ * Similar to {@link #waitForReplicationToOccur(long)} except that this method provides more flexibility in time units.
+ *
+ * @param timeout the maximum time to wait
+ * @param timeUnit the time unit of the <tt>timeout</tt> argument.
+ */
+ public void waitForReplicationToOccur(long timeout, TimeUnit timeUnit)
+ {
+ assert expectedCommands != null : "there are no replication expectations; please use AsyncReplicationListener.expect(...) before calling this method";
+ try
+ {
+ if (!latch.await(timeout, timeUnit))
+ {
+ assert false : "waiting for more than " + timeout + " " + timeUnit + " and following commands did not replicate: " + expectedCommands;
+ }
+ }
+ catch (InterruptedException e)
+ {
+ throw new IllegalStateException("unexpected", e);
+ }
+ finally
+ {
+ expectedCommands = null;
+ latch = new CountDownLatch(1);
+ }
+ }
+
+ /**
+ * {@link #waitForReplicationToOccur(long)} will block untill all the commands specified here are being replicated
+ * to this cache. The method can be called several times with various arguments.
+ */
+ public void expect(Class<? extends ReplicableCommand>... expectedCommands)
+ {
+ if (this.expectedCommands == null)
+ {
+ this.expectedCommands = new HashSet<Class<? extends ReplicableCommand>>();
+ }
+ this.expectedCommands.addAll(Arrays.asList(expectedCommands));
+ }
+
+ /**
+ * Waits untill first command is replicated.
+ */
+ public void expectAny()
+ {
+ expect();
+ }
+}
\ No newline at end of file
16 years
JBoss Cache SVN: r6973 - enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR.
by jbosscache-commits@lists.jboss.org
Author: ldelima(a)redhat.com
Date: 2008-10-16 02:10:36 -0400 (Thu, 16 Oct 2008)
New Revision: 6973
Modified:
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Architecture.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Book_Info.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Introduction.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Jbossaop.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Term.po
Log:
translation ongoing
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Architecture.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Architecture.po 2008-10-16 03:56:53 UTC (rev 6972)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Architecture.po 2008-10-16 06:10:36 UTC (rev 6973)
@@ -9,7 +9,7 @@
"Project-Id-Version: Architecture\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:57+0000\n"
-"PO-Revision-Date: 2008-10-16 13:21+1000\n"
+"PO-Revision-Date: 2008-10-16 16:05+1000\n"
"Last-Translator: Leticia de Lima <ldelima(a)redhat.com>\n"
"Language-Team: Brazilian Portuguese <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -105,7 +105,7 @@
msgstr ""
"As figuras apresentadas abaixo ilustram as operações de gravação e leitura do campo de desempenho. Uma vez que um POJO é gerenciado pelo cache (por exemplo: após um método <literal>putObject</"
"literal> ser chamado), o Aop invocará automaticamente o <literal>CacheInterceptor</"
-"literal> cada vez em que houver uma gravação ou leitura de campo. No entanto, você deverá verificar a diferença entre estas figuras. Enquanto, a operação de gravação de campo irá ao cache primeiramente e, então, invocar a atualização em memória, a invocação de leitura do campo não involve a referência em memória. Isto é devido ao valor do cache e memória devem estar sincronizados durante a operação de gravação. Como resultado, o valor do campo a partir do cache é retornado. "
+"literal> cada vez em que houver uma gravação ou leitura de campo. No entanto, você deverá verificar a diferença entre estas figuras. Enquanto, a operação de gravação de campo irá ao cache primeiramente e, então, invocar a atualização em memória, a invocação de leitura do campo não envolve a referência em memória. Isto é devido ao valor do cache e memória devem estar sincronizados durante a operação de gravação. Como resultado, o valor do campo a partir do cache é retornado. "
#. Tag: title
#: Architecture.xml:27
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Book_Info.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Book_Info.po 2008-10-16 03:56:53 UTC (rev 6972)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Book_Info.po 2008-10-16 06:10:36 UTC (rev 6973)
@@ -9,7 +9,7 @@
"Project-Id-Version: Book_Info\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:57+0000\n"
-"PO-Revision-Date: 2008-10-10 14:54+1000\n"
+"PO-Revision-Date: 2008-10-16 13:39+1000\n"
"Last-Translator: Leticia de Lima <ldelima(a)redhat.com>\n"
"Language-Team: Brazilian Portuguese <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -33,7 +33,7 @@
#: Book_Info.xml:12
#, no-c-format
msgid "This book is a User Guide for Pojo Cache"
-msgstr "Este livro é um Guia do Usuário para o Pojo Cache"
+msgstr "Este livro é um Guia do Usuário para o Pojo Cache."
#. Tag: holder
#: Book_Info.xml:26
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Introduction.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Introduction.po 2008-10-16 03:56:53 UTC (rev 6972)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Introduction.po 2008-10-16 06:10:36 UTC (rev 6973)
@@ -9,7 +9,7 @@
"Project-Id-Version: Introduction\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:57+0000\n"
-"PO-Revision-Date: 2008-10-15 09:28+1000\n"
+"PO-Revision-Date: 2008-10-16 14:50+1000\n"
"Last-Translator: Leticia de Lima <ldelima(a)redhat.com>\n"
"Language-Team: Brazilian Portuguese <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -42,7 +42,7 @@
"literal> interface. In addition, it has known limitations:"
msgstr ""
"O PojoCache (implementado como PojoCache), ambos em memória, transacional, replicada e persistente. No entanto, o TreeCache é tipicamente usado como um sistema do cache plano. Isto é, ele armazena diretamente as referências do objeto e possui um <literal>HashMap</literal>-like Api. Caso a replicação ou persistência seja ligada, o objeto precisará implementar a interface <literal>Serializable</"
-"literal>. Adicionado a isto, isto possui as próprias limitações:"
+"literal>. Adicionado a isto, ele possui as próprias limitações:"
#. Tag: para
#: Introduction.xml:10
@@ -51,7 +51,7 @@
"Users will have to manage the cache specifically; e.g., when an object is "
"updated, a user will need a corresponding API call to update the cache "
"content."
-msgstr "Os usuários terão que gerenciar o cache especificamente; por exemplo: quando um objeto é atualizado um usuário precisará uma chamada API correspondente para atualizar o conteúdo do cache."
+msgstr "Os usuários terão que gerenciar o cache especificamente, por exemplo: quando um objeto é atualizado um usuário precisará de uma chamada API correspondente para atualizar o conteúdo do cache."
#. Tag: para
#: Introduction.xml:13
@@ -110,7 +110,7 @@
"the object relationship and identity are preserved automatically in a "
"distributed, replicated environment. It enables transparent usage behavior "
"and increases software performance."
-msgstr "a identidade e relação do objeto são preservadas automaticamente num ambiente distribuido e replicado. Isto permite o comportamento de uso transparente e aumenta o desempenho do software."
+msgstr "a identidade e relação do objeto são preservadas automaticamente num ambiente distribuído e replicado. Isto permite o comportamento de uso transparente e aumenta o desempenho do software."
#. Tag: para
#: Introduction.xml:41
@@ -146,7 +146,7 @@
#: Introduction.xml:54
#, no-c-format
msgid "More details on these steps will be given in later chapters."
-msgstr "Maiores detalhes nestes passos serão fornecidos nos capítulos seguintes."
+msgstr "Maiores detalhes referentes a estes passos serão fornecidos nos capítulos seguintes."
#. Tag: para
#: Introduction.xml:57
@@ -206,7 +206,7 @@
"mode."
msgstr ""
"Replicação fine-grained. O modo de replicação suportado é o mesmo que aquele do TreeCache: <literal>LOCAL</literal> , <literal>REPL_SYNC</literal>, "
-"e <literal>REPL_ASYNC</literal>. O nível de replicação é fine-grained e é feito automaticamente, uma vez que o POJO é mapeado num armazenamento de cache interno. Quando um campo de POJO é atualizado, a solicitação de replicação será enviada apenas para o nó correspondente aquele atributo modificado (ao invés do objeto por inteiro). Isto pode ter um impulso de desempenho potencial durante o processo de replicação; por exemplo: atualização de uma única chave num HashMap grande replicará apenas o único campo ao invés do mapa por inteiro. Por favor consulte a documentação do <ulink url=\"TreeCache.html\">JBossCache</ulink> para maiores detalhes do modo do cache."
+"e <literal>REPL_ASYNC</literal>. O nível de replicação é fine-grained e é feito automaticamente, uma vez que o POJO é mapeado num armazenamento de cache interno. Quando um campo de POJO é atualizado, a solicitação de replicação será enviada apenas para o nó correspondente daquele atributo modificado (ao invés do objeto por inteiro). Isto pode ter um impulso de desempenho potencial durante o processo de replicação; por exemplo: atualização de uma única chave num HashMap grande replicará apenas o único campo ao invés do mapa por inteiro. Por favor, consulte a documentação do <ulink url=\"TreeCache.html\">JBossCache</ulink> para maiores detalhes do modo do cache."
#. Tag: para
#: Introduction.xml:74
@@ -264,7 +264,7 @@
"<literal>PojoCache</literal> will traverse the object tree and map it "
"accordingly to the internal TreeCache nodes. This feature is explained in "
"full details later."
-msgstr "O cache do objeto pela acessibilidade, por exemplo; o mapeamento do objeto repetitivo dentro de um armazenamento do cache. Por exemplo, se um POJO possui a referência a outro POJO notificado, o <literal>PojoCache</literal> irá gerenciar claramente os estados do sub-objeto também. Durante a chamada <literal>putObject()</literal> inicial, o <literal>PojoCache</literal> partilhará o objeto tree e mapeá-lo de acordo com os nós TreeCache internos. Este recurso é explicado com maior profundidade à frente."
+msgstr "O cache do objeto pela acessibilidade, por exemplo; o mapeamento do objeto repetitivo dentro de um armazenamento do cache. Caso um POJO possuir a referência a outro POJO notificado, o <literal>PojoCache</literal> irá gerenciar claramente os estados do sub-objeto também. Durante a chamada <literal>putObject()</literal> inicial, o <literal>PojoCache</literal> partilhará o objeto tree e mapeá-lo de acordo com os nós TreeCache internos. Este recurso é explicado com maior profundidade à frente."
#. Tag: para
#: Introduction.xml:92
@@ -275,7 +275,7 @@
"declare any object relationship (e.g., one-to-one, or one-to-many) to use "
"the cache. Therefore, there is no need to specify object relationship via "
"xml file."
-msgstr "Manuseio da referência do objeto. No PojoCache, as referências do objeto recursivo são manuseiados automaticamente. Isto é, um usuário não precisa declarar qualquer relação do objeto (por exemplo: um por um ou um para muitos) para o uso do cache. Portanto, não existe a necessidade de especificar a relação do objeto através de um arquivo xml."
+msgstr "Manuseio da referência do objeto. No PojoCache, as referências do objeto recursivo são manuseados automaticamente. Isto é, um usuário não precisa declarar qualquer relação do objeto (por exemplo: um por um ou um para muitos) para o uso do cache. Portanto, não existe a necessidade de especificar a relação do objeto através de um arquivo xml."
#. Tag: para
#: Introduction.xml:97
@@ -312,7 +312,7 @@
"class, once a <literal>Student</literal> object is mapped to PojoCache (e."
"g., <literal>putObject</literal> call), the attributes in base class "
"<literal>Person</literal> is \"aspectized\" as well."
-msgstr "Relação de hereditariedade. O PojoCache preserva a hierarquia hereditária do POJO após o item do objeto ser armazenado no cache. Por exemplo, se uma classe de <literal>Student</literal> herdar de uma classe de <keycode>Person</keycode>, uma vez que um objeto do <literal>Student</literal> seja mapeado ao PojoCache (por exemplo: a chamada <literal>putObject</literal>), os atributos na classe base de <literal>Person</literal> é \"posicionada\" também."
+msgstr "Relação de hereditariedade. O PojoCache preserva a hierarquia hereditária do POJO após o item do objeto ser armazenado no cache. Por exemplo: se uma classe <literal>Student</literal> herdar de uma classe <keycode>Person</keycode>, desde que um objeto do <literal>Student</literal> seja mapeado ao PojoCache (por exemplo: a chamada <literal>putObject</literal>), os atributos na classe base de <literal>Person</literal> é \"posicionada\" também."
#. Tag: para
#: Introduction.xml:110
@@ -336,7 +336,7 @@
"declaration file (e.g., <literal>jboss-aop.xml</literal> ) or specifying a "
"JBossAop system classloader. A user can treat the pre-generated classes as "
"regular ones and use PojoCache in a non-intrusive way."
-msgstr "Suporte da pré-compilação dos POJOs. O último JBossAop possui um recurso para pré-compilar (chamado <literal>aopc</literal>, então chamado modo do período de compilação no JBossAop) e gera o código de byte necessário para o sistema AOP. Pela pré-compilação dos POJOs de usuário especificado, não há necessidade para um arquivo de declaração adicional (por exemplo: <literal>jboss-aop.xml</literal>) ou especificando um classloader de sistema do JBossAop. Um usuário pode tratar as classes pre-geradas como regulares e usar o PojoCache numa maneira não-intrusiva."
+msgstr "Suporte da pré-compilação dos POJOs. O último JBossAop possui um recurso para pré-compilar (chamado <literal>aopc</literal>, então chamado modo do período de compilação no JBossAop) e gera o código de byte necessário para o sistema AOP. Pela pré-compilação dos POJOs de usuário especificado, não há necessidade para um arquivo de declaração adicional (por exemplo: <literal>jboss-aop.xml</literal>) ou especificando um classloader de sistema do JBossAop. Um usuário pode tratar as classes pré-geradas como regulares e usar o PojoCache numa maneira não-intrusiva."
#. Tag: para
#: Introduction.xml:118
@@ -365,7 +365,7 @@
"annotation will be supported in the next release."
msgstr ""
"Suporte do uso da anotação. Inicializando a partir da liberação 1.2.3, o PojoCache também suporta a declaração do POJO através da anotação sob JDK1.4. O JbossAop fornece uma anotação pré-compiladora que um usuário pode usar para pré-processar a anotação. Como resultado, não haverá necessidade da declaração do arquivo <literal>jboss-aop.xml</"
-"literal> para POJOs, caso uma anotação seja preferida. A anotação JDK5.0 será suportada n próxima liberação."
+"literal> para POJOs, caso uma anotação seja preferida. A anotação JDK5.0 será suportada na próxima liberação."
#. Tag: para
#: Introduction.xml:133
@@ -392,7 +392,7 @@
"it programmatically or through an external xml file. Finally, you call the "
"cache life cycle method to start the cache. Below is a code snippet that "
"creates and starts the cache through an external xml file:"
-msgstr "O uso do PojoCache, isto é parecido a esta parte de contagem do treeCache. Basicamente, você instância primeiramente a instância PojoCache. E, então você pode tanto configurá-lo de maneira programática ou através de um arquivo xml externo. Finalmente, você pode chamar o método de ciclo de vida do cache para inicializar o cache. Segue abaixo um trecho do código que cria e inicializa o cache através do arquivo xml externo: "
+msgstr "O uso do PojoCache, isto é parecido a esta parte de contagem do treeCache. Basicamente, você instancia primeiramente a instância PojoCache. E, então você pode tanto configurá-lo de maneira programática ou através de um arquivo xml externo. Finalmente, você pode chamar o método de ciclo de vida do cache para inicializar o cache. Segue abaixo um trecho do código que cria e inicializa o cache através do arquivo xml externo: "
#. Tag: programlisting
#: Introduction.xml:140
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Jbossaop.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Jbossaop.po 2008-10-16 03:56:53 UTC (rev 6972)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Jbossaop.po 2008-10-16 06:10:36 UTC (rev 6973)
@@ -9,7 +9,7 @@
"Project-Id-Version: Jbossaop\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:57+0000\n"
-"PO-Revision-Date: 2008-10-15 14:54+1000\n"
+"PO-Revision-Date: 2008-10-16 16:02+1000\n"
"Last-Translator: Leticia de Lima <ldelima(a)redhat.com>\n"
"Language-Team: Brazilian Portuguese <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -50,7 +50,7 @@
"layered design. AOP allows you to intercept any event in a Java program and "
"trigger functionality based on those events. Combined with JDK 5.0 "
"annotations, it allows you to extend the Java language with new syntax."
-msgstr "A Programação de Posição Orientada - Aspect-Oriented Programming (AOP) é o novo padrão que permite você organizar e estender em camadas o seus aplicativos de software em maneiras que são inviáveis com as abordagens do tradicional objeto orientado. Os aspectos permitem que você cole claramente a funcionalidade, de forma que você possua um design em camadas. O AOP permite que você interceda qualquer evento num programa Java e realize o trigger da funcionalidade baseada nestes eventos. Isto permite que você estenda a linguagem Java com a nova sintaxe, uma vez combinada com as anotações JDK 5.0. "
+msgstr "A Programação de Posição Orientada - Aspect-Oriented Programming (AOP) é o novo padrão que permite você organizar e estender em camadas o seus aplicativos de software em maneiras que são inviáveis com as abordagens do tradicional objeto orientado. As posições permitem que você cole claramente a funcionalidade, de forma que você possua um design em camadas. A AOP permite que você interceda qualquer evento num programa Java e realize o trigger da funcionalidade baseada nestes eventos. Isto permite que você estenda a linguagem Java com a nova sintaxe, uma vez combinada com as anotações JDK 5.0. "
#. Tag: para
#: Jbossaop.xml:13
@@ -72,7 +72,7 @@
"it's a behavior that \"cuts\" across multiple points in your object models, "
"yet is distinctly different. As a development methodology, AOP recommends "
"that you abstract and encapsulate crosscutting concerns."
-msgstr "Por exemplo, as medidas são um aspecto comum que é ortogonal à lógica comercial. No Aop, um recurso como as medidas é chamado um atalho de preocupação, como isto é um comportamento que \"corta\" através de múltiplos pontos em seus modelos de objeto, ainda que seja bastante diferente. Como uma metodologia de desenvolvimento, o AOP recomenda que você simplifique e encapsule os atalhos de preocupação."
+msgstr "Por exemplo, as medidas são um aspecto comum que é ortogonal à lógica comercial. Na Aop, um recurso como as medidas é chamado um atalho de preocupação, como isto é um comportamento que \"corta\" através de múltiplos pontos em seus modelos de objeto, ainda que seja bastante diferente. Como uma metodologia de desenvolvimento, a AOP recomenda que você simplifique e encapsule os atalhos de preocupação."
#. Tag: para
#: Jbossaop.xml:19
@@ -81,7 +81,7 @@
"For example, let's say you wanted to add code to an application to measure "
"the amount of time it would take to invoke a particular method. In plain "
"Java, the code would look something like the following."
-msgstr "Vamos dizer que você queria adicionar um código a um aplicativo para medir o tempo que isto tomaria para invocar um método particular, No Java plano, o código parece-se com o seguinte:"
+msgstr "Vamos dizer que você queira adicionar um código a um aplicativo para medir o tempo que isto tomaria para invocar um método particular. No Java plano, o código parece-se com o seguinte:"
#. Tag: programlisting
#: Jbossaop.xml:22
@@ -131,7 +131,7 @@
"because it's dispersed throughout your entire code base. And this is just a "
"tiny example! In many cases, OOP may not always be the best way to add "
"metrics to a class."
-msgstr "Enquanto este código funciona, é difícil ligá-lo e desligá-lo e possuirmos um código cheio caso desejarmos obter as medidas para todos os outros métodos. Esta abordagem é bastante difícil de manter, expandir e estender, pois ela está dispersa através de todo o seu código base. Em muitos casos, o OOP não será sempre a melhor maneira para adicionar as medidas à classe."
+msgstr "Enquanto este código funciona, é difícil ligá-lo e desligá-lo e possuirmos um código cheio caso desejarmos obter as medidas para todos os outros métodos. Esta abordagem é bastante difícil de manter, expandir e estender, pois ela está dispersa através de todo o seu código base. Em muitos casos, o AOP não será sempre a melhor maneira para adicionar as medidas à classe."
#. Tag: para
#: Jbossaop.xml:26
@@ -142,7 +142,7 @@
"\"around\" your code. For example, AOP provides you with programmatic "
"control to specify that you want calls to BankAccountDAO to go through a "
"metrics aspect before executing the actual body of that code."
-msgstr "A programação de posição orientada fornece uma maneira de encapsular este tipo de funcionalidade de comportamento. Isto permite que você adicione o comportamento com as medidas \"em volta\" de seu código. Por exemplo: o AOP fornece um controle de forma programática para especificar que você deseja chamadas para o BankAccountDAO para ir através da posição de medidas antes de executar o corpo atual daquele código."
+msgstr "A programação de posição orientada fornece uma maneira de encapsular este tipo de funcionalidade de comportamento. Isto permite que você adicione o comportamento com as medidas \"em volta\" de seu código. Por exemplo: o AOP fornece um controle de forma programática para especificar que você deseja chamadas do BankAccountDAO passarem através da posição de medidas, antes de executar o corpo atual daquele código."
#. Tag: title
#: Jbossaop.xml:29
@@ -158,7 +158,7 @@
"crosscutting concerns, and a programmatic construct -- a programming "
"language or a set of tags -- to specify how you want to apply those snippets "
"of code."
-msgstr "Em resumo, todos os AOP frameworks definem duas coisas: uma maneira para implementar os atalhos de preocupação e uma construção de forma programática -- uma linguagem de programação ou um conjunto de caracteres -- para especificar como você quer aplicar estes trechos do código."
+msgstr "Em resumo, todos os AOP frameworks definem duas coisas: uma maneira para implementar os atalhos de preocupação e uma construção de forma programática -- uma linguagem de programação ou um conjunto de caracteres -- para especificar como você deseja aplicar estes trechos do código."
#. Tag: para
#: Jbossaop.xml:33
@@ -184,7 +184,7 @@
#: Jbossaop.xml:39
#, no-c-format
msgid "Listing Two: Implementing metrics in a JBoss AOP Interceptor"
-msgstr "Listagem Dois: Implementação de medidas num Interceptor do JBoss AOP"
+msgstr "Listagem Dois: Implementação de medidas num Interceptor do JBoss AOP."
#. Tag: programlisting
#: Jbossaop.xml:42
@@ -250,7 +250,7 @@
"uses an enclosing try/finally block to perform the timings. Line 13 obtains "
"contextual information about the method call from the Invocation object, "
"while line 14 displays the method name and the calculated metrics."
-msgstr "Quando o AOP framework estiver operando a chamado do método, isto chama o método de invocação de Medida na linha 3. A Linha 8 envolve e delega ao método e uso atual um bloqueio de tentativa/finalmente para executar os períodos. A Linha 13 obtém informação contextual sobre a chamada do método a partir de um objeto de Invocação, enquanto a linha 14 exibe o nome do método e calcula as medidas."
+msgstr "Quando o AOP framework estiver operando a chamado do método, isto chama o método de invocação de Medida na linha 3. A Linha 8 envolve e delega ao método e uso atual um bloqueio de try/finally para executar os períodos. A Linha 13 obtém informação contextual sobre a chamada do método a partir de um objeto de Invocação, enquanto a linha 14 exibe o nome do método e calcula as medidas."
#. Tag: para
#: Jbossaop.xml:49
@@ -277,7 +277,7 @@
"expression matches events/points within your application. For example, a "
"valid pointcut definition would be \"for all calls to the JDBC method "
"executeQuery(), call the aspect that verifies SQL syntax.\""
-msgstr "Para aplicar uma posição, você definirá quando executar o código de posição. Estes pontos em execução são chamados pointcuts. Uma analogia a um pointcut é uma expressão regular. Quando uma expressão regular combina com as seqüências, uma expressão pointcut combina com seus eventos/pontos em seu aplicativo. Por exemplo: uma definição de pointcut válida seria \"para todas as chamadas do executeQuery() de método JDBC, chame a posição que verifica a sintaxe SQL.\""
+msgstr "Para aplicar uma posição, você definirá quando executar o código de posição. Estes pontos em execução são chamados pointcuts. Uma analogia a um pointcut é uma expressão regular. Quando uma expressão regular combina com as seqüências, uma expressão pointcut combina com seus eventos/pontos em seu aplicativo. Por exemplo: uma definição de pointcut válida poderia ser: \"para todas as chamadas do executeQuery() de método JDBC, realize a chamada da posição que verifica a sintaxe SQL.\""
#. Tag: para
#: Jbossaop.xml:56
@@ -294,7 +294,7 @@
#: Jbossaop.xml:59
#, no-c-format
msgid "Listing Three: Defining a pointcut in JBoss AOP"
-msgstr "Listagem Três. Definição de um pointcit no JBoss AOP"
+msgstr "Listagem Três. Definição de um pointcut no JBoss AOP."
#. Tag: programlisting
#: Jbossaop.xml:62
@@ -326,7 +326,7 @@
"method BankAccountDAO.withdraw(). Lines 4-6 define a general pointcut that "
"applies the metrics aspect to all methods in all classes in the com.mc."
"billing package."
-msgstr "As linhas 1-3 definem um pointcut que aplica a posição de medidas aoBankAccountDAO.withdraw() de método especificado. As linhas 4-6 definem um pointcut geral que aplica-se à posição de medidas de todas as classes no pacote de faturamento com.mc."
+msgstr "As linhas 1-3 definem um pointcut que aplica a posição de medidas ao BankAccountDAO.withdraw() de método especificado. As linhas 4-6 definem um pointcut geral que aplica-se à posição de medidas de todas as classes no pacote de faturamento com.mc."
#. Tag: para
#: Jbossaop.xml:66
@@ -334,7 +334,7 @@
msgid ""
"There is also an optional annotation mapping if you do not like XML. See "
"JBossAop Reference Guide for more information."
-msgstr "Existe também um mapeamento de anotação especial caso você não goste do XML. Consulte o Guia de Referência JBossAop para maiores informações."
+msgstr "Existe também um mapeamento de anotação especial caso você não goste do XML. Consulte o Guia de Referência JBossAop para maiores informações sobre este respeito."
#. Tag: para
#: Jbossaop.xml:69
@@ -363,7 +363,7 @@
"advice bindings at runtime. Getting an instance of <literal>org.jboss.aop."
"AspectManager.instance()</literal>, you can add your binding."
msgstr ""
-"Você pode alterar os bindings de aviso e interceptor no período de execução, com o JBoss AOP. Você pode desregistrar bindings existentes e implementar hot deploy a novos bindings, caso os pontos dados tenham sido instrumentados. Existe também um API do período de execução para o adicionamento de bindings de aviso no período de execução. Você pode adicionar seu binding por uma instância do <literal>org.jboss.aop."
+"Você pode alterar os bindings de aviso e interceptor no período de execução, com o JBoss AOP. Você pode cancelar o registro de bindings existentes e implementar hot deploy a novos bindings, caso os pontos dados tenham sido instrumentados. Existe também um API do período de execução para o adicionamento de bindings de aviso no período de execução. Você pode adicionar seu binding por uma instância do <literal>org.jboss.aop."
"AspectManager.instance()</literal>."
#. Tag: programlisting
@@ -500,7 +500,7 @@
"instrumented. You can force instrumentation with the <literal>prepare</"
"literal> functionality that declares in an xml file."
msgstr ""
-"O AOP de Dinâmica não pode ser usado a não ser que um ponto de união específico tenha sido instrumentado. Você pode forçar a instrumentação com a funcionalidade <literal>prepare</"
+"A AOP de Dinâmica não pode ser usada a não ser que um ponto de união específico tenha sido instrumentado. Você pode forçar a instrumentação com a funcionalidade <literal>prepare</"
"literal> que declara um arquivo xml."
#. Tag: title
@@ -515,7 +515,7 @@
msgid ""
"Annotations are only available in JDK 5.0, but using our annotation compiler "
"you can acheive similar functionality with JDK 1.4.2 as well."
-msgstr "As anotações são apenas disponíveis em JDK 5.0, mas com o uso do nosso compilador de anotação você poderá atingir uma funcionalidade similar com o JDK 1.4.2 também."
+msgstr "As anotações estão apenas disponíveis no JDK 5.0, mas com o uso do nosso compilador de anotação você poderá atingir uma funcionalidade similar com o JDK 1.4.2 também."
#. Tag: para
#: Jbossaop.xml:100
@@ -536,7 +536,7 @@
"that '@interface' is replaced by 'interface'. i.e. the similar annotation "
"type is a normal Java interface:"
msgstr ""
-"As anotações devem mapear um tipo de anotação, no JDK 5.0 elas são definidas como: "
+"As anotações devem mapear um tipo de anotação. No JDK 5.0 elas são definidas como: "
"<programlisting>\n"
" package com.mypackage;\n"
"\n"
@@ -574,19 +574,19 @@
msgid ""
"The syntax for using annotations in JDK 1.4.2 is almost exactly the same as "
"JDK 5.0 annotations except for these subtle differences:"
-msgstr "A sintaxe para anotações de uso no JDK 1.4.2 é quase a mesma para as anotações JDK 5.0, com exeção destas diferenças súteis:"
+msgstr "A sintaxe para anotações de uso no JDK 1.4.2 é quase a mesma para as anotações JDK 5.0, com exceção destas diferenças suteis:"
#. Tag: para
#: Jbossaop.xml:107
#, no-c-format
msgid "they are embedded as doclet tags"
-msgstr "Elas são incoporadas como caracteres doclet"
+msgstr "Elas são incorporadas como caracteres doclet."
#. Tag: para
#: Jbossaop.xml:110
#, no-c-format
msgid "You use a double at sign, i.e. '@@'"
-msgstr "Você usa o dobro na assinatura, por exemplo: '@@'"
+msgstr "Você usa o dobro na assinatura, por exemplo: '@@'."
#. Tag: para
#: Jbossaop.xml:113
@@ -595,7 +595,7 @@
"You MUST have a space after the tag name otherwise you will get a "
"compilation error. (This is the quirkiness of the QDox doclet compiler used "
"to compile the annotations.')"
-msgstr "Você DEVE ter um espaço após o nome do caractere, do contrário você obterá um erro do compilador. (Isto é a estranheza do compilador QDox doclet usado para compilar as anotações) "
+msgstr "Você DEVE ter um espaço após o nome do caractere, do contrário você obterá um erro do compilador. (Isto é a estranheza do compilador QDox doclet usado para compilar as anotações.) "
#. Tag: para
#: Jbossaop.xml:116
@@ -609,7 +609,7 @@
#: Jbossaop.xml:119
#, no-c-format
msgid "You cannot specify default values for an annotation's value"
-msgstr "Você não pode especificar os valores padrões para o valor da anotação"
+msgstr "Você não pode especificar os valores padrões para o valor da anotação."
#. Tag: para
#: Jbossaop.xml:123
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Term.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Term.po 2008-10-16 03:56:53 UTC (rev 6972)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_Pojo_Cache_Guide/pt-BR/Term.po 2008-10-16 06:10:36 UTC (rev 6973)
@@ -9,7 +9,7 @@
"Project-Id-Version: Term\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-09-21 04:57+0000\n"
-"PO-Revision-Date: 2008-10-15 15:45+1000\n"
+"PO-Revision-Date: 2008-10-16 13:54+1000\n"
"Last-Translator: Leticia de Lima <ldelima(a)redhat.com>\n"
"Language-Team: Brazilian Portuguese <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -35,7 +35,7 @@
msgid ""
"The section lists some basic terminology that will be used throughout this "
"guide."
-msgstr "A seção lista algumas terminologias básicas que serão usadas através deste guia."
+msgstr "A seção lista algumas terminologias básicas que serão usadas neste guia."
#. Tag: term
#: Term.xml:13
@@ -53,7 +53,7 @@
"transparently glue functionality together so that you can have a more "
"layered design. AOP allows you to intercept any event in a Java program and "
"trigger functionality based on those events."
-msgstr "A Programação de Posição Orientada - Aspect-Oriented Programming (AOP) é o novo padrão que permite você organizar e estender em camadas o seus aplicativos de software em maneiras que são inviáveis com as abordagens do tradicional objeto orientado. As posições permitem que você cole claramente a funcionalidade, de forma que você possua um design em camadas. O AOP permite que você interceda qualquer evento num programa Java e realize o trigger da funcionalidade baseada nestes eventos. "
+msgstr "A Programação de Posição Orientada - Aspect-Oriented Programming (AOP) é o novo padrão que permite você organizar e estender em camadas os seus aplicativos de software, de maneiras que são inviáveis com as abordagens do tradicional objeto orientado. As posições permitem que você cole claramente a funcionalidade, de forma que você possua um design em camadas. A AOP permite que você interceda qualquer evento num programa Java e realize o trigger da funcionalidade baseada nestes eventos. "
#. Tag: term
#: Term.xml:21
@@ -68,7 +68,7 @@
"JBossAop is an open-source Aop framework library developed by JBoss. It is "
"100% Java based and can be run either as a standalone or inside an "
"application server environment. More details can be found at www.jboss.com."
-msgstr "O JBossAop é uma biblioteca do Aop framework de código aberto desenvolvido pelo JBoss. Ela é 100% baseada no Java e pode ser rodada como autônoma ou dentro de um ambiente do servidor do aplicativo. Maiores informações podem ser encontradas no www.jboss.com."
+msgstr "O JBossAop é uma biblioteca do Aop framework de código aberto desenvolvido pelo JBoss. Ela é 100% baseada no Java e pode ser rodada como autônoma ou dentro de um ambiente do servidor do aplicativo. Você poderá encontrar maiores informações a este respeito no www.jboss.com."
#. Tag: term
#: Term.xml:29
@@ -83,7 +83,7 @@
"Dynamic Aop is a feature of JBossAop that provides a hook so that a caller "
"can insert event interception on the POJO at runtime. PojoCache currently "
"uses this feature to perform field level interception."
-msgstr "O Aop de Dinâmica é um recurso do JBossAop que fornece força, de maneira que um chamador pode inserir uma intercepção de evento no POJO no período de execução. O PojoCache atualmente usa este recurso para executar a intercepção do nível do campo. "
+msgstr "A Aop de Dinâmica é um recurso do JBossAop que fornece força, de maneira que um chamador pode inserir uma intercepção de evento no POJO no período de execução. O PojoCache atualmente usa este recurso para executar a intercepção do nível de campo. "
#. Tag: term
#: Term.xml:37
@@ -100,7 +100,7 @@
"membership management. It has been a de facto replication layer used by "
"numerous open-source projects for clustering purposes. It is also used by "
"JBossCache for replication layer."
-msgstr "O JGroups é uma biblioteca de mensagem de grupo Java que é LGPL e de código aberto. Adicionado ao transporte de mensagem confiável, ele também executa o gerenciamento de membro de grupo. Na realidade isto é uma camada de replicação usada por inúmeros projetos de código aberto para fins de clustering. Isto é usado também pelo JBossCache para a camada de replicação."
+msgstr "O JGroups é uma biblioteca de mensagem de grupo Java que é LGPL e de código aberto. Adicionado ao transporte de mensagem confiável, ele também executa o gerenciamento de membro de grupo. Na realidade, isto é uma camada de replicação usada por inúmeros projetos de código aberto para fins de clustering. Isto é usado também pelo JBossCache para a camada de replicação."
#. Tag: term
#: Term.xml:45
@@ -163,7 +163,7 @@
"listing. Note that When a POJO is declared properly either through the xml "
"or annotation, we consider it \"aspectized\"."
msgstr ""
-"A Preparação é uma palavra-chave na linguagem do JBossAop pointcut usada para especificar qual POJO precisa ser instrumentado. Ela aparece num arquivo <literal>jboss-aop.xml</"
+"A Preparação é uma palavra-chave na linguagem do JBossAop pointcut, usada para especificar qual POJO precisa ser instrumentado. Ela aparece num arquivo <literal>jboss-aop.xml</"
"literal>. No entanto, caso você possa usar a anotação para especificar a instrumentação POJO, não existe a necessidade para uma listagem do <literal>jboss-aop.xml</literal>. Perceba que QUANDO um POJO é propriamente declarado, tanto através do xml ou anotação, nós consideramos isto \"posicionado\"."
#. Tag: term
@@ -183,6 +183,6 @@
"classloader in the run script. This step is necessary for an Aop system to "
"intercept events that are interesting to users."
msgstr ""
-"A Instrumentação é m processo Aop que basicamente pré-processa (por exemplo: executando a ondulação do código byte) no POJO. Existem dois módulos: compile- ou "
-"load-time. A ondulação do período de compilação pode ser feita com um pré-compilador Aop (<literal>aopc</literal>), enquanto o período de carregamento é feito para especificar um carregado de classe especial no script de execução. Este passo é necessário para um sistema Aop intervir nos eventos que são interessantes aos usuários."
+"A Instrumentação é um processo Aop que basicamente pré-processa (por exemplo: executando a ondulação do código byte) no POJO. Existem dois módulos: compile- ou "
+"load-time. A ondulação do período de compilação pode ser feita com um pré-compilador Aop (<literal>aopc</literal>), enquanto o período de carregamento é feito para especificar um carregador de classe especial no script de execução. Este passo é necessário para um sistema Aop intervir nos eventos que são interessantes aos usuários."
16 years
JBoss Cache SVN: r6972 - enterprise-docs/tags/JBoss_EAP_4_3/Cache_FAQ/es-ES.
by jbosscache-commits@lists.jboss.org
Author: mospina
Date: 2008-10-15 23:56:53 -0400 (Wed, 15 Oct 2008)
New Revision: 6972
Modified:
enterprise-docs/tags/JBoss_EAP_4_3/Cache_FAQ/es-ES/Book_Info.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_FAQ/es-ES/Cache_Frequently_Asked_Questions.po
enterprise-docs/tags/JBoss_EAP_4_3/Cache_FAQ/es-ES/Colophon.po
Log:
translation completed
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_FAQ/es-ES/Book_Info.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_FAQ/es-ES/Book_Info.po 2008-10-16 03:22:27 UTC (rev 6971)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_FAQ/es-ES/Book_Info.po 2008-10-16 03:56:53 UTC (rev 6972)
@@ -8,7 +8,7 @@
"Project-Id-Version: Book_Info\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-05-30 03:54+0000\n"
-"PO-Revision-Date: 2008-10-13 14:39+1000\n"
+"PO-Revision-Date: 2008-10-16 13:40+1000\n"
"Last-Translator: Angela Garcia\n"
"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -26,13 +26,13 @@
#: Book_Info.xml:10
#, no-c-format
msgid "Frequently Asked Questions"
-msgstr ""
+msgstr "Preguntas más frecuentes"
#. Tag: para
#: Book_Info.xml:15
#, no-c-format
msgid "This book is a compilation of frequently asked questions about JBoss Cache"
-msgstr ""
+msgstr "Este libro es una compilación de las preguntas más frecuentes sobre JBoss Cache"
#. Tag: holder
#: Book_Info.xml:30
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_FAQ/es-ES/Cache_Frequently_Asked_Questions.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_FAQ/es-ES/Cache_Frequently_Asked_Questions.po 2008-10-16 03:22:27 UTC (rev 6971)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_FAQ/es-ES/Cache_Frequently_Asked_Questions.po 2008-10-16 03:56:53 UTC (rev 6972)
@@ -4,7 +4,7 @@
"Project-Id-Version: Cache_Frequently_Asked_Questions\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-05-30 03:54+0000\n"
-"PO-Revision-Date: 2008-10-15 14:37+1000\n"
+"PO-Revision-Date: 2008-10-16 13:36+1000\n"
"Last-Translator: Angela Garcia\n"
"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -2020,19 +2020,19 @@
"slow. Performance between Set, Map and List collections also vary. Adding "
"items to a Set is slower than a List or Map, since Set does not allow "
"duplicate entries."
-msgstr ""
+msgstr "Otro punto relacionado es el rendimeinto esperado. Por ejemplo, la implemetación actual es ordenada para que realice insert/delete desde collection lentamente. El rendimiento entre las colecciones Set, Map y List también varian. El añadir elementos a Set es más lento que añadirlos a List o Map ya que Set no permite entradas duplicadas. "
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1604
#, no-c-format
msgid "What are the pros and cons of PojoCache?"
-msgstr ""
+msgstr "¿Cuáles son las ventajas y las desventajas de PojoCache?"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1608
#, no-c-format
msgid "As mentioned in the reference doc, PojoCache has the following advantages:"
-msgstr ""
+msgstr "Como lo mencionamos en el documento de referencia, PojoCache ofrece las siguientes ventajas:"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1611
@@ -2042,7 +2042,7 @@
"PojoCache and once your POJO is put in the cache store, there is no need to "
"use another API to trigger your changes. Furthermore, the replication are "
"fine-grained field level. Note this also applies to persistency."
-msgstr ""
+msgstr "Replicación y/o persistencia detallada. Si utiliza un PojoCache distribuido y una vez su POJO se pone en el almacenamiento de caché, no hay necesidad de utilizar otro API para disparar sus cambios. Además las réplicas son a nivel de campo detallado. Observe que esto también aplica a la persistencia. "
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1618
@@ -2050,7 +2050,7 @@
msgid ""
"Fine-grained replication can have potential performance gain if your POJO is "
"big and the changes are fine-grained, e.g., only to some selected fields."
-msgstr ""
+msgstr "La replicación detallada puede tener una gran ganacia para el rendimeinto si su POJO es grande y los cambios son detallados, por ejemplo, sólo a algunos campos seleccionados. "
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1623
@@ -2058,13 +2058,13 @@
msgid ""
"POJO can posses object relationship, e.g., multiple referenced. Distributed "
"PojoCache will handle this transparently for you."
-msgstr ""
+msgstr "POJO puede tener relaciones de objetos, por ejemplo, referenciados de manera múltiple. El PojoCache distribuido manejará esto por usted de manera transparente. "
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1628
#, no-c-format
msgid "And here are some cases that you may not want to use PojoCache:"
-msgstr ""
+msgstr "Estos son algunos casos en los que no debería utilizar PojoCache:"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1631
@@ -2073,7 +2073,7 @@
"You use only cache. That is you don't need replication or persistency. Then "
"since everything is operated on the in-memory POJO reference, there is no "
"need for PojoCache."
-msgstr ""
+msgstr "Sólo utiliza caché, es decir no necesita replicación o persistencia. Por lo tanto ya que todo es operado en la referencia POJO en la memoria entonces no hay necesidad de tener PojoCache."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1636
@@ -2082,7 +2082,7 @@
"You have simple and small POJOs. Your POJO is small in size and also there "
"is no object relationship, then PojoCache possess not clear advantage to "
"plain cache."
-msgstr ""
+msgstr "Tiene POJOs simples y pequeños. Su POJO es pequeño y tampoco tiene relación de objetos entonces en este caso PojoCache no ofrece una gran ventaja sobre el caché normal. "
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1641
@@ -2092,7 +2092,7 @@
"twice as much of memory (the original POJO in-memory space and also the "
"additional cache store for the primitive fields), you may not want to use "
"PojoCache."
-msgstr ""
+msgstr "Su aplicación está vinculada por el uso de memoria. Ya que PojoCache necesita casi el doble de memoria (el espacio original en memoria POJO y también el almacenamiento en caché adicional para los campos primitivos) entonces es probable que no quiera utilizar PojoCache."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1647
@@ -2101,19 +2101,19 @@
"Your POJO lifetime is short. That is, you need to create and destroy your "
"POJO often. Then you need to do \"pubObject\" and \"removeObject\" often, it "
"will be slow in performance."
-msgstr ""
+msgstr "El tiempo de vida de su POJO es corto. Es decir necesita crear y destruir su POJO con frecuencia. Entonces necesita realizar \"pubObject\" y \"removeObject\" frecuentemente y por lo tanto será lento en rendimiento. "
#. Tag: title
#: Cache_Frequently_Asked_Questions.xml:1657
#, no-c-format
msgid "Eviction Policies"
-msgstr ""
+msgstr "Políticas de eliminación"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1664
#, no-c-format
msgid "Does JBoss Cache support eviction policies?"
-msgstr ""
+msgstr "¿JBoss Cache soporta políticas de eliminación?"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1668
@@ -2127,6 +2127,8 @@
"<literal>FIFOPolicy</literal> that evicts the node based on FIFO principle "
"only."
msgstr ""
+"Sí. JBoss Cache actualmente implementa un política de eliminación LRU para TreeCache ( <literal>org.jboss.cache.eviction.LRUPolicy</literal> ) y "
+"PojoCache ( <literal>org.jboss.cache.aop.eviction.AopLRUPolicy</literal> ). Los usuarios también pueden implementar sus propios algoritmos de políticas de eliminación. Consulte el manual del usuario para obtener más detalles. En este momento hay una política contribución del usuario llamada <literal>FIFOPolicy</literal> que elimina el nodo sólo con base en el principio FIFO."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1689
@@ -2134,7 +2136,7 @@
msgid ""
"Why can't I use <literal>org.jboss.cache.eviction.LRUPolicy</literal> for "
"PojoCache as well?"
-msgstr ""
+msgstr "¿Por qué no puedo utilizar <literal>org.jboss.cache.eviction.LRUPolicy</literal> para PojoCache también?"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1697
@@ -2144,6 +2146,9 @@
"AopLRUPolicy</literal> ) because AOP has its eviction algorithm, although is "
"LRU but has totally different notion of an \"object\", for example."
msgstr ""
+"Para PojoCache necesitará utilizar <literal>org.jboss.cache.aop.eviction."
+"AopLRUPolicy</literal> ) ya que AOP tiene su algoritmo de eliminación, aunque es "
+"LRU pero por ejemplo, cuenta con una noción completamente diferente de un \"objeto\"."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1708
@@ -2151,13 +2156,13 @@
msgid ""
"Does JBoss Cache's implemented LRU eviction policy operates in replication "
"mode?"
-msgstr ""
+msgstr "¿La política de eliminación LRU implementada de JBoss Cache opera en modo de replicación?"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1714
#, no-c-format
msgid "Yes and no. :-)"
-msgstr ""
+msgstr "Sí y no. :-)"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1716
@@ -2171,6 +2176,8 @@
"the data in the cache. During this moment, the node content will be "
"propagated and the cache content will be in sync."
msgstr ""
+"La política LRU sólo opera en modo local. Es decir que los nodos sólo se eliminan localmente. Esto puede hacer que el contenido del caché no esté sincronizado temporalmente. Pero cuando un usuario trata de obtener el contenido en caché de un nodo eliminado y se encuentre con que es nulo (por ejemplo, <literal>get</literal> "
+"retorna nulo), debe obtenerlo de la otra fuente de datos y debe repopular los datos en el caché. Durante este momento, el contenido del nodo será propagado y el contenido del caché estará sincronizado. "
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1727
@@ -2181,7 +2188,7 @@
"your use case, you can set multiple cache instances to have their own "
"eviction policy (which are applied locally) or just have selected instances "
"with eviction policies activated."
-msgstr ""
+msgstr "Sin embargo, puede ejeuctar políticas de eliminacióncon el modo caché configurado como <literal>REPL_SYNC</literal> o <literal>REPL_ASYNC</literal> . Dependiendo de su caso, puede configurar múltiples instancias caché para que tengan su propia política de eliminación (las cuales se aplican localmente) o simplemente tenga instancias seleccionadas con políticas de eliminación activadas."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1738
@@ -2190,13 +2197,13 @@
"Also note that, with cache loader option, a locally evicted node can also be "
"persisted to the backend store and a user can retrieve it from the store "
"later on."
-msgstr ""
+msgstr "También observe que con la opción de cargador caché, un nodo eliminado localmente también puede ser persistido en el almacenamiento backend y un usuario puede recuperarlo del almacenamiento después. "
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1747
#, no-c-format
msgid "Does JBoss Cache support <literal>Region</literal> ?"
-msgstr ""
+msgstr "¿JBoss Cache soporta <literal>Region</literal> ?"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1754
@@ -2206,6 +2213,8 @@
"eviction policy parameters (e.g., <literal>maxNodes</literal> or "
"<literal>timeToIdleSeconds</literal> )"
msgstr ""
+"Sí. JBoss Cache cuenta con la noción de región en donde un usuario puede configurar los parámetros de la política de eliminación (por ejemplo, <literal>maxNodes</literal> o "
+"<literal>timeToIdleSeconds</literal> )"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1762
@@ -2218,6 +2227,9 @@
"programmatically now, i.e., everything has to be configured through the xml "
"file."
msgstr ""
+"Una región en JBoss Cache denota una porción de jerarquía de árbol, por ejemplo, un nombre completamente calificado ( <literal>FQN</literal> ). Por ejemplo, un usuario puede definir "
+"<literal>/org/jboss</literal> y <literal>/org/foocom</literal> como dos regiones separadas. Pero note que puede configurar la región "
+"programáticamente, por ejemplo, todo tiene que ser configurado por medio del archivo xml."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1779
@@ -2226,18 +2238,20 @@
"What are the <literal>EvictionPolicyConfig</literal> tag parameters for "
"<literal>org.jboss.cache.eviction.LRUPolicy</literal> ?"
msgstr ""
+"¿Cuáles son los parámetros de etiquetas <literal>EvictionPolicyConfig</literal> para "
+"<literal>org.jboss.cache.eviction.LRUPolicy</literal> ?"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1789
#, no-c-format
msgid "They are:"
-msgstr ""
+msgstr "Son: "
#. Tag: title
#: Cache_Frequently_Asked_Questions.xml:1793
#, no-c-format
msgid "Parameters"
-msgstr ""
+msgstr "Parámetros"
#. Tag: entry
#: Cache_Frequently_Asked_Questions.xml:1798
@@ -2251,13 +2265,13 @@
msgid ""
"Interval where the clean up thread wakes to process the sitting queue and "
"sweep away the old data."
-msgstr ""
+msgstr "El intervalo en donde el hilo de limpieza empieza a procesar la cola existente y empieza a borrar los datos viejos. "
#. Tag: entry
#: Cache_Frequently_Asked_Questions.xml:1806
#, no-c-format
msgid "region"
-msgstr ""
+msgstr "región"
#. Tag: entry
#: Cache_Frequently_Asked_Questions.xml:1808
@@ -2265,7 +2279,7 @@
msgid ""
"A area where each eviction policy parameters are specified. Note that it "
"needs a minimum of <literal>/_default</literal> region."
-msgstr ""
+msgstr "Un área en donde se especifica cada parámetro de la política de eliminación. Observe que necesita un minimo de una región <literal>/_default</literal>."
#. Tag: entry
#: Cache_Frequently_Asked_Questions.xml:1816
@@ -2277,7 +2291,7 @@
#: Cache_Frequently_Asked_Questions.xml:1818
#, no-c-format
msgid "Max number of nodes allowed in the eviction queue. 0 means no limit."
-msgstr ""
+msgstr "Número máximo de nodos permitidos en la cola de eliminación. 0 significa que no hay límite. "
#. Tag: entry
#: Cache_Frequently_Asked_Questions.xml:1824
@@ -2289,7 +2303,7 @@
#: Cache_Frequently_Asked_Questions.xml:1826
#, no-c-format
msgid "Age (in seconds) for the node to be evicted in the queue. 0 denotes no limit."
-msgstr ""
+msgstr "Edad (en segundos) para que el nodo sea eliminado de la cola. 0 denota que no hay límite. "
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1838
@@ -2298,6 +2312,8 @@
"I have turned on the eviction policy, why do I still get \"out of memory"
"\" (OOM) exception?"
msgstr ""
+"La política de eliminación está prendida, ¿por qué sigo recibiendo la excepción \"out of memory"
+"\" (OOM)?"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1844
@@ -2312,6 +2328,9 @@
"the VM heap size, you can also reduce the <literal>wakeUpIntervaleInSeconds</"
"literal> so the timer thread processes the queue more frequently."
msgstr ""
+"OOM puede tener lugar cuando la velocidad del acceso al caché excede la velocidad del temporizador de manejo de la política de eliminación. El manejador de la política de eliminación se despertará cada "
+"<literal>wakeUpIntervalInSeconds</literal> segundos para procesar la cola del evento de eliminación. El tamaño de la cola está fijo en 20000. Así que cuando el tamaño de la cola esté lleno, creará un backlog y hará que tenga lugar un OOM a menos de que el temporizador de eliminación lo alcance. Para solucionar este problema, además de incrementar el tamaño heap de la MV también puede reducir el <literal>wakeUpIntervaleInSeconds</"
+"literal> de manera que el hilo del temporizador procesa la cola con más frecunecia."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1858
@@ -2319,19 +2338,19 @@
msgid ""
"We will also externalize the queue size so it will be configurable in the "
"next release."
-msgstr ""
+msgstr "También vamos a hacer externo el tamaño de la cola para que sea configurable en el próximo lanzamiento. "
#. Tag: title
#: Cache_Frequently_Asked_Questions.xml:1866
#, no-c-format
msgid "Cache Loaders"
-msgstr ""
+msgstr "Cargadores de caché"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1873
#, no-c-format
msgid "What is a CacheLoader?"
-msgstr ""
+msgstr "¿Qué es un CacheLoader?"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1877
@@ -2342,7 +2361,7 @@
"data is not in the cache, and when modifications are made to data in the "
"cache the CacheLoader is called to store those modifications back to the "
"store."
-msgstr ""
+msgstr "A CacheLoader es la conección de JBossCache a un almacenamiento de datos (persistente). El CacheLoader es llamado por JBossCache para buscar datos desde un almacenamiento cuando esos datos no se encuentran en el caché y cuando las modificaciones se realizan en los datos en el caché se llama al CacheLoader para almacenar esas modificaciones en el almacenamiento."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1884
@@ -2354,7 +2373,7 @@
"data is evicted, in order to provide fast access to frequently accessed "
"data. This is all configured through XML, and the programmer doesn't have to "
"take care of loading and eviction."
-msgstr ""
+msgstr "JUnto con las políticas de eliminación, JBossCache con un CacheLoader le permite a un usuario mantener un caché vinculado para un gran almacenamiento de datos backend. Con frecuencia datos usados son buscados desde el almacenamiento de datos en el caché y los datos menos utilizados son eliminados con el fin de proporcionar un rápido acceso a los datos accedidos con bastante frecuencia. Todo esto se configura por medio de XML y el programador no tiene que encargarse de cargar y eliminar. "
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1893
@@ -2362,7 +2381,7 @@
msgid ""
"JBossCache currently ships with several CacheLoader implementations, "
"including:"
-msgstr ""
+msgstr "JBossCache actualmente se envía junto con varias implementaciones de CacheLoader, incluyendo: "
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1900
@@ -2373,6 +2392,8 @@
"subdirectories etc. Attributes of a node are mapped to a file <literal>data</"
"literal> inside the directory."
msgstr ""
+"FileCacheLoader: esta implementación utiliza el sistema de archivos para almacenar y recuperar datos. Los nodos de JBossCache son mapeados a directorios, los subnodos a subdirectorios, etc. Los atributos de un nodo son mapeados a un archivo <literal>data</"
+"literal> dentro del directorio."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1911
@@ -2385,6 +2406,10 @@
"url=\"http://www.sleepycat.com/jeforjbosscache\">commercial license from "
"Sleepycat </ulink> ."
msgstr ""
+"BdbjeCacheLoader: esta implementación se basa en la base de datos Sleepycat Java Edition, una base de datos transaccional rápida y eficiente. Utiliza un sólo archivo para todo el almacenamiento. Observe que si utiliza el CacheLoader de Sleepycat con "
+"JBoss Cache y desea enviar su producto entonces tendrá que adquirir una licensia comercial <ulink "
+"url=\"http://www.sleepycat.com/jeforjbosscache\"> de "
+"Sleepycat </ulink> ."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1923
@@ -2392,7 +2417,7 @@
msgid ""
"JDBCCacheLoader: this implementation uses the relational database as the "
"persistent storage."
-msgstr ""
+msgstr "JDBCCacheLoader: esta implementación utiliza la base de datos relacional como el almacenamiento persistente."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1929
@@ -2401,18 +2426,20 @@
"ClusteredCacheLoader: this implementation queries the rest of the cluster, "
"treating other servers' in-memory state as a data store."
msgstr ""
+"ClusteredCacheLoader: esta implementación realiza peticiones al resto del clúster, "
+"tratando el estado en memoria de otros servidores como un almacenamiento de datos."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1935
#, no-c-format
msgid "And more. See the documentation for more details."
-msgstr ""
+msgstr "Y más, consulte la documentación para obtener mayores detalles."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1944
#, no-c-format
msgid "Can writing to CacheLoaders be asynchronous?"
-msgstr ""
+msgstr "¿La escritura en CacheLoaders puede ser asincrónica?"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1948
@@ -2421,13 +2448,13 @@
"As of JBossCache 1.2.4, yes. Set the CacheLoaderAsynchronous property to "
"true. See the JBossCache documentation for a more detailed discussion. By "
"default though, all cache loader writes are synchronous and will block."
-msgstr ""
+msgstr "Sí desde JBossCache 1.2.4. Configure la propiedad CacheLoaderAsynchronous como verdadera. Consulte la documentación de JBossCache para obtner una discusión más detallada. Sin embargo, por defecto todas las escrituras de los cargadores de caché son sincrónicas y se bloquearán."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1958
#, no-c-format
msgid "Can I write my own CacheLoader ?"
-msgstr ""
+msgstr "¿Puedo escribir mi propio CacheLoader ?"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1962
@@ -2437,12 +2464,14 @@
"CacheLoader</literal> . It is configured via the XML file (see JBossCache "
"and Tutorial documentation)."
msgstr ""
+"Sí. Un CacheLoader es una clase implementando <literal>org.jboss.cache.loader."
+"CacheLoader</literal> . Se puede configurar por medio del archivo XML (consulte la documentación y los tutoriales de JBossCache)."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1973
#, no-c-format
msgid "Does a CacheLoader have to use a persistent store ?"
-msgstr ""
+msgstr "¿Un CacheLoader tiene que utilizar un almacenamiento persistente?"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1977
@@ -2453,19 +2482,19 @@
"fetches contents from the web. Note that an implementation of CacheLoader "
"may not implement the 'store' functionality in this case, but just the "
"'load' functionality."
-msgstr ""
+msgstr "No, un CacheLoader puede por ejemplo buscar (y posiblemente almacenar) sus datos desde un servidor web webdav-capable. Otro ejemplo es un srevidor proxy con caché, el cual busca contenido en la web. Observe que puede que una implementación de CacheLoader no implemente la funcionalidad del 'almacenamiento' en este caso, sino sólo la funcionalidad de 'carga'."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1989
#, no-c-format
msgid "What can I use a CacheLoader for?"
-msgstr ""
+msgstr "¿Para qué puedo utilizar un CacheLoader?"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1993
#, no-c-format
msgid "Some applications:"
-msgstr ""
+msgstr "Algunas aplicaciones:"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1998
@@ -2476,6 +2505,8 @@
"node in a cluster has its own local store. It is also possible to attach a "
"CacheLoader to just <emphasis>one</emphasis> of the nodes."
msgstr ""
+"Las sesiones HTTP pueden ser persistidas (además de ser replicadas por JBossCache). El "
+"CacheLoader se puede configurar para que sea compartido o no compartido, lo que significa que todo nodo en un clúster tiene su propio almacenamiento local. También es posible adjuntar un CacheLoader a sólo <emphasis>uno</emphasis> de los nodos."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:2010
@@ -2484,6 +2515,8 @@
"Simple persistence for POJOs. Use of JBossCache aop and a local CacheLoader "
"persist POJOs transparently into the store provided by the CacheLoader."
msgstr ""
+"Persistencia simple para POJOs. El uso de JBossCache aop y un CacheLoader local "
+"persiste los POJOs de manera transparente en el almacenamiento que el CacheLoader proporciona."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:2017
@@ -2493,7 +2526,7 @@
"long as at least 1 node is running, but even if all nodes are taken offline, "
"when the first node is started again, the data previously saved will still "
"be available (e.g. a shopping cart)."
-msgstr ""
+msgstr "Almacenamiento de datos persistidos y replicados altamente disponible. El servicio se encuentra funcionando en tanto haya por lo menos un nodo ejecutando, pero incluso si se sacan todos los nodos fuera de línea, cuando el primer nodo se re-inicia de nuevo, los datos guardados previamente todavía estarán disponibles (por ejemplo, un carrito de compras)."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:2026
@@ -2503,13 +2536,13 @@
"access the proxy, and if the URL is not in the cache, the CacheLoader "
"fetches it from the web. This could actually be a replicated and "
"transactional version of Squid."
-msgstr ""
+msgstr "UN proxy web en caché (a la Squid): todos los datos son contenido de URLs, los usuarios acceden al proxy y si la URL no se encuentra en el caché entonces el CacheLoader lo busca en la web. De hecho esto puede ser una versión replica y transaccional de Squid."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:2040
#, no-c-format
msgid "How do I configure JBossCache with a CacheLoader?"
-msgstr ""
+msgstr "¿Cómo puedo configurar JBossCache con un CacheLoader?"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:2044
@@ -2519,12 +2552,14 @@
"configuration string have to be given. JBossCache will then instantiate a "
"CacheLoader. See JBossCache documentation for details."
msgstr ""
+"Por medio de XML: se tiene que proporcionar el nombre de clase completamente calificado del CacheLoader y su cadena de configuración. Después JBossCache instanciará un "
+"CacheLoader. Consulte la documentación de JBossCache para obtener más detalles."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:2054
#, no-c-format
msgid "Do I have to pay to use Sleepycat's CacheLoader?"
-msgstr ""
+msgstr "¿Tengo que pagar para utilizar el CacheLoader de Sleepycat?"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:2058
@@ -2535,12 +2570,14 @@
"from Sleepycat. See details at <ulink url=\"http://www.sleepycat.com/"
"jeforjbosscache\">http://www.sleepycat.com/jeforjbosscache </ulink> ."
msgstr ""
+"No si sólo es para uso personal. En el momento en que distribuya su producto con BdbjeCacheLoader, tendrá que comprar una licencia comercial de Sleepycat. Puede encontrar más detalles en <ulink url=\"http://www.sleepycat.com/"
+"jeforjbosscache\">http://www.sleepycat.com/jeforjbosscache </ulink> ."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:2071
#, no-c-format
msgid "Can I use more than one cache loader?"
-msgstr ""
+msgstr "¿Puedo utilizar más de un cargador de caché?"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:2075
@@ -2554,6 +2591,8 @@
"written to (except if the ignoreModifications element has been set to true "
"for a specific cache loader."
msgstr ""
+"Sí desde JBossCache 1.3.0. Con el nuevo elemento XML CacheLoaderConfiguration (consulte la sección del manual del usuario sobre caragores de caché) ahora puede describir varios cargadores de caché. El impacto es que el caché mirará todos los cargadores de caché en el orden en que han sido configurados hasta que encuentre un elemento de datos válido, "
+"no-nulo. Al realizar escrituras, todos los cargadores de caché se escriben en (excepto si el elemento ignoreModifications ha sido configurado como verdadero para un cargador de caché en especifico."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:2089
@@ -2562,7 +2601,7 @@
"Why do cache loaders go into an inconsistent state when I use transactions, "
"pessimistic locking, and I attempt to read a node after removing it from "
"within the same transaction scope?"
-msgstr ""
+msgstr "¿Por qué los cargadores de caché entran en un estado inconsistente cuando utilizo transacciones, bloqueo pesimista y trato de leer otro nodo después de removerlo de dentro del ámbito de la misma transacción?"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:2096
@@ -2574,6 +2613,11 @@
"JBoss Cache 1.4.0. A very simple workaround if you're using JBoss Cache 1.3."
"x is to use optimistic locking."
msgstr ""
+"Este es un error conocido (refiérase a <ulink url=\"http://jira.jboss.com/jira/browse/"
+"JBCACHE-477\">JBCACHE-477</ulink> y <ulink url=\"http://jira.jboss.com/"
+"jira/browse/JBCACHE-352\">JBCACHE-352</ulink> ), los cuales se han arreglado en "
+"JBoss Cache 1.4.0. Una solución simple si está utilizando JBoss Cache 1.3."
+"x es utilizar el bloqueo optimista."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:2104
@@ -2584,13 +2628,13 @@
"and remove someelements of that List within a transaction (when using "
"pessimistic locking and a cache loader), you may see IllegalStateExceptions "
"thrown."
-msgstr ""
+msgstr "Una de las consecuencias de este error es que, por ejemplo, si utiliza PojoCache con pojos que tienen referencias privadas a una List y puede actualizar y eliminar algunos elementos de esa LIst dentro de una transacción (al utilizar el bloqueo pesimista y un cargador de caché) podrá ver que se presentan algunas IllegalStateExceptions. "
#. Tag: title
#: Cache_Frequently_Asked_Questions.xml:2116
#, no-c-format
msgid "Troubleshooting"
-msgstr ""
+msgstr "Resolución de problemas"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:2121
@@ -2598,7 +2642,7 @@
msgid ""
"I am having problems getting JBoss Cache to work, where can I get "
"information on troubleshooting?"
-msgstr ""
+msgstr "Tengo problemas en hacer funcionar JBoss Cache, ¿dónde puedo obtener información sobre resolución de problemas?"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:2125
@@ -2608,4 +2652,7 @@
"wiki.jboss.org/wiki/Wiki.jsp?page=JBossCacheTroubleshooting\">wiki link</"
"ulink> ."
msgstr ""
+"La sección sobre resolución de problemas se puede encontrar en el siguiente enlace wiki <ulink url=\"http://"
+"wiki.jboss.org/wiki/Wiki.jsp?page=JBossCacheTroubleshooting\"></"
+"ulink> ."
Modified: enterprise-docs/tags/JBoss_EAP_4_3/Cache_FAQ/es-ES/Colophon.po
===================================================================
--- enterprise-docs/tags/JBoss_EAP_4_3/Cache_FAQ/es-ES/Colophon.po 2008-10-16 03:22:27 UTC (rev 6971)
+++ enterprise-docs/tags/JBoss_EAP_4_3/Cache_FAQ/es-ES/Colophon.po 2008-10-16 03:56:53 UTC (rev 6972)
@@ -4,7 +4,7 @@
"Project-Id-Version: Colophon\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-05-30 03:54+0000\n"
-"PO-Revision-Date: 2008-10-13 11:17+1000\n"
+"PO-Revision-Date: 2008-10-16 13:39+1000\n"
"Last-Translator: Angela Garcia\n"
"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -42,13 +42,15 @@
"jobtitle><orgname>ArborText, Inc.</orgname><orgdiv>Application Developement</"
"orgdiv>"
msgstr ""
+"<shortaffil>ATI</shortaffil><jobtitle>Analista de aplicaciones senior</"
+"jobtitle><orgname>ArborText, Inc.</orgname><orgdiv>Desarrollo de aplicaciones</"
+"orgdiv>"
#. Tag: title
#: Colophon.xml:16
#, no-c-format
-#, fuzzy
msgid "Translator"
-msgstr "Translator!!!!!!!!!!!!!!!!!!!!!!!"
+msgstr "Angela Garcia - agarcia(a)redhat.com"
#. Tag: othercredit
#: Colophon.xml:17
@@ -60,5 +62,5 @@
#: Colophon.xml:19
#, no-c-format
msgid "Extensive review and rough drafts of Section 1.3, 1.4, and 1.5"
-msgstr ""
+msgstr "Revisión exhaustiva y borradores de las secciones 1.3, 1.4 y 1.5"
16 years