From: Manik S. <msu...@jb...> - 2006-07-10 14:50:05
|
User: msurtani Date: 06/07/10 10:50:02 Modified: docs/faq/en master.xml Log: merged in changes from 1.4.0 Revision Changes Path 1.36 +136 -144 JBossCache/docs/faq/en/master.xml (In the diff below, changes in quantity of whitespace are not shown.) Index: master.xml =================================================================== RCS file: /cvsroot/jboss/JBossCache/docs/faq/en/master.xml,v retrieving revision 1.35 retrieving revision 1.36 diff -u -b -r1.35 -r1.36 --- master.xml 6 Jul 2006 16:50:08 -0000 1.35 +++ master.xml 10 Jul 2006 14:50:02 -0000 1.36 @@ -6,7 +6,7 @@ <articleinfo> <title>Frequently Asked Questions about JBoss Cache</title> <releaseinfo>Release 1.4.0 "Jalapeno"</releaseinfo> - <pubdate>May 2006</pubdate> + <pubdate>July 2006</pubdate> <author> <firstname>Ben</firstname> @@ -41,12 +41,10 @@ <para>These are frequently asked questions regarding JBoss Cache.</para> - <qandaset defaultlabel="qanda"> - <qandadiv> + <qandaset defaultlabel="GeneralInformation"> <title>General Information</title> - <qandaentry> - <question> + <question id="1"> <para>What is JBoss Cache?</para> </question> @@ -71,7 +69,7 @@ </qandaentry> <qandaentry> - <question> + <question id="2"> <para>Who are the JBoss Cache developers?</para> </question> @@ -82,7 +80,7 @@ </qandaentry> <qandaentry> - <question> + <question id="3"> <para>What is the license for JBoss Cache?</para> </question> @@ -92,7 +90,7 @@ </qandaentry> <qandaentry> - <question> + <question id="4"> <para>Where can I download JBoss Cache?</para> </question> @@ -102,7 +100,7 @@ </qandaentry> <qandaentry> - <question> + <question id="5"> <para>How do I build JBoss Cache from CVS sources?</para> </question> @@ -118,7 +116,7 @@ </qandaentry> <qandaentry> - <question> + <question id="6"> <para>Which JVMs are supported by JBoss Cache?</para> </question> @@ -130,7 +128,7 @@ </qandaentry> <qandaentry> - <question> + <question id="7"> <para>From JBoss Cache 1.3.0 onwards, there is a new directory <code>lib-50</code>, what is it?</para> </question> @@ -146,7 +144,7 @@ </qandaentry> <qandaentry> - <question> + <question id="8"> <para>How do I know the version of JBoss Cache that I am using?</para> </question> @@ -157,7 +155,7 @@ </qandaentry> <qandaentry> - <question> + <question id="9"> <para>Can I run JBoss Cache outside of JBoss Application Server?</para> </question> @@ -171,16 +169,16 @@ </listitem> <listitem> - <para>Standalone, that can run in any JEE server such + <para>Standalone, that can run in any Java EE server such as BEA WebLogic or IBM Websphere. Of course, it can also run in - a standalone Java process (i.e., outside JEE context).</para> + a standalone Java process (i.e., outside Java EE context).</para> </listitem> </itemizedlist> </answer> </qandaentry> <qandaentry> - <question> + <question id="10"> <para>Where can I report bugs or problems?</para> </question> @@ -190,13 +188,13 @@ User Forum</ulink>.</para> </answer> </qandaentry> - </qandadiv> + </qandaset> - <qandadiv> + <qandaset defaultlabel="TreeCache"> <title>JBoss Cache in general and TreeCache</title> <qandaentry> - <question> + <question id="11"> <para>How do I deploy JBoss Cache as a MBean service?</para> </question> @@ -212,7 +210,7 @@ </qandaentry> <qandaentry> - <question> + <question id="12"> <para>How do I know if my JBoss Cache MBean has been deployed?</para> </question> @@ -225,7 +223,7 @@ </qandaentry> <qandaentry> - <question> + <question id="13"> <para>How do I access the JBoss Cache MBean?</para> </question> @@ -277,7 +275,7 @@ </qandaentry> <qandaentry> - <question> + <question id="14"> <para>Can I run JBoss Cache on JBoss AS 3.2.x releases?</para> </question> @@ -289,7 +287,7 @@ </qandaentry> <qandaentry> - <question> + <question id="15"> <para>Can I run multiple JBoss Cache instances on the same VM?</para> </question> @@ -303,7 +301,7 @@ </qandaentry> <qandaentry> - <question> + <question id="16"> <para>Can TreeCache run as a second level cache inside Hibernate?</para> </question> @@ -320,7 +318,7 @@ </qandaentry> <qandaentry> - <question> + <question id="17"> <para>What about using PojoCache as a Hibernate cache?</para> </question> @@ -333,7 +331,7 @@ </qandaentry> <qandaentry> - <question> + <question id="18"> <para>How can I configure JBoss Cache?</para> </question> @@ -345,7 +343,7 @@ </qandaentry> <qandaentry> - <question> + <question id="19"> <para>In the configuration xml file, there are tags such as <literal>class</literal>, <literal> MBean</literal>, etc. What are these?</para> @@ -361,7 +359,7 @@ </qandaentry> <qandaentry> - <question> + <question id="20"> <para>What is the difference between the different cache modes?</para> </question> @@ -383,7 +381,7 @@ </qandaentry> <qandaentry> - <question> + <question id="21"> <para>How does JBoss Cache's replication mechanism work?</para> </question> @@ -403,7 +401,7 @@ </qandaentry> <qandaentry> - <question> + <question id="22"> <para>I run a 2 node cluster. If the network dies, do the caches continue to run?</para> </question> @@ -416,7 +414,7 @@ <qandaentry> - <question> + <question id="23"> <para>Can I plug in library X instead of JGroups to handle remote calls and group communications?</para> </question> @@ -428,7 +426,7 @@ </qandaentry> <qandaentry> - <question> + <question id="24"> <para>Does the cache need to replicate to every other instance in the cluster? Isn't this slow if the cluster is large?</para> </question> @@ -443,7 +441,7 @@ </qandaentry> <qandaentry> - <question> + <question id="25"> <para>If I have the need for different TreeCache properties (e.g., <literal>CacheMode</literal> and <literal>IsolationLevel</literal>), do I simply need to create multiple TreeCache instances with the appropriate configuration?</para> @@ -457,7 +455,7 @@ </qandaentry> <qandaentry> - <question> + <question id="26"> <para>Does the Tree Cache config <literal>ClusterName</literal> have any relation to the JBoss AS cluster <literal>PartitionName</literal>?</para> @@ -471,7 +469,7 @@ </qandaentry> <qandaentry> - <question> + <question id="27"> <para>When using multiple JGroups based components [cluster-service.xml, treecache (multiple instances)], what is the correct/valid way to configure those components to make sure my @@ -489,7 +487,7 @@ </qandaentry> <qandaentry> - <question> + <question id="28"> <para>Does JBoss Cache currently support cache persistence storage?</para> </question> @@ -501,7 +499,7 @@ </qandaentry> <qandaentry> - <question> + <question id="29"> <para>Does JBoss Cache currently support cache passivation/ overflow to a data store?</para> </question> @@ -514,7 +512,7 @@ </qandaentry> <qandaentry> - <question> + <question id="30"> <para>Is JBoss Cache thread safe?</para> </question> @@ -524,7 +522,7 @@ </qandaentry> <qandaentry> - <question> + <question id="31"> <para>Does JBoss Cache support XA (2PC) transactions now?</para> </question> @@ -536,7 +534,7 @@ </qandaentry> <qandaentry> - <question> + <question id="32"> <para>Which TransactionManagers are supported by JBoss Cache?</para> </question> @@ -555,7 +553,7 @@ </qandaentry> <qandaentry> - <question> + <question id="33"> <para>How do I set up the cache to be transactional?</para> </question> @@ -587,7 +585,7 @@ </qandaentry> <qandaentry> - <question> + <question id="34"> <para>How do I control the cache locking level?</para> </question> @@ -607,7 +605,7 @@ </qandaentry> <qandaentry> - <question> + <question id="35"> <para>How does JBoss Cache lock data for concurrent access?</para> </question> @@ -618,7 +616,7 @@ <qandaentry> - <question> + <question id="36"> <para>How do I enable Optimistic Locking in JBoss Cache?</para> </question> @@ -629,8 +627,8 @@ <qandaentry> - <question> - <para>How does the write lock apply to a fqn node, say, + <question id="37"> + <para>How does the write lock apply to an Fqn node, say, "/org/jboss/test"?</para> </question> @@ -650,7 +648,7 @@ </qandaentry> <qandaentry> - <question> + <question id="38"> <para>Can I use the cache locking level even without a transaction context?</para> </question> @@ -666,7 +664,7 @@ </qandaentry> <qandaentry> - <question> + <question id="39"> <para>With replication (REPL_SYNC/REPL_ASYNC) or invalidation (INVALIDATION_SYNC/INVALIDATION_ASYNC), how often does the cache broadcast messages over the network?</para> </question> @@ -683,7 +681,7 @@ </qandaentry> <qandaentry> - <question> + <question id="40"> <para>How can I do a mass removal?</para> </question> @@ -694,7 +692,7 @@ </qandaentry> <qandaentry> - <question> + <question id="41"> <para>Can I monitor and manage the JBoss Cache?</para> </question> @@ -704,7 +702,7 @@ </qandaentry> <qandaentry> - <question> + <question id="42"> <para>Can I disable JBoss Cache management attributes in JBoss Cache 1.3.0?</para> </question> @@ -714,7 +712,7 @@ </qandaentry> <qandaentry> - <question><para>What is jboss-serialization.jar, introduced in JBoss Cache 1.4.x and do I need this?</para></question> + <question id="43">><para>What is jboss-serialization.jar, introduced in JBoss Cache 1.4.x and do I need this?</para></question> <answer><para>jboss-serialization.jar is the <ulink url="http://labs.jboss.org/portal/index.html?ctrl:id=page.default.info&project=serialization">JBoss Serialization</ulink> library, which is much more efficient in terms of speed and CPU usage as well as the generated byte stream size than standard Java serialization. This very significantly improves replication performance of custom objects placed in the cache.</para> @@ -725,7 +723,7 @@ </qandaentry> <qandaentry> - <question> + <question id="44"> <para>Can I disable JBoss Serialization and revert back to standard Java serialization?</para> </question> @@ -736,7 +734,7 @@ <qandaentry> - <question> + <question id="45"> <para>Does JBoss Cache support partitioning?</para> </question> @@ -749,7 +747,7 @@ </qandaentry> <qandaentry> - <question> + <question id="46"> <para>Does JBoss Cache handle the concept of application classloading inside, say, a J2EE container?</para> </question> @@ -838,7 +836,7 @@ </qandaentry> <qandaentry> - <question> + <question id="47"> <para>Does JBoss Cache currently support pre-event and post-event notification?</para> </question> @@ -853,7 +851,7 @@ </qandaentry> <qandaentry> - <question> + <question id="48"> <para>How do I implement a custom listener to listen to <literal>TreeCache</literal> events?</para> </question> @@ -885,13 +883,13 @@ </programlisting> </answer> </qandaentry> - </qandadiv> + </qandaset> - <qandadiv> + <qandaset defaultlabel="PojoCache"> <title>PojoCache</title> <qandaentry> - <question> + <question id="49"> <para>What is PojoCache?</para> </question> @@ -920,7 +918,7 @@ </qandaentry> <qandaentry> - <question> + <question id="50"> <para>What's the relationship between PojoCache and TreeCacheAop classes?</para> </question> @@ -931,7 +929,7 @@ </qandaentry> <qandaentry> - <question> + <question id="51"> <para>Does PojoCache have all the functional capabilities of TreeCache?</para> </question> @@ -944,7 +942,7 @@ </qandaentry> <qandaentry> - <question> + <question id="52"> <para>What is the difference between TreeCache and PojoCache?</para> </question> @@ -966,7 +964,7 @@ </qandaentry> <qandaentry> - <question> + <question id="53"> <para>What are the steps to use the PojoCache feature?</para> </question> @@ -975,13 +973,13 @@ in order to use PojoCache, you will need to:</para> <itemizedlist> - <listitem>prepare POJO. You can do either via xml declaration or annotation. For annotation, you can + <listitem><para>prepare POJO. You can do either via xml declaration or annotation. For annotation, you can use either the JDK1.4 style or JDK50 one (of which is part of JVM spec). If you use JDK14, you will also need - a annotation pre-compiler (annoc) to pre-process it.</listitem> - <listitem>instrumentation. You will need to instrument your POJO either at compile-time or load-time. + a annotation pre-compiler (annoc) to pre-process it.</para></listitem> + <listitem><para>instrumentation. You will need to instrument your POJO either at compile-time or load-time. If you do it during compile-time, you use so-called aop pre-compiler (aopc) to do bytecode manipulation. If you do it via load-time, however, you need either a special system class loader or, in JDK50, you can - use the javaagent option.</listitem> + use the javaagent option.</para></listitem> </itemizedlist> <para>So if you use JDK50, for example, with annotation and load-time instrumentation, then you won't need any pre-processing step to use PojoCache. For a full example, please refer to the distro examples directory. @@ -990,7 +988,7 @@ </qandaentry> <qandaentry> - <question> + <question id="54"> <para>Can I run PojoCache in JBoss AS 3.2.x application server?</para> </question> @@ -1004,31 +1002,23 @@ </qandaentry> <qandaentry> - <question> + <question id="55"> <para>Can PojoCache run as a MBean as well?</para> </question> <answer> - - <para>Yes. It is almost the same as TreeCache MBean. The only difference is the object name and the class name. E.g., instead - of</para> - - - + of <programlisting><mbean code="org.jboss.cache.TreeCache" name="jboss.cache:service=TreeCache"></programlisting> - you will have: - <programlisting><mbean code="org.jboss.cache.aop.PojoCache" name="jboss.cache:service=PojoCache"></programlisting> - - in the xml configuration file. + in the xml configuration file.</para> </answer> </qandaentry> <qandaentry> - <question> + <question id="56"> <para>Can I pre-compile the aop classes such that I don't need to use the system classloader and jboss-aop configuration xml?</para> </question> @@ -1043,13 +1033,16 @@ class loader.</para> <para>For an example of how to use <literal>aopc</literal>, please - see the <literal>build.xml</literal> in the standalone package (look - for the aopc Ant target).</para> + see 1) <literal>tools</literal> directory for PojoCacheTasks14.xml + and PojoCacheTasks50.xml. Both contain Ant tasks that you can + import to your regular project for <literal>annoc</literal> and + <literal>aopc</literal>. In addition, please also check out the + <literal>examples</literal> directory for concrete examples.</para> </answer> </qandaentry> <qandaentry> - <question> + <question id="57"> <para>How do I use aopc on multiple module directories?</para> </question> @@ -1061,7 +1054,7 @@ </qandaentry> <qandaentry> - <question> + <question id="58"> <para>What's in the <literal>jboss-aop.xml</literal> configuration?</para> </question> @@ -1083,7 +1076,7 @@ </qandaentry> <qandaentry> - <question> + <question id="59"> <para>Can I use annotation instead of the xml declaration?</para> </question> @@ -1094,8 +1087,8 @@ </qandaentry> <qandaentry> - <question> - <para>What are the pro and con of xml vs annotation?</para> + <question id="60"> + <para>What are the pro and con of xml vs. annotation?</para> </question> <answer> @@ -1107,7 +1100,7 @@ </qandaentry> <qandaentry> - <question> + <question id="61"> <para>What are the <literal>@org.jboss.cache.aop.annotation.Transient</literal> and <literal>@org.jboss.cache.aop.annotation.Serializable</literal> field level annotations?</para> </question> @@ -1123,7 +1116,7 @@ </qandaentry> <qandaentry> - <question> + <question id="62"> <para>What about compile-time vs. load-time instrumentation then?</para> </question> @@ -1135,9 +1128,9 @@ </qandaentry> <qandaentry> - <question> + <question id="63"> <para>Is it possible to store the same object multiple times but - with different FQN paths? Like /foo/byName and /foo/byId ?</para> + with different Fqn paths? Like /foo/byName and /foo/byId ?</para> </question> <answer> @@ -1148,7 +1141,7 @@ </qandaentry> <qandaentry> - <question> + <question id="64"> <para>Do I need to declare all my objects "prepared" in <literal>jboss-aop.xml</literal>?</para> </question> @@ -1163,7 +1156,7 @@ </qandaentry> <qandaentry> - <question> + <question id="65"> <para>Can the cache aop intercept update via reflection?</para> </question> @@ -1175,7 +1168,7 @@ </qandaentry> <qandaentry> - <question> + <question id="66"> <para>When I declare my POJO to be "aspectized", what happens to the fields with transient, static, and final modifiers?</para> </question> @@ -1188,7 +1181,7 @@ </qandaentry> <qandaentry> - <question> + <question id="67"> <para>What are those keys such as <literal>JBoss:internal:class</literal> and <literal>AOPInstance</literal>?</para> @@ -1201,7 +1194,7 @@ </qandaentry> <qandaentry> - <question> + <question id="68"> <para>What about Collection classes? Do I need to declare them "prepared"?</para> </question> @@ -1226,7 +1219,7 @@ </qandaentry> <qandaentry> - <question> + <question id="69"> <para>How do I use <literal>List</literal>, <literal>Set</literal>, and <literal>Map</literal> dynamic proxy?</para> </question> @@ -1252,7 +1245,7 @@ </qandaentry> <qandaentry> - <question> + <question id="70"> <para>What is the proper way of assigning two different keys with Collection class object?</para> </question> @@ -1277,7 +1270,7 @@ </qandaentry> <qandaentry> - <question> + <question id="71"> <para>OK, so I know I am supposed to use proxy when manipulating the Collection classes once they are managed by the cache. But what happens to Pojos that share the Collection objects, e.g., a @@ -1294,7 +1287,7 @@ </qandaentry> <qandaentry> - <question> + <question id="72"> <para>What happens when my "aspectized" POJO has field members that are of Collection class ?</para> </question> @@ -1314,7 +1307,7 @@ <qandaentry> - <question> + <question id="73"> <para>What are the limitation of Collection classes in PojoCache?</para> </question> @@ -1339,43 +1332,43 @@ <qandaentry> - <question> + <question id="74"> <para>What are the pros and cons of PojoCache?</para> </question> <answer> <para>As mentioned in the reference doc, PojoCache has the following advantages:</para> <itemizedlist> - <listitem>Fine-grained replication and/or persistency. If you use a distributed PojoCache + <listitem><para>Fine-grained replication and/or persistency. If you use a distributed 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.</listitem> - <listitem>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.</listitem> - <listitem>POJO can posses object relationship, e.g., multiple referenced. Distributed - PojoCache will handle this transparently for you.</listitem> + also applies to persistency.</para></listitem> + <listitem><para>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.</para></listitem> + <listitem><para>POJO can posses object relationship, e.g., multiple referenced. Distributed + PojoCache will handle this transparently for you.</para></listitem> </itemizedlist> <para>And here are some cases that you may not want to use PojoCache:</para> <itemizedlist> - <listitem>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.</listitem> - <listitem>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.</listitem> - <listitem>Your application is bounded by memory usage. Because PojoCache need almost twice as much + <listitem><para>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.</para></listitem> + <listitem><para>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.</para></listitem> + <listitem><para>Your application is bounded by memory usage. Because PojoCache need almost 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.</listitem> - <listitem>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.</listitem> + primitive fields), you may not want to use PojoCache.</para></listitem> + <listitem><para>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.</para></listitem> </itemizedlist> </answer> </qandaentry> - </qandadiv> + </qandaset> - <qandadiv> + <qandaset defaultlabel="EvictionPolicies"> <title>Eviction Policies</title> <qandaentry> - <question> + <question id="75"> <para>Does JBoss Cache support eviction policies?</para> </question> @@ -1393,7 +1386,7 @@ </qandaentry> <qandaentry> - <question> + <question id="76"> <para>Why can't I use <literal>org.jboss.cache.eviction.LRUPolicy</literal> for PojoCache as well?</para> @@ -1408,7 +1401,7 @@ </qandaentry> <qandaentry> - <question> + <question id="77"> <para>Does JBoss Cache's implemented LRU eviction policy operates in replication mode?</para> </question> @@ -1439,7 +1432,7 @@ </qandaentry> <qandaentry> - <question> + <question id="78"> <para>Does JBoss Cache support <literal>Region</literal>?</para> </question> @@ -1459,7 +1452,7 @@ </qandaentry> <qandaentry> - <question> + <question id="79"> <para>What are the <literal>EvictionPolicyConfig</literal> tag parameters for <literal>org.jboss.cache.eviction.LRUPolicy</literal>?</para> @@ -1508,7 +1501,7 @@ </qandaentry> <qandaentry> - <question> + <question id="80"> <para>I have turned on the eviction policy, why do I still get "out of memory" (OOM) exception?</para> </question> @@ -1529,13 +1522,13 @@ configurable in the next release.</para> </answer> </qandaentry> - </qandadiv> + </qandaset> - <qandadiv> + <qandaset defaultlabel="CacheLoaders"> <title>Cache Loaders</title> <qandaentry> - <question> + <question id="81"> <para>What is a CacheLoader?</para> </question> @@ -1591,7 +1584,7 @@ </qandaentry> <qandaentry> - <question> + <question id="82"> <para>Can writing to CacheLoaders be asynchronous?</para> </question> @@ -1604,7 +1597,7 @@ </qandaentry> <qandaentry> - <question> + <question id="83"> <para>Can I write my own CacheLoader ?</para> </question> @@ -1617,7 +1610,7 @@ </qandaentry> <qandaentry> - <question> + <question id="84"> <para>Does a CacheLoader have to use a persistent store ?</para> </question> @@ -1632,7 +1625,7 @@ </qandaentry> <qandaentry> - <question> + <question id="85"> <para>What can I use a CacheLoader for?</para> </question> @@ -1675,7 +1668,7 @@ </qandaentry> <qandaentry> - <question> + <question id="86"> <para>How do I configure JBossCache with a CacheLoader?</para> </question> @@ -1688,7 +1681,7 @@ </qandaentry> <qandaentry> - <question> + <question id="87"> <para>Do I have to pay to use Sleepycat's CacheLoader?</para> </question> @@ -1701,7 +1694,7 @@ </qandaentry> <qandaentry> - <question> + <question id="88"> <para>Can I use more than one cache loader?</para> </question> @@ -1718,7 +1711,7 @@ </qandaentry> <qandaentry> - <question> + <question id="89"> <para>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?</para> </question> @@ -1732,19 +1725,18 @@ - </qandadiv> + </qandaset> - <qandadiv> + <qandaset defaultlabel="Troubleshooting"> <title>Troubleshooting</title> <qandaentry> - <question> + <question id="90"> <para>I am having problems getting JBoss Cache to work, where can I get information on troubleshooting?</para> </question> <answer> - <para>Troubleshooting section can be found in the following <ulink url="http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossCacheTroubleshooting">wiki link</ulink> + <para>Troubleshooting section can be found in the following <ulink url="http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossCacheTroubleshooting">wiki link</ulink>. </para> </answer> </qandaentry> - </qandadiv> </qandaset> </article> |