[jboss-cvs] JBossAS SVN: r77183 - projects/docs/enterprise/4.3/Cache/Cache_FAQ/pt-BR.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Aug 19 02:16:39 EDT 2008
Author: ldelima at redhat.com
Date: 2008-08-19 02:16:39 -0400 (Tue, 19 Aug 2008)
New Revision: 77183
Modified:
projects/docs/enterprise/4.3/Cache/Cache_FAQ/pt-BR/Cache_Frequently_Asked_Questions.po
Log:
translation ongoing
Modified: projects/docs/enterprise/4.3/Cache/Cache_FAQ/pt-BR/Cache_Frequently_Asked_Questions.po
===================================================================
--- projects/docs/enterprise/4.3/Cache/Cache_FAQ/pt-BR/Cache_Frequently_Asked_Questions.po 2008-08-19 06:14:50 UTC (rev 77182)
+++ projects/docs/enterprise/4.3/Cache/Cache_FAQ/pt-BR/Cache_Frequently_Asked_Questions.po 2008-08-19 06:16:39 UTC (rev 77183)
@@ -5,7 +5,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-08-19 16:14+1000\n"
+"PO-Revision-Date: 2008-08-19 16:16+1000\n"
"Last-Translator: Leticia de Lima <ldelima at redhat.com>\n"
"Language-Team: Brazilian Portuguese <en at li.org>\n"
"MIME-Version: 1.0\n"
@@ -1071,6 +1071,9 @@
"configure to have different set of data residing on different cache "
"instances while still participating as a replication group."
msgstr ""
+"Not right now. JBoss Cache does not support partitioning that a user can "
+"configure to have different set of data residing on different cache "
+"instances while still participating as a replication group."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:892
@@ -1079,6 +1082,8 @@
"Does JBoss Cache handle the concept of application classloading inside, say, "
"a J2EE container?"
msgstr ""
+"Does JBoss Cache handle the concept of application classloading inside, say, "
+"a J2EE container?"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:898
@@ -1089,6 +1094,10 @@
"specific version of the user library. However, by default JBoss Cache is "
"agnostic to the classloader. In general, this leads to two kinds of problems:"
msgstr ""
+"Application-specific classloading is used widely inside a J2EE container. "
+"For example, a web application may require a new classloader to scope a "
+"specific version of the user library. However, by default JBoss Cache is "
+"agnostic to the classloader. In general, this leads to two kinds of problems:"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:907
@@ -1101,6 +1110,12 @@
"may not be able to access the object if the user thread is expecting a type "
"defined by the application classloader."
msgstr ""
+"Object instance is stored in cache1 and replicated to cache2. As a result, "
+"the instance in cache2 is created by the system classloader. The replication "
+"may fail if the system classloader on cache2 does not have access to the "
+"required class. Even if replication doesn't fail, a user thread in cache2 "
+"may not be able to access the object if the user thread is expecting a type "
+"defined by the application classloader."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:918
@@ -1113,6 +1128,12 @@
"passing an object from one application space to another; JBossCache just "
"adds a level of indirection in passing the object."
msgstr ""
+"Object instance is created by thread 1 and will be accessed by thread 2 "
+"(with two different classloaders). JBossCache has no notion of the different "
+"classloaders involved. As a result, you will have a "
+"<literal>ClassCastException</literal> . This is a standard problem in "
+"passing an object from one application space to another; JBossCache just "
+"adds a level of indirection in passing the object."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:931
@@ -1124,6 +1145,11 @@
"for use in handling objects replicated to that portion. See the "
"TreeCacheMarshaller section of the user guide for more details."
msgstr ""
+"To solve the first kind of issue, in JBoss Cache 1.2.4 we introduced the "
+"concept of a <literal>TreeCacheMarshaller</literal> . Basically, this allows "
+"application code to register a classloader with a portion of the cache tree "
+"for use in handling objects replicated to that portion. See the "
+"TreeCacheMarshaller section of the user guide for more details."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:941
@@ -1138,6 +1164,14 @@
"to be used as a \"near-line\" cache. Note also that each time the serialized "
"bytes are deserialized, a new instance of the object is created."
msgstr ""
+"To solve the second kind of issue, the only solution (that we know of) is to "
+"cache \"serialized\" byte code and only de-serialize it during every object "
+"get (and this will be expensive!). That is, during a put operation, the "
+"object instance will be serialized and therefore can be deserialized safely "
+"by a \"foreign\" classloader. However, the performance penalty of this "
+"approach is quite severe so in general another local in-vm version will need "
+"to be used as a \"near-line\" cache. Note also that each time the serialized "
+"bytes are deserialized, a new instance of the object is created."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:952
@@ -1148,6 +1182,10 @@
"Here is a code snippet that illustrates how you can create a wrapper around "
"JBossCache to handle the classloader issue:"
msgstr ""
+"To help with this kind of handling, JBoss has a utility class called "
+"<literal>MarshalledValue</literal> that wraps around the serialized object. "
+"Here is a code snippet that illustrates how you can create a wrapper around "
+"JBossCache to handle the classloader issue:"
#. Tag: programlisting
#: Cache_Frequently_Asked_Questions.xml:961
@@ -1209,7 +1247,7 @@
#: Cache_Frequently_Asked_Questions.xml:967
#, no-c-format
msgid "Does JBoss Cache currently support pre-event and post-event notification?"
-msgstr ""
+msgstr "Does JBoss Cache currently support pre-event and post-event notification?"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:973
@@ -1221,6 +1259,11 @@
"TreeCacheListener and ExtendedTreeCacheListener will be merged into "
"TreeCacheListener in release 1.3."
msgstr ""
+"Yes. Starting with release 1.2.4, JBoss Cache has introduced "
+"ExtendedTreeCacheListener which takes in consideration pre and post event "
+"notification. See documentation for more details. Note that "
+"TreeCacheListener and ExtendedTreeCacheListener will be merged into "
+"TreeCacheListener in release 1.3."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:984
@@ -1229,6 +1272,8 @@
"How do I implement a custom listener to listen to <literal>TreeCache</"
"literal> events?"
msgstr ""
+"How do I implement a custom listener to listen to <literal>TreeCache</"
+"literal> events?"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:991
@@ -1240,6 +1285,11 @@
"listen to the events as they occur by calling TreeCache.addTreeCacheListener"
"(myListener)."
msgstr ""
+"You create a class (myListener) that extends AbstractTreeCacheListener and "
+"provide concrete implementation for the node events that you are interested "
+"in. Then you add this listener to the TreeCache instance on startup to "
+"listen to the events as they occur by calling TreeCache.addTreeCacheListener"
+"(myListener)."
#. Tag: programlisting
#: Cache_Frequently_Asked_Questions.xml:999
@@ -1285,6 +1335,9 @@
"Cache in order to get around ClassCastExceptions happening when accessing "
"data in the cache that has just been redeployed?"
msgstr ""
+"Can I use <literal>useRegionBasedMarshalling</literal> attribute in JBoss "
+"Cache in order to get around ClassCastExceptions happening when accessing "
+"data in the cache that has just been redeployed?"
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1011
@@ -1295,6 +1348,10 @@
"transfer did not have access to the classloaders defining the objects in the "
"cache."
msgstr ""
+"Yes, you can. Originally, <literal>TreeCache</literal> Marshalling was "
+"designed as a workaround for those replicated caches that upon state "
+"transfer did not have access to the classloaders defining the objects in the "
+"cache."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1016
@@ -1311,6 +1368,16 @@
"names are the same, the class definitions are not. The current classloader "
"is different to the one when the classes were originally put."
msgstr ""
+"On each deployment, JBoss creates a new classloader per the top level "
+"deployment artifact, for example an EAR. You also have to bear in mind that "
+"a class in an application server is defined not only by the class name but "
+"also its classloader. So, assuming that the cache is not deployed as part of "
+"your deployment, you could deploy an application and put instances of "
+"classes belonging to this deployment inside the cache. If you did a "
+"redeployment and try to do a get operation of the data previously put, this "
+"would result on a ClassCastException. This is because even though the class "
+"names are the same, the class definitions are not. The current classloader "
+"is different to the one when the classes were originally put."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1026
@@ -1326,6 +1393,15 @@
"CacheLoaders, or when JBossCache is used as a second level cache in a "
"persistence framework."
msgstr ""
+"By enabling marshalling, you can control the lifecycle of the data in the "
+"cache and if on undeployment, you inactivate the region and unregister the "
+"classloader that you'd have registered on deployment, you'd evict the data "
+"in the cache locally. That means that in the next deployment, the data won't "
+"be in the cache, therefore avoiding the problem. Obviously, using "
+"marshalling to get around this problem is only recommended when you have "
+"some kind of persistence backing where the data survives, for example using "
+"CacheLoaders, or when JBossCache is used as a second level cache in a "
+"persistence framework."
#. Tag: para
#: Cache_Frequently_Asked_Questions.xml:1035
@@ -1339,6 +1415,13 @@
"literal>. The key would be for this MBean to depend on the target cache, so "
"that it can operate as long as the cache is up and running."
msgstr ""
+"To implement this feature, please follow the instructions indicated in the "
+"example located in the TreeCacheMarshaller section of the user's guide. It's "
+"worth noting that instead of a <literal>ServletContextListener</literal>, "
+"you could add this code into an <literal>MBean</literal> that contained "
+"lifecycle methods, such as <literal>start()</literal> and <literal>stop()</"
+"literal>. The key would be for this MBean to depend on the target cache, so "
+"that it can operate as long as the cache is up and running."
#. Tag: title
#: Cache_Frequently_Asked_Questions.xml:1049
More information about the jboss-cvs-commits
mailing list